Produce gnark proofs for Noir circuits on browser.
| Path | Contents |
|---|---|
| src/ | sunspot_wasm Rust crate — witness solving, Groth16 prover, BN254/Grumpkin glue, wasm-bindgen adapters. |
| js/ | @reilabs/sunspot_js npm package |
| bench/ | In-browser benchmark harness |
| tests/ | Integration tests |
- src/parsing/ — decoders for the gnark
*.ccsconstraint system and*.pkproving key wire formats, plus the Noir ACIR + witness-stack pair. - src/solver/ — witness solver. Computes the full gnark witness vector (public + private + internal) from the Noir witness, including BSB22 commitment hints.
- src/prover/ — Groth16 prover for solved witnesses.
The lazy reduction and SIMD arithmetic is pluggable behind the local-curve Cargo feature:
enable it to use the SIMD-optimised
backend (the default); disable it to fall back on arkworks backend. The
npm package ships both as simd-* / sisd-* builds — see
js/README.md for the usage details.
Install the published npm package:
npm install @reilabs/sunspot_js
# or
yarn add @reilabs/sunspot_jsSee js/README.md for the full TypeScript API.
Prerequisites:
- Rust nightly (pinned via rust-toolchain.toml).
wasm-pack.- Node + yarn for the JS package.
Build everything (all four wasm variants + TypeScript):
cd js
yarn install
yarn buildOr just the Rust side:
cargo build --release # native rlib
# OR
CARGO_UNSTABLE_BUILD_STD=panic_abort,std \
wasm-pack build --release --target web # threaded wasmApache-2.0. See LICENSE.