{"id":40715,"library":"circom_wasm","title":"circom_wasm","description":"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.","status":"deprecated","version":"0.2.1","language":"javascript","source_language":"en","source_url":"https://github.com/ioedeveloper/circom_wasm","tags":["javascript","zkproofs","zksnarks","circuits","compiler","typescript"],"install":[{"cmd":"npm install circom_wasm","lang":"bash","label":"npm"},{"cmd":"yarn add circom_wasm","lang":"bash","label":"yarn"},{"cmd":"pnpm add circom_wasm","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"circom_wasm is a wasm port of the native circom compiler; requires matching version","package":"circom","optional":false}],"imports":[{"note":"ESM-only package; require() will fail in Node < v12 or without --experimental-modules.","wrong":"const compile = require('circom_wasm').compile;","symbol":"compile","correct":"import { compile } from 'circom_wasm';"},{"note":"This is a named export, not default.","wrong":"import CircomCircuit from 'circom_wasm';","symbol":"CircomCircuit","correct":"import { CircomCircuit } from 'circom_wasm';"},{"note":"Default export is the module itself, not recommended; prefer named imports.","wrong":"import { default } from 'circom_wasm';","symbol":"default","correct":"import circomWasm from 'circom_wasm';"}],"quickstart":{"code":"import { compile, CircomCircuit } from 'circom_wasm';\nimport { readFileSync } from 'fs';\n\nasync function main() {\n  // Read a circom file\n  const source = readFileSync('circuit.circom', 'utf-8');\n  // Compile to wasm\n  const circuit = await compile(source, 'circuit.circom');\n  console.log('Compiled wasm size:', circuit.wasm.byteLength);\n  // Instantiate\n  const instance = new CircomCircuit(circuit);\n  console.log('Instance created');\n}\nmain().catch(console.error);","lang":"typescript","description":"Read a .circom file, compile it to wasm, and instantiate the compiled circuit using CircomCircuit."},"warnings":[{"fix":"Use the official native circom compiler for production. Contribute to testing if you use this package.","message":"The package is experimental and has not undergone sufficient testing; it may produce incorrect circuits or crash.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Update code: pass source code as first argument and filename as second argument.","message":"The 'compile' function signature changed in v0.2.0: previously took a file path, now takes source string and file name.","severity":"breaking","affected_versions":"<0.2.0"},{"fix":"Watch for API changes on GitHub.","message":"CircomCircuit class may be renamed in future versions to align with upstream circom. Currently no deprecation warning.","severity":"deprecated","affected_versions":">=0.2.0"}],"env_vars":null,"search_vec":"'0.2.1':14 'allow':42 'audit':19 'binari':49 'browser/node.js':46 'circom':1,3,26,51 'circuit':7,38,67 'client':36 'client-sid':35 'compil':5,27,39,43,68 'current':10 'differenti':41 'direct':44 'enabl':34 'experiment':57 'instead':31 'javascript':64 'key':40 'limit':58 'nativ':33,48 'note':56 'port':23 'pre':16 'pre-releas':15 'product':63 'recommend':61 'releas':17 'side':37 'stabl':11 'support':50 'syntax':55 'target':29 'test':59 'typescript':69 'v2.1.5':52 'v2.1.6':54 'version':12 'wasm':2,4,30 'webassembl':9 'without':47 'zkproof':65 'zksnark':6,66","created_at":"2026-06-04T18:48:53.895669+00:00","updated_at":"2026-06-04T18:48:53.895669+00:00","problems":[{"fix":"Install it: npm install circom_wasm. If using npm <7, ensure you have peer dependency 'circom' installed.","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'circom_wasm'"},{"fix":"Use a bundler/webpack or set type: 'module' in package.json. Alternatively, downgrade to CommonJS by using the .cjs extension.","cause":"Running a non-ESM environment that doesn't support import/export.","error":"SyntaxError: Unexpected token 'export'"},{"fix":"Use named import: import { compile } from 'circom_wasm';","cause":"Incorrect import: used default import for named export.","error":"TypeError: compile is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/ioedeveloper/circom_wasm","github":"https://github.com/ioedeveloper/circom_wasm","docs":null,"changelog":null,"pypi":null,"npm":"circom_wasm","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}