Optimized ZK provers
Install rustup and cargo (require curl):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shInstall nightly:
rustup toolchain install nightlyInstall cargo-c (require openssl and pkg-config):
cargo install cargo-cThe package compiles with GHC 9.6.3 and Cabal 3.10.2.1.
Running tests:
cabal run wrapper-testRun benchmark:
cabal run msmBefore you need install ghc-prof-flamegraph. Remember path to executable file
cabal install ghc-prof-flamegraphRun benchmark with .prof generating
cabal run msm --enable-profiling -- +RTS -pRun generating flamegraph. Make sure the path to ghc-prof-flamegraph is correct
~/.local/bin/ghc-prof-flamegraph msm.profFlamegraph will be in msm.svg file
To run benchmark install cargo-criterion
cargo install cargo-criterionAnd run in rust-wrapper
cargo criterion --bench msm_benchFor generate flamegraph install flamegraph (require perf)
cargo install flamegraphAnd generate flamegraph from bench (in rust-wrapper):
cargo flamegraph --bench msm_benchTo build Rust code you neeed to install wasm32-unknown-unknown target:
rustup target add wasm32-unknown-unknownBuild command:
cargo +nightly build --release --target=wasm32-unknown-unknownAlso you can use wasm32-wasip1. Installation and building are similar