@noir-lang/noir_wasm 0.23.0-f466fa1.nightly → 0.24.0-a7cc16b.nightly
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -1
- package/build/cjs/package.json +1 -1
- package/build/esm/package.json +1 -1
- package/dist/node/index_bg.wasm +0 -0
- package/dist/node/main.js +76 -43
- package/dist/node/main.js.map +1 -1
- package/dist/types/build/cjs/index.d.ts +4 -4
- package/dist/types/build/esm/index.d.ts +4 -4
- package/dist/types/src/index.d.cts +30 -0
- package/dist/types/src/index.d.mts +30 -0
- package/dist/types/src/noir/debug.d.ts +4 -1
- package/dist/types/src/noir/file-manager/nodejs-file-manager.d.ts +3 -2
- package/dist/types/src/types/noir_artifact.d.ts +1 -1
- package/dist/web/main.mjs +76 -43
- package/dist/web/main.mjs.map +1 -1
- package/package.json +5 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export function compile(entry_point: string, contracts: boolean | undefined, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): CompileResult;
|
|
2
1
|
export function compile_(entry_point: string, contracts: boolean | undefined, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): CompileResult;
|
|
2
|
+
export function compile(entry_point: string, contracts: boolean | undefined, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): CompileResult;
|
|
3
3
|
export function init_log_level(filter: string): void;
|
|
4
4
|
export function build_info(): any;
|
|
5
|
-
export function __wbindgen_object_drop_ref(arg0: any): void;
|
|
6
|
-
export function __wbg_constructor_28ca684b2f9696ac(...args: any[]): any;
|
|
7
5
|
export function __wbindgen_is_undefined(arg0: any): boolean;
|
|
8
|
-
export function
|
|
6
|
+
export function __wbindgen_object_drop_ref(arg0: any): void;
|
|
7
|
+
export function __wbg_constructor_05d6d198f3477d6f(...args: any[]): any;
|
|
8
|
+
export function __wbg_constructor_e8767839abf8a966(...args: any[]): any;
|
|
9
9
|
export function __wbg_new_abda76e883ba8a5f(...args: any[]): any;
|
|
10
10
|
export function __wbg_stack_658279fe44541cf6(...args: any[]): any;
|
|
11
11
|
export function __wbg_error_f851667af71bcfc6(...args: any[]): any;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* This is a method that exposes the same API as `compile`
|
|
3
|
+
* But uses the Context based APi internally
|
|
2
4
|
* @param {string} entry_point
|
|
3
5
|
* @param {boolean | undefined} contracts
|
|
4
6
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
5
7
|
* @param {PathToFileSourceMap} file_source_map
|
|
6
8
|
* @returns {CompileResult}
|
|
7
9
|
*/
|
|
8
|
-
export function
|
|
10
|
+
export function compile_(entry_point: string, contracts: boolean | undefined, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): CompileResult;
|
|
9
11
|
/**
|
|
10
|
-
* This is a method that exposes the same API as `compile`
|
|
11
|
-
* But uses the Context based APi internally
|
|
12
12
|
* @param {string} entry_point
|
|
13
13
|
* @param {boolean | undefined} contracts
|
|
14
14
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
15
15
|
* @param {PathToFileSourceMap} file_source_map
|
|
16
16
|
* @returns {CompileResult}
|
|
17
17
|
*/
|
|
18
|
-
export function
|
|
18
|
+
export function compile(entry_point: string, contracts: boolean | undefined, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): CompileResult;
|
|
19
19
|
/**
|
|
20
20
|
* @param {string} filter
|
|
21
21
|
*/
|
|
@@ -3,6 +3,36 @@ import { createNodejsFileManager } from './noir/file-manager/nodejs-file-manager
|
|
|
3
3
|
import { LogFn } from './utils';
|
|
4
4
|
import { CompilationResult } from './types/noir_artifact';
|
|
5
5
|
import { inflateDebugSymbols } from './noir/debug';
|
|
6
|
+
/**
|
|
7
|
+
* Compiles a Noir project
|
|
8
|
+
*
|
|
9
|
+
* @param fileManager - The file manager to use
|
|
10
|
+
* @param projectPath - The path to the project inside the file manager. Defaults to the root of the file manager
|
|
11
|
+
* @param logFn - A logging function. If not provided, console.log will be used
|
|
12
|
+
* @param debugLogFn - A debug logging function. If not provided, logFn will be used
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* // Node.js
|
|
17
|
+
*
|
|
18
|
+
* import { compile, createFileManager } from '@noir-lang/noir_wasm';
|
|
19
|
+
*
|
|
20
|
+
* const fm = createFileManager(myProjectPath);
|
|
21
|
+
* const myCompiledCode = await compile(fm);
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* ```typescript
|
|
25
|
+
* // Browser
|
|
26
|
+
*
|
|
27
|
+
* import { compile, createFileManager } from '@noir-lang/noir_wasm';
|
|
28
|
+
*
|
|
29
|
+
* const fm = createFileManager('/');
|
|
30
|
+
* for (const path of files) {
|
|
31
|
+
* await fm.writeFile(path, await getFileAsStream(path));
|
|
32
|
+
* }
|
|
33
|
+
* const myCompiledCode = await compile(fm);
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
6
36
|
declare function compile(fileManager: FileManager, projectPath?: string, logFn?: LogFn, debugLogFn?: LogFn): Promise<CompilationResult>;
|
|
7
37
|
declare const createFileManager: typeof createNodejsFileManager;
|
|
8
38
|
export { compile, createFileManager, inflateDebugSymbols, CompilationResult };
|
|
@@ -3,6 +3,36 @@ import { createNodejsFileManager } from './noir/file-manager/nodejs-file-manager
|
|
|
3
3
|
import { LogFn } from './utils';
|
|
4
4
|
import { CompilationResult } from './types/noir_artifact';
|
|
5
5
|
import { inflateDebugSymbols } from './noir/debug';
|
|
6
|
+
/**
|
|
7
|
+
* Compiles a Noir project
|
|
8
|
+
*
|
|
9
|
+
* @param fileManager - The file manager to use
|
|
10
|
+
* @param projectPath - The path to the project inside the file manager. Defaults to the root of the file manager
|
|
11
|
+
* @param logFn - A logging function. If not provided, console.log will be used
|
|
12
|
+
* @param debugLogFn - A debug logging function. If not provided, logFn will be used
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* // Node.js
|
|
17
|
+
*
|
|
18
|
+
* import { compile, createFileManager } from '@noir-lang/noir_wasm';
|
|
19
|
+
*
|
|
20
|
+
* const fm = createFileManager(myProjectPath);
|
|
21
|
+
* const myCompiledCode = await compile(fm);
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* ```typescript
|
|
25
|
+
* // Browser
|
|
26
|
+
*
|
|
27
|
+
* import { compile, createFileManager } from '@noir-lang/noir_wasm';
|
|
28
|
+
*
|
|
29
|
+
* const fm = createFileManager('/');
|
|
30
|
+
* for (const path of files) {
|
|
31
|
+
* await fm.writeFile(path, await getFileAsStream(path));
|
|
32
|
+
* }
|
|
33
|
+
* const myCompiledCode = await compile(fm);
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
6
36
|
declare function compile(fileManager: FileManager, projectPath?: string, logFn?: LogFn, debugLogFn?: LogFn): Promise<CompilationResult>;
|
|
7
37
|
declare const createFileManager: typeof createNodejsFileManager;
|
|
8
38
|
export { compile, createFileManager, inflateDebugSymbols, CompilationResult };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { FileManager } from './file-manager';
|
|
2
2
|
export declare function readdirRecursive(dir: string): Promise<string[]>;
|
|
3
3
|
/**
|
|
4
|
-
* Creates a new FileManager instance based on
|
|
5
|
-
*
|
|
4
|
+
* Creates a new FileManager instance based on fs in node and memfs in the browser (via webpack alias)
|
|
5
|
+
*
|
|
6
|
+
* @param dataDir - root of the file system
|
|
6
7
|
*/
|
|
7
8
|
export declare function createNodejsFileManager(dataDir: string): FileManager;
|