Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
martyall committed Dec 13, 2024
1 parent d667522 commit bbb14f5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 1 addition & 5 deletions src/lib/crypto/kimchi_bindings/js/node_js/build.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion src/lib/crypto/kimchi_bindings/js/web/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 2 additions & 4 deletions src/lib/crypto/kimchi_bindings/stubs/src/caml/caml_pointer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() }
}
}

Expand All @@ -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
}
}
}
Expand Down

0 comments on commit bbb14f5

Please sign in to comment.