Skip to content

antimatter15/circom

 
 

Repository files navigation

Circom 2.0 WASM

This is a proof of concept of Circom 2.0 compiled to WASM.

Getting Started

cd circom

# Compiling to WASM with rustwasmc/wasmedge
npm install -g rustwasmc
rustwasmc build --dev # fast compile, slow to run
rustwasmc build --enable-aot # slow but optimized build

# Testing out the compiled version with wasmedge
mkdir -p output
~/.wasmedge/bin/wasmedge --dir .:. pkg/circom.wasm --output output basic.circom --wasm
cd output/basic_js
node generate_witness.js basic.wasm input.json out.wtns

# Testing out the compiled version with wasmtime
wasmtime --dir . pkg/circom.wasm --output output basic.circom --wasm
cd output/basic_js
node generate_witness.js basic.wasm input.json out.wtns

# Copying
cp pkg/circom.wasm ../npm

About

zkSnark circuit compiler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • WebAssembly 39.6%
  • Rust 30.4%
  • Assembly 26.4%
  • C++ 2.7%
  • JavaScript 0.6%
  • Circom 0.3%