@noir-lang/noir_wasm
TypeScript icon, indicating that this package has built-in type declarations

0.39.0 • Public • Published

Noir Lang WASM JavaScript Package

This JavaScript package enables users to compile a Noir program, i.e. generating its artifacts, both in Node.JS environments and the browser.

The package also handles dependency management like how Nargo (Noir's CLI tool) operates, but the package is used just for compilation, not proving, verifying and simulating functions.

Usage

// Node.js

import { compile, createFileManager } from '@noir-lang/noir_wasm';

const fm = createFileManager(myProjectPath);
const myCompiledCode = await compile(fm);
// Browser

import { compile, createFileManager } from '@noir-lang/noir_wasm';

const fm = createFileManager('/');
for (const path of files) {
  await fm.writeFile(path, await getFileAsStream(path));
}
const myCompiledCode = await compile(fm);

Readme

Keywords

none

Package Sidebar

Install

npm i @noir-lang/noir_wasm

Weekly Downloads

511

Version

0.39.0

License

(MIT OR Apache-2.0)

Unpacked Size

26.9 MB

Total Files

30

Last publish

Collaborators

  • noir-lang