Skip to content

Commit

Permalink
actually we don't need 1.74 to do thist
Browse files Browse the repository at this point in the history
  • Loading branch information
martyall committed Dec 14, 2024
1 parent 1fe4676 commit c054b59
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 21 deletions.
17 changes: 1 addition & 16 deletions nix/rust.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let
# override stdenv.targetPlatform here, if neccesary
};
toolchainHashes = {
"1.74" = "sha256-PjvuouwTsYfNKW5Vi5Ye7y+lL7SsWGBxCtBOOm2z14c=";
"1.72" = "sha256-dxE7lmCFWlq0nl/wKcmYvpP9zqQbBitAQgZ1zx9Ooik=";
# copy the placeholder line with the correct toolchain name when adding a new toolchain
# That is,
# 1. Put the correct version name;
Expand Down Expand Up @@ -108,21 +108,6 @@ in {
'';
};

wasm-pack =
let rust_platform = rustPlatformFor final.kimchi-rust.rust;
in rust_platform.buildRustPackage rec {
pname = "wasm-pack";
version = "0.13.1";
src = final.fetchCrate {
inherit pname version;
sha256 = "sha256-CuLvEiymShM+k02x33FKTDK9D1r6DXJ4eplgVZBCnsI=";
};
cargoSha256 = "sha256-RdBnW8HKSgjVnyafycGFTSTc5j1A9WRDvUuZu8upRWY=";

nativeBuildInputs = [ final.pkg-config ];
doCheck = false;

};
plonk_wasm = let
lock = ../src/lib/crypto/proof-systems/Cargo.lock;

Expand Down
5 changes: 3 additions & 2 deletions src/lib/crypto/kimchi_bindings/js/node_js/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ set -euo pipefail
# When using nix this is already cached
if [[ -z "${PLONK_WASM_NODEJS-}" ]]; then
export RUSTFLAGS="-C target-feature=+atomics,+bulk-memory,+mutable-globals -C link-arg=--no-check-features -C link-arg=--max-memory=4294967296"
# The version should stay in line with the one in kimchi_bindings/wasm/rust-toolchain.toml
rustup run 1.74 wasm-pack build --target nodejs --out-dir ../../kimchi_bindings/js/node_js ../../../proof-systems/plonk-wasm -- --features nodejs
# The rust version should stay in line with the one in kimchi_bindings/wasm/rust-toolchain.toml
# TODO: change out-dir to be relative to PWD when we upgrade to wasm-pack 0.13 (see https://github.com/rustwasm/wasm-pack/issues/704)
rustup run 1.72 wasm-pack build --target nodejs --out-dir ../../kimchi_bindings/js/node_js ../../../proof-systems/plonk-wasm -- --features nodejs
else
cp "$PLONK_WASM_NODEJS"/* -R .
fi
3 changes: 2 additions & 1 deletion src/lib/crypto/kimchi_bindings/js/web/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -euo pipefail
if [[ -z "${PLONK_WASM_WEB-}" ]]; then
export RUSTFLAGS="-C target-feature=+atomics,+bulk-memory,+mutable-globals -C link-arg=--no-check-features -C link-arg=--max-memory=4294967296"
# The version should stay in line with the one in kimchi_bindings/wasm/rust-toolchain.toml
rustup run 1.74 wasm-pack build --target web --out-dir ../../kimchi_bindings/js/web ../../../proof-systems/plonk-wasm
# TODO: change out-dir to be relative to PWD when we upgrade to wasm-pack 0.13 (see https://github.com/rustwasm/wasm-pack/issues/704)
rustup run 1.72 wasm-pack build --target web --out-dir ../../kimchi_bindings/js/web ../../../proof-systems/plonk-wasm
else
cp "$PLONK_WASM_WEB"/* -R .
fi
2 changes: 1 addition & 1 deletion src/lib/crypto/kimchi_bindings/stubs/rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
# 4. figure out the hashes of the (now obsolete) docker images used in CI rules that are failing, grep for these hashes and replace them with the new hashes

[toolchain]
channel = "1.74"
channel = "1.72"
2 changes: 1 addition & 1 deletion src/lib/crypto/proof-systems

0 comments on commit c054b59

Please sign in to comment.