From bbb14f584ca0a77b4c277199b06082c97b60fe06 Mon Sep 17 00:00:00 2001 From: martyall Date: Fri, 13 Dec 2024 04:38:06 -0800 Subject: [PATCH] wip --- flake.nix | 1 - src/lib/crypto/kimchi_bindings/js/node_js/build.sh | 6 +----- src/lib/crypto/kimchi_bindings/js/web/build.sh | 2 +- .../crypto/kimchi_bindings/stubs/src/caml/caml_pointer.rs | 6 ++---- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/flake.nix b/flake.nix index f696b31191d..b942ec517a4 100644 --- a/flake.nix +++ b/flake.nix @@ -283,7 +283,6 @@ nix-npm-buildPackage.overlays.default (final: prev: { rpmDebUtils = final.callPackage "${nix-utils}/utils/rpm-deb" { }; - wasm-bindgen-cli = final.wasm-bindgen-cli; mix-to-nix = pkgs.callPackage inputs.mix-to-nix { }; nix-npm-buildPackage = pkgs.callPackage inputs.nix-npm-buildPackage { diff --git a/src/lib/crypto/kimchi_bindings/js/node_js/build.sh b/src/lib/crypto/kimchi_bindings/js/node_js/build.sh index 7a8de8fcd7a..b3d4321a5ad 100755 --- a/src/lib/crypto/kimchi_bindings/js/node_js/build.sh +++ b/src/lib/crypto/kimchi_bindings/js/node_js/build.sh @@ -1,10 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -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 nightly-2023-09-01 wasm-pack build --target nodejs --out-dir ../js/node_js ../../../proof-systems/plonk-wasm -- -Z build-std=panic_abort,std --features nodejs -else - cp "$PLONK_WASM_NODEJS"/* -R . -fi + rustup run 1.74 wasm-pack build --target nodejs --out-dir ../js/node_js ../../../proof-systems/plonk-wasm -- --features nodejs diff --git a/src/lib/crypto/kimchi_bindings/js/web/build.sh b/src/lib/crypto/kimchi_bindings/js/web/build.sh index 4dac8bc0345..21a36a19de4 100755 --- a/src/lib/crypto/kimchi_bindings/js/web/build.sh +++ b/src/lib/crypto/kimchi_bindings/js/web/build.sh @@ -4,7 +4,7 @@ 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 nightly-2023-09-01 wasm-pack build --target web --out-dir ../js/web ../../../proof-systems/plonk-wasm -- -Z build-std=panic_abort,std + rustup run 1.74 wasm-pack build --target web --out-dir ../js/web ../../../proof-systems/plonk-wasm else cp "$PLONK_WASM_WEB"/* -R . fi diff --git a/src/lib/crypto/kimchi_bindings/stubs/src/caml/caml_pointer.rs b/src/lib/crypto/kimchi_bindings/stubs/src/caml/caml_pointer.rs index cba974e226e..7210b9477f3 100644 --- a/src/lib/crypto/kimchi_bindings/stubs/src/caml/caml_pointer.rs +++ b/src/lib/crypto/kimchi_bindings/stubs/src/caml/caml_pointer.rs @@ -40,9 +40,7 @@ macro_rules! impl_caml_pointer { type Target = $typ; fn deref(&self) -> &Self::Target { - unsafe { - &*self.0.get() - } + unsafe { &*self.0.get() } } } @@ -60,7 +58,7 @@ macro_rules! impl_caml_pointer { // mutable, since we can call [`get_mut_unchecked`] in // nightly, or can call [`get_mut`] and unwrap if this is // the only live reference. - &mut *self.0.get() // Safe mutable access via UnsafeCell + &mut *self.0.get() // Safe mutable access via UnsafeCell } } }