@noir-lang/noir_wasm 0.18.0-a01549b.nightly → 0.18.0-a098541.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/nodejs/noir_wasm.d.ts +48 -16
- package/nodejs/noir_wasm.js +25 -21
- package/nodejs/noir_wasm_bg.wasm +0 -0
- package/nodejs/noir_wasm_bg.wasm.d.ts +2 -2
- package/package.json +2 -2
- package/web/noir_wasm.d.ts +50 -18
- package/web/noir_wasm.js +25 -22
- package/web/noir_wasm_bg.wasm +0 -0
- package/web/noir_wasm_bg.wasm.d.ts +2 -2
package/nodejs/noir_wasm.d.ts
CHANGED
|
@@ -4,9 +4,17 @@
|
|
|
4
4
|
* @param {string} entry_point
|
|
5
5
|
* @param {boolean | undefined} contracts
|
|
6
6
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
7
|
+
* @returns {CompileResult}
|
|
8
|
+
*/
|
|
9
|
+
export function compile(entry_point: string, contracts?: boolean, dependency_graph?: DependencyGraph): CompileResult;
|
|
10
|
+
/**
|
|
11
|
+
* @param {string} level
|
|
12
|
+
*/
|
|
13
|
+
export function init_log_level(level: string): void;
|
|
14
|
+
/**
|
|
7
15
|
* @returns {any}
|
|
8
16
|
*/
|
|
9
|
-
export function
|
|
17
|
+
export function build_info(): any;
|
|
10
18
|
/**
|
|
11
19
|
* @param {Uint8Array} bytes
|
|
12
20
|
* @returns {any}
|
|
@@ -17,21 +25,6 @@ export function acir_read_bytes(bytes: Uint8Array): any;
|
|
|
17
25
|
* @returns {Uint8Array}
|
|
18
26
|
*/
|
|
19
27
|
export function acir_write_bytes(acir: any): Uint8Array;
|
|
20
|
-
/**
|
|
21
|
-
* @param {string} level
|
|
22
|
-
*/
|
|
23
|
-
export function init_log_level(level: string): void;
|
|
24
|
-
/**
|
|
25
|
-
* @returns {any}
|
|
26
|
-
*/
|
|
27
|
-
export function build_info(): any;
|
|
28
|
-
|
|
29
|
-
export type DependencyGraph = {
|
|
30
|
-
root_dependencies: readonly string[];
|
|
31
|
-
library_dependencies: Readonly<Record<string, readonly string[]>>;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
28
|
|
|
36
29
|
export type Diagnostic = {
|
|
37
30
|
message: string;
|
|
@@ -49,3 +42,42 @@ export interface CompileError extends Error {
|
|
|
49
42
|
}
|
|
50
43
|
|
|
51
44
|
|
|
45
|
+
|
|
46
|
+
export type DependencyGraph = {
|
|
47
|
+
root_dependencies: readonly string[];
|
|
48
|
+
library_dependencies: Readonly<Record<string, readonly string[]>>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type CompiledContract = {
|
|
52
|
+
noir_version: string;
|
|
53
|
+
name: string;
|
|
54
|
+
backend: string;
|
|
55
|
+
functions: Array<any>;
|
|
56
|
+
events: Array<any>;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export type CompiledProgram = {
|
|
60
|
+
noir_version: string;
|
|
61
|
+
backend: string;
|
|
62
|
+
abi: any;
|
|
63
|
+
bytecode: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type DebugArtifact = {
|
|
67
|
+
debug_symbols: Array<any>;
|
|
68
|
+
file_map: Record<number, any>;
|
|
69
|
+
warnings: Array<any>;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export type CompileResult = (
|
|
73
|
+
| {
|
|
74
|
+
contract: CompiledContract;
|
|
75
|
+
debug: DebugArtifact;
|
|
76
|
+
}
|
|
77
|
+
| {
|
|
78
|
+
program: CompiledProgram;
|
|
79
|
+
debug: DebugArtifact;
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
|
package/nodejs/noir_wasm.js
CHANGED
|
@@ -187,7 +187,7 @@ function debugString(val) {
|
|
|
187
187
|
* @param {string} entry_point
|
|
188
188
|
* @param {boolean | undefined} contracts
|
|
189
189
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
190
|
-
* @returns {
|
|
190
|
+
* @returns {CompileResult}
|
|
191
191
|
*/
|
|
192
192
|
module.exports.compile = function(entry_point, contracts, dependency_graph) {
|
|
193
193
|
try {
|
|
@@ -214,6 +214,22 @@ function handleError(f, args) {
|
|
|
214
214
|
wasm.__wbindgen_export_2(addHeapObject(e));
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* @param {string} level
|
|
219
|
+
*/
|
|
220
|
+
module.exports.init_log_level = function(level) {
|
|
221
|
+
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
222
|
+
const len0 = WASM_VECTOR_LEN;
|
|
223
|
+
wasm.init_log_level(ptr0, len0);
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @returns {any}
|
|
228
|
+
*/
|
|
229
|
+
module.exports.build_info = function() {
|
|
230
|
+
const ret = wasm.build_info();
|
|
231
|
+
return takeObject(ret);
|
|
232
|
+
};
|
|
217
233
|
|
|
218
234
|
function passArray8ToWasm0(arg, malloc) {
|
|
219
235
|
const ptr = malloc(arg.length * 1) >>> 0;
|
|
@@ -254,21 +270,9 @@ module.exports.acir_write_bytes = function(acir) {
|
|
|
254
270
|
}
|
|
255
271
|
};
|
|
256
272
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
module.exports.init_log_level = function(level) {
|
|
261
|
-
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
262
|
-
const len0 = WASM_VECTOR_LEN;
|
|
263
|
-
wasm.init_log_level(ptr0, len0);
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* @returns {any}
|
|
268
|
-
*/
|
|
269
|
-
module.exports.build_info = function() {
|
|
270
|
-
const ret = wasm.build_info();
|
|
271
|
-
return takeObject(ret);
|
|
273
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
274
|
+
const ret = getObject(arg0) === undefined;
|
|
275
|
+
return ret;
|
|
272
276
|
};
|
|
273
277
|
|
|
274
278
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
@@ -280,6 +284,11 @@ module.exports.__wbg_constructor_bc58db5a3b38f16c = function(arg0) {
|
|
|
280
284
|
return addHeapObject(ret);
|
|
281
285
|
};
|
|
282
286
|
|
|
287
|
+
module.exports.__wbg_constructor_e29c95824faa216c = function() {
|
|
288
|
+
const ret = new Object();
|
|
289
|
+
return addHeapObject(ret);
|
|
290
|
+
};
|
|
291
|
+
|
|
283
292
|
module.exports.__wbg_readfile_a8c4f775fbe0578e = function() { return handleError(function (arg0, arg1, arg2) {
|
|
284
293
|
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
285
294
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
@@ -288,11 +297,6 @@ module.exports.__wbg_readfile_a8c4f775fbe0578e = function() { return handleError
|
|
|
288
297
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
289
298
|
}, arguments) };
|
|
290
299
|
|
|
291
|
-
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
292
|
-
const ret = getObject(arg0) === undefined;
|
|
293
|
-
return ret;
|
|
294
|
-
};
|
|
295
|
-
|
|
296
300
|
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
297
301
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
298
302
|
return addHeapObject(ret);
|
package/nodejs/noir_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export function compile(a: number, b: number, c: number, d: number, e: number): void;
|
|
5
|
-
export function acir_read_bytes(a: number, b: number): number;
|
|
6
|
-
export function acir_write_bytes(a: number, b: number): void;
|
|
7
5
|
export function init_log_level(a: number, b: number): void;
|
|
8
6
|
export function build_info(): number;
|
|
7
|
+
export function acir_read_bytes(a: number, b: number): number;
|
|
8
|
+
export function acir_write_bytes(a: number, b: number): void;
|
|
9
9
|
export function __wbindgen_export_0(a: number): number;
|
|
10
10
|
export function __wbindgen_export_1(a: number, b: number, c: number): number;
|
|
11
11
|
export function __wbindgen_add_to_stack_pointer(a: number): number;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"collaborators": [
|
|
4
4
|
"The Noir Team <team@noir-lang.org>"
|
|
5
5
|
],
|
|
6
|
-
"version": "0.18.0-
|
|
6
|
+
"version": "0.18.0-a098541.nightly",
|
|
7
7
|
"license": "(MIT OR Apache-2.0)",
|
|
8
8
|
"main": "./nodejs/noir_wasm.js",
|
|
9
9
|
"types": "./web/noir_wasm.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"install:from:nix": "yarn clean && yarn build:nix && cp -rL ./result/noir_wasm/nodejs ./ && cp -rL ./result/noir_wasm/web ./"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@noir-lang/source-resolver": "0.18.0-
|
|
34
|
+
"@noir-lang/source-resolver": "0.18.0-a098541.nightly"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@esm-bundle/chai": "^4.3.4-fix.0",
|
package/web/noir_wasm.d.ts
CHANGED
|
@@ -4,9 +4,17 @@
|
|
|
4
4
|
* @param {string} entry_point
|
|
5
5
|
* @param {boolean | undefined} contracts
|
|
6
6
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
7
|
+
* @returns {CompileResult}
|
|
8
|
+
*/
|
|
9
|
+
export function compile(entry_point: string, contracts?: boolean, dependency_graph?: DependencyGraph): CompileResult;
|
|
10
|
+
/**
|
|
11
|
+
* @param {string} level
|
|
12
|
+
*/
|
|
13
|
+
export function init_log_level(level: string): void;
|
|
14
|
+
/**
|
|
7
15
|
* @returns {any}
|
|
8
16
|
*/
|
|
9
|
-
export function
|
|
17
|
+
export function build_info(): any;
|
|
10
18
|
/**
|
|
11
19
|
* @param {Uint8Array} bytes
|
|
12
20
|
* @returns {any}
|
|
@@ -17,21 +25,6 @@ export function acir_read_bytes(bytes: Uint8Array): any;
|
|
|
17
25
|
* @returns {Uint8Array}
|
|
18
26
|
*/
|
|
19
27
|
export function acir_write_bytes(acir: any): Uint8Array;
|
|
20
|
-
/**
|
|
21
|
-
* @param {string} level
|
|
22
|
-
*/
|
|
23
|
-
export function init_log_level(level: string): void;
|
|
24
|
-
/**
|
|
25
|
-
* @returns {any}
|
|
26
|
-
*/
|
|
27
|
-
export function build_info(): any;
|
|
28
|
-
|
|
29
|
-
export type DependencyGraph = {
|
|
30
|
-
root_dependencies: readonly string[];
|
|
31
|
-
library_dependencies: Readonly<Record<string, readonly string[]>>;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
28
|
|
|
36
29
|
export type Diagnostic = {
|
|
37
30
|
message: string;
|
|
@@ -50,15 +43,54 @@ export interface CompileError extends Error {
|
|
|
50
43
|
|
|
51
44
|
|
|
52
45
|
|
|
46
|
+
export type DependencyGraph = {
|
|
47
|
+
root_dependencies: readonly string[];
|
|
48
|
+
library_dependencies: Readonly<Record<string, readonly string[]>>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type CompiledContract = {
|
|
52
|
+
noir_version: string;
|
|
53
|
+
name: string;
|
|
54
|
+
backend: string;
|
|
55
|
+
functions: Array<any>;
|
|
56
|
+
events: Array<any>;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export type CompiledProgram = {
|
|
60
|
+
noir_version: string;
|
|
61
|
+
backend: string;
|
|
62
|
+
abi: any;
|
|
63
|
+
bytecode: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type DebugArtifact = {
|
|
67
|
+
debug_symbols: Array<any>;
|
|
68
|
+
file_map: Record<number, any>;
|
|
69
|
+
warnings: Array<any>;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export type CompileResult = (
|
|
73
|
+
| {
|
|
74
|
+
contract: CompiledContract;
|
|
75
|
+
debug: DebugArtifact;
|
|
76
|
+
}
|
|
77
|
+
| {
|
|
78
|
+
program: CompiledProgram;
|
|
79
|
+
debug: DebugArtifact;
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
53
85
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
54
86
|
|
|
55
87
|
export interface InitOutput {
|
|
56
88
|
readonly memory: WebAssembly.Memory;
|
|
57
89
|
readonly compile: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
58
|
-
readonly acir_read_bytes: (a: number, b: number) => number;
|
|
59
|
-
readonly acir_write_bytes: (a: number, b: number) => void;
|
|
60
90
|
readonly init_log_level: (a: number, b: number) => void;
|
|
61
91
|
readonly build_info: () => number;
|
|
92
|
+
readonly acir_read_bytes: (a: number, b: number) => number;
|
|
93
|
+
readonly acir_write_bytes: (a: number, b: number) => void;
|
|
62
94
|
readonly __wbindgen_export_0: (a: number) => number;
|
|
63
95
|
readonly __wbindgen_export_1: (a: number, b: number, c: number) => number;
|
|
64
96
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
package/web/noir_wasm.js
CHANGED
|
@@ -185,7 +185,7 @@ function debugString(val) {
|
|
|
185
185
|
* @param {string} entry_point
|
|
186
186
|
* @param {boolean | undefined} contracts
|
|
187
187
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
188
|
-
* @returns {
|
|
188
|
+
* @returns {CompileResult}
|
|
189
189
|
*/
|
|
190
190
|
export function compile(entry_point, contracts, dependency_graph) {
|
|
191
191
|
try {
|
|
@@ -212,6 +212,22 @@ function handleError(f, args) {
|
|
|
212
212
|
wasm.__wbindgen_export_2(addHeapObject(e));
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* @param {string} level
|
|
217
|
+
*/
|
|
218
|
+
export function init_log_level(level) {
|
|
219
|
+
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
220
|
+
const len0 = WASM_VECTOR_LEN;
|
|
221
|
+
wasm.init_log_level(ptr0, len0);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* @returns {any}
|
|
226
|
+
*/
|
|
227
|
+
export function build_info() {
|
|
228
|
+
const ret = wasm.build_info();
|
|
229
|
+
return takeObject(ret);
|
|
230
|
+
}
|
|
215
231
|
|
|
216
232
|
function passArray8ToWasm0(arg, malloc) {
|
|
217
233
|
const ptr = malloc(arg.length * 1) >>> 0;
|
|
@@ -252,23 +268,6 @@ export function acir_write_bytes(acir) {
|
|
|
252
268
|
}
|
|
253
269
|
}
|
|
254
270
|
|
|
255
|
-
/**
|
|
256
|
-
* @param {string} level
|
|
257
|
-
*/
|
|
258
|
-
export function init_log_level(level) {
|
|
259
|
-
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
260
|
-
const len0 = WASM_VECTOR_LEN;
|
|
261
|
-
wasm.init_log_level(ptr0, len0);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* @returns {any}
|
|
266
|
-
*/
|
|
267
|
-
export function build_info() {
|
|
268
|
-
const ret = wasm.build_info();
|
|
269
|
-
return takeObject(ret);
|
|
270
|
-
}
|
|
271
|
-
|
|
272
271
|
async function __wbg_load(module, imports) {
|
|
273
272
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
274
273
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
@@ -303,6 +302,10 @@ async function __wbg_load(module, imports) {
|
|
|
303
302
|
function __wbg_get_imports() {
|
|
304
303
|
const imports = {};
|
|
305
304
|
imports.wbg = {};
|
|
305
|
+
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
306
|
+
const ret = getObject(arg0) === undefined;
|
|
307
|
+
return ret;
|
|
308
|
+
};
|
|
306
309
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
307
310
|
takeObject(arg0);
|
|
308
311
|
};
|
|
@@ -310,6 +313,10 @@ function __wbg_get_imports() {
|
|
|
310
313
|
const ret = new Error(takeObject(arg0));
|
|
311
314
|
return addHeapObject(ret);
|
|
312
315
|
};
|
|
316
|
+
imports.wbg.__wbg_constructor_e29c95824faa216c = function() {
|
|
317
|
+
const ret = new Object();
|
|
318
|
+
return addHeapObject(ret);
|
|
319
|
+
};
|
|
313
320
|
imports.wbg.__wbg_readfile_a8c4f775fbe0578e = function() { return handleError(function (arg0, arg1, arg2) {
|
|
314
321
|
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
315
322
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
@@ -317,10 +324,6 @@ function __wbg_get_imports() {
|
|
|
317
324
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
318
325
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
319
326
|
}, arguments) };
|
|
320
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
321
|
-
const ret = getObject(arg0) === undefined;
|
|
322
|
-
return ret;
|
|
323
|
-
};
|
|
324
327
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
325
328
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
326
329
|
return addHeapObject(ret);
|
package/web/noir_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export function compile(a: number, b: number, c: number, d: number, e: number): void;
|
|
5
|
-
export function acir_read_bytes(a: number, b: number): number;
|
|
6
|
-
export function acir_write_bytes(a: number, b: number): void;
|
|
7
5
|
export function init_log_level(a: number, b: number): void;
|
|
8
6
|
export function build_info(): number;
|
|
7
|
+
export function acir_read_bytes(a: number, b: number): number;
|
|
8
|
+
export function acir_write_bytes(a: number, b: number): void;
|
|
9
9
|
export function __wbindgen_export_0(a: number): number;
|
|
10
10
|
export function __wbindgen_export_1(a: number, b: number, c: number): number;
|
|
11
11
|
export function __wbindgen_add_to_stack_pointer(a: number): number;
|