Circom_wasm compiles zkSNARK circuits to WebAssembly. Current stable version is 0.2.1 (pre-release, not audited). It is a port of the circom compiler that targets wasm instead of native, enabling client-side circuit compilation. Key differentiators: allows compilation directly in browser/Node.js without native binaries; supports circom v2.1.5 and v2.1.6 syntax. Note: experimental, limited testing, not recommended for production.
npm install circom_wasmNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Read a .circom file, compile it to wasm, and instantiate the compiled circuit using CircomCircuit.
Use the official native circom compiler for production. Contribute to testing if you use this package.
Update code: pass source code as first argument and filename as second argument.
Watch for API changes on GitHub.
Install it: npm install circom_wasm. If using npm <7, ensure you have peer dependency 'circom' installed.
Use a bundler/webpack or set type: 'module' in package.json. Alternatively, downgrade to CommonJS by using the .cjs extension.
Use named import: import { compile } from 'circom_wasm';