From bfa8b684912da7c4b83353d25c39376b53e00efb Mon Sep 17 00:00:00 2001 From: Frederic Kettelhoit Date: Mon, 10 Mar 2025 18:52:34 +0000 Subject: [PATCH 1/2] Fix styling issues caused by mdbook update --- docs/pages/index.md | 29 ----------------------------- garble_docs/theme/css/general.css | 6 +++++- 2 files changed, 5 insertions(+), 30 deletions(-) delete mode 100644 docs/pages/index.md diff --git a/docs/pages/index.md b/docs/pages/index.md deleted file mode 100644 index 8554161..0000000 --- a/docs/pages/index.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: "Garble Language" ---- - -# Garble — A Language for Multi-Party Computation - -Garble is a Turing-incomplete Programming Language for Multi-Party Computation (MPC) with Garbled Circuits. Garble can be compiled to Boolean (AND, XOR and NOT) gates and always terminates. Garble's syntax is a subset of Rust and all of its concepts will be familiar to Rust programmers. Garble is much simpler though, making it easy to learn and integrate into MPC engines. - -Here's a taste of Garble: - -```rust -// A function for solving Yao's Millionaires' problem: - -enum Richest { - IsA, - IsB, - Tie, -} - -pub fn main(a: u64, b: u64) -> Richest { - if a > b { - Richest::IsA - } else if b > a { - Richest::IsB - } else { - Richest::Tie - } -} -``` diff --git a/garble_docs/theme/css/general.css b/garble_docs/theme/css/general.css index 8f1b738..8ae3d41 100644 --- a/garble_docs/theme/css/general.css +++ b/garble_docs/theme/css/general.css @@ -342,6 +342,10 @@ code * { font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace !important; } +:not(pre):not(a)>code.hljs { + color: #ccc; +} + p { line-height: 1.6em !important; margin-block-start: 1.6em; @@ -372,7 +376,7 @@ a, padding: 0.1em 0.3em; border-radius: 3px; border: 1px solid #333; - background-color: #fff; + background-color: #666; line-height: 1.8; } From cb83b33a5a99fa3b340d39c785728dcd76247fd2 Mon Sep 17 00:00:00 2001 From: Frederic Kettelhoit Date: Mon, 10 Mar 2025 18:54:34 +0000 Subject: [PATCH 2/2] Use fixed mdbook version --- .github/workflows/pages.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index c036a68..b3bf05c 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -15,13 +15,11 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Install latest mdbook - run: | - tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') - url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" - mkdir mdbook - curl -sSL $url | tar -xz --directory=./mdbook - echo `pwd`/mdbook >> $GITHUB_PATH + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Install mdbook + run: cargo install --version 0.4.47 mdbook - name: Build Book run: | cd garble_docs && mdbook build