@noir-lang/noir_wasm 0.22.0-698d5fd.nightly → 0.22.0-eb566e2.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.
@@ -1,16 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * @param {Uint8Array} bytes
5
- * @returns {any}
6
- */
7
- export function acir_read_bytes(bytes: Uint8Array): any;
8
- /**
9
- * @param {any} acir
10
- * @returns {Uint8Array}
11
- */
12
- export function acir_write_bytes(acir: any): Uint8Array;
13
- /**
14
4
  * This is a method that exposes the same API as `compile`
15
5
  * But uses the Context based APi internally
16
6
  * @param {string} entry_point
@@ -21,14 +11,6 @@ export function acir_write_bytes(acir: any): Uint8Array;
21
11
  */
22
12
  export function compile_(entry_point: string, contracts: boolean | undefined, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): CompileResult;
23
13
  /**
24
- * @param {string} level
25
- */
26
- export function init_log_level(level: string): void;
27
- /**
28
- * @returns {any}
29
- */
30
- export function build_info(): any;
31
- /**
32
14
  * @param {string} entry_point
33
15
  * @param {boolean | undefined} contracts
34
16
  * @param {DependencyGraph | undefined} dependency_graph
@@ -36,6 +18,14 @@ export function build_info(): any;
36
18
  * @returns {CompileResult}
37
19
  */
38
20
  export function compile(entry_point: string, contracts: boolean | undefined, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): CompileResult;
21
+ /**
22
+ * @param {string} filter
23
+ */
24
+ export function init_log_level(filter: string): void;
25
+ /**
26
+ * @returns {any}
27
+ */
28
+ export function build_info(): any;
39
29
 
40
30
  export type Diagnostic = {
41
31
  message: string;
@@ -183,45 +183,6 @@ function debugString(val) {
183
183
  return className;
184
184
  }
185
185
 
186
- function passArray8ToWasm0(arg, malloc) {
187
- const ptr = malloc(arg.length * 1) >>> 0;
188
- getUint8Memory0().set(arg, ptr / 1);
189
- WASM_VECTOR_LEN = arg.length;
190
- return ptr;
191
- }
192
- /**
193
- * @param {Uint8Array} bytes
194
- * @returns {any}
195
- */
196
- module.exports.acir_read_bytes = function(bytes) {
197
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export_0);
198
- const len0 = WASM_VECTOR_LEN;
199
- const ret = wasm.acir_read_bytes(ptr0, len0);
200
- return takeObject(ret);
201
- };
202
-
203
- function getArrayU8FromWasm0(ptr, len) {
204
- ptr = ptr >>> 0;
205
- return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
206
- }
207
- /**
208
- * @param {any} acir
209
- * @returns {Uint8Array}
210
- */
211
- module.exports.acir_write_bytes = function(acir) {
212
- try {
213
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
214
- wasm.acir_write_bytes(retptr, addHeapObject(acir));
215
- var r0 = getInt32Memory0()[retptr / 4 + 0];
216
- var r1 = getInt32Memory0()[retptr / 4 + 1];
217
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
218
- wasm.__wbindgen_export_2(r0, r1 * 1);
219
- return v1;
220
- } finally {
221
- wasm.__wbindgen_add_to_stack_pointer(16);
222
- }
223
- };
224
-
225
186
  function _assertClass(instance, klass) {
226
187
  if (!(instance instanceof klass)) {
227
188
  throw new Error(`expected instance of ${klass.name}`);
@@ -257,23 +218,6 @@ module.exports.compile_ = function(entry_point, contracts, dependency_graph, fil
257
218
  }
258
219
  };
259
220
 
260
- /**
261
- * @param {string} level
262
- */
263
- module.exports.init_log_level = function(level) {
264
- const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
265
- const len0 = WASM_VECTOR_LEN;
266
- wasm.init_log_level(ptr0, len0);
267
- };
268
-
269
- /**
270
- * @returns {any}
271
- */
272
- module.exports.build_info = function() {
273
- const ret = wasm.build_info();
274
- return takeObject(ret);
275
- };
276
-
277
221
  /**
278
222
  * @param {string} entry_point
279
223
  * @param {boolean | undefined} contracts
@@ -301,6 +245,23 @@ module.exports.compile = function(entry_point, contracts, dependency_graph, file
301
245
  }
302
246
  };
303
247
 
248
+ /**
249
+ * @param {string} filter
250
+ */
251
+ module.exports.init_log_level = function(filter) {
252
+ const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
253
+ const len0 = WASM_VECTOR_LEN;
254
+ wasm.init_log_level(ptr0, len0);
255
+ };
256
+
257
+ /**
258
+ * @returns {any}
259
+ */
260
+ module.exports.build_info = function() {
261
+ const ret = wasm.build_info();
262
+ return takeObject(ret);
263
+ };
264
+
304
265
  function handleError(f, args) {
305
266
  try {
306
267
  return f.apply(this, args);
@@ -487,6 +448,11 @@ class PathToFileSourceMap {
487
448
  }
488
449
  module.exports.PathToFileSourceMap = PathToFileSourceMap;
489
450
 
451
+ module.exports.__wbindgen_is_undefined = function(arg0) {
452
+ const ret = getObject(arg0) === undefined;
453
+ return ret;
454
+ };
455
+
490
456
  module.exports.__wbindgen_object_drop_ref = function(arg0) {
491
457
  takeObject(arg0);
492
458
  };
@@ -496,21 +462,11 @@ module.exports.__wbg_constructor_a29cdb41a75eb0e8 = function(arg0) {
496
462
  return addHeapObject(ret);
497
463
  };
498
464
 
499
- module.exports.__wbindgen_is_undefined = function(arg0) {
500
- const ret = getObject(arg0) === undefined;
501
- return ret;
502
- };
503
-
504
465
  module.exports.__wbg_constructor_a3b5b211c5053ce8 = function() {
505
466
  const ret = new Object();
506
467
  return addHeapObject(ret);
507
468
  };
508
469
 
509
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
510
- const ret = getStringFromWasm0(arg0, arg1);
511
- return addHeapObject(ret);
512
- };
513
-
514
470
  module.exports.__wbg_new_abda76e883ba8a5f = function() {
515
471
  const ret = new Error();
516
472
  return addHeapObject(ret);
@@ -536,6 +492,15 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
536
492
  }
537
493
  };
538
494
 
495
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
496
+ const ret = getStringFromWasm0(arg0, arg1);
497
+ return addHeapObject(ret);
498
+ };
499
+
500
+ module.exports.__wbg_debug_e3f6a1578e6d45ca = function(arg0) {
501
+ console.debug(getObject(arg0));
502
+ };
503
+
539
504
  module.exports.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
540
505
  console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
541
506
  };
@@ -548,12 +513,16 @@ module.exports.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
548
513
  console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
549
514
  };
550
515
 
516
+ module.exports.__wbg_info_05db236d79f1b785 = function(arg0) {
517
+ console.info(getObject(arg0));
518
+ };
519
+
551
520
  module.exports.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
552
521
  console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
553
522
  };
554
523
 
555
- module.exports.__wbg_log_9b164efbe6db702f = function(arg0, arg1, arg2, arg3) {
556
- console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
524
+ module.exports.__wbg_warn_9bdd743e9f5fe1e0 = function(arg0) {
525
+ console.warn(getObject(arg0));
557
526
  };
558
527
 
559
528
  module.exports.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
Binary file
@@ -1,8 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export function acir_read_bytes(a: number, b: number): number;
5
- export function acir_write_bytes(a: number, b: number): void;
6
4
  export function __wbg_compilercontext_free(a: number): void;
7
5
  export function __wbg_crateid_free(a: number): void;
8
6
  export function compilercontext_new(a: number): number;
@@ -12,12 +10,12 @@ export function compilercontext_add_dependency_edge(a: number, b: number, c: num
12
10
  export function compilercontext_compile_program(a: number, b: number, c: number): void;
13
11
  export function compilercontext_compile_contract(a: number, b: number, c: number): void;
14
12
  export function compile_(a: number, b: number, c: number, d: number, e: number, f: number): void;
15
- export function init_log_level(a: number, b: number): void;
16
- export function build_info(): number;
17
13
  export function __wbg_pathtofilesourcemap_free(a: number): void;
18
14
  export function pathtofilesourcemap_new(): number;
19
15
  export function pathtofilesourcemap_add_source_code(a: number, b: number, c: number, d: number, e: number): number;
20
16
  export function compile(a: number, b: number, c: number, d: number, e: number, f: number): void;
17
+ export function init_log_level(a: number, b: number): void;
18
+ export function build_info(): number;
21
19
  export function __wbindgen_export_0(a: number): number;
22
20
  export function __wbindgen_export_1(a: number, b: number, c: number): number;
23
21
  export function __wbindgen_add_to_stack_pointer(a: number): number;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@noir-lang/noir_wasm",
3
- "collaborators": [
3
+ "contributors": [
4
4
  "The Noir Team <team@noir-lang.org>"
5
5
  ],
6
- "version": "0.22.0-698d5fd.nightly",
6
+ "version": "0.22.0-eb566e2.nightly",
7
7
  "license": "(MIT OR Apache-2.0)",
8
8
  "main": "./nodejs/noir_wasm.js",
9
9
  "types": "./web/noir_wasm.d.ts",
@@ -14,9 +14,14 @@
14
14
  "package.json"
15
15
  ],
16
16
  "sideEffects": false,
17
+ "homepage": "https://noir-lang.org/",
17
18
  "repository": {
18
- "type": "git",
19
- "url": "https://github.com/noir-lang/noir.git"
19
+ "url": "https://github.com/noir-lang/noir.git",
20
+ "directory": "compiler/wasm",
21
+ "type": "git"
22
+ },
23
+ "bugs": {
24
+ "url": "https://github.com/noir-lang/noir/issues"
20
25
  },
21
26
  "scripts": {
22
27
  "build": "bash ./build.sh",
@@ -1,16 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * @param {Uint8Array} bytes
5
- * @returns {any}
6
- */
7
- export function acir_read_bytes(bytes: Uint8Array): any;
8
- /**
9
- * @param {any} acir
10
- * @returns {Uint8Array}
11
- */
12
- export function acir_write_bytes(acir: any): Uint8Array;
13
- /**
14
4
  * This is a method that exposes the same API as `compile`
15
5
  * But uses the Context based APi internally
16
6
  * @param {string} entry_point
@@ -21,14 +11,6 @@ export function acir_write_bytes(acir: any): Uint8Array;
21
11
  */
22
12
  export function compile_(entry_point: string, contracts: boolean | undefined, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): CompileResult;
23
13
  /**
24
- * @param {string} level
25
- */
26
- export function init_log_level(level: string): void;
27
- /**
28
- * @returns {any}
29
- */
30
- export function build_info(): any;
31
- /**
32
14
  * @param {string} entry_point
33
15
  * @param {boolean | undefined} contracts
34
16
  * @param {DependencyGraph | undefined} dependency_graph
@@ -36,6 +18,14 @@ export function build_info(): any;
36
18
  * @returns {CompileResult}
37
19
  */
38
20
  export function compile(entry_point: string, contracts: boolean | undefined, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): CompileResult;
21
+ /**
22
+ * @param {string} filter
23
+ */
24
+ export function init_log_level(filter: string): void;
25
+ /**
26
+ * @returns {any}
27
+ */
28
+ export function build_info(): any;
39
29
 
40
30
  export type Diagnostic = {
41
31
  message: string;
@@ -152,8 +142,6 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
152
142
 
153
143
  export interface InitOutput {
154
144
  readonly memory: WebAssembly.Memory;
155
- readonly acir_read_bytes: (a: number, b: number) => number;
156
- readonly acir_write_bytes: (a: number, b: number) => void;
157
145
  readonly __wbg_compilercontext_free: (a: number) => void;
158
146
  readonly __wbg_crateid_free: (a: number) => void;
159
147
  readonly compilercontext_new: (a: number) => number;
@@ -163,12 +151,12 @@ export interface InitOutput {
163
151
  readonly compilercontext_compile_program: (a: number, b: number, c: number) => void;
164
152
  readonly compilercontext_compile_contract: (a: number, b: number, c: number) => void;
165
153
  readonly compile_: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
166
- readonly init_log_level: (a: number, b: number) => void;
167
- readonly build_info: () => number;
168
154
  readonly __wbg_pathtofilesourcemap_free: (a: number) => void;
169
155
  readonly pathtofilesourcemap_new: () => number;
170
156
  readonly pathtofilesourcemap_add_source_code: (a: number, b: number, c: number, d: number, e: number) => number;
171
157
  readonly compile: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
158
+ readonly init_log_level: (a: number, b: number) => void;
159
+ readonly build_info: () => number;
172
160
  readonly __wbindgen_export_0: (a: number) => number;
173
161
  readonly __wbindgen_export_1: (a: number, b: number, c: number) => number;
174
162
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
package/web/noir_wasm.js CHANGED
@@ -180,45 +180,6 @@ function debugString(val) {
180
180
  return className;
181
181
  }
182
182
 
183
- function passArray8ToWasm0(arg, malloc) {
184
- const ptr = malloc(arg.length * 1) >>> 0;
185
- getUint8Memory0().set(arg, ptr / 1);
186
- WASM_VECTOR_LEN = arg.length;
187
- return ptr;
188
- }
189
- /**
190
- * @param {Uint8Array} bytes
191
- * @returns {any}
192
- */
193
- export function acir_read_bytes(bytes) {
194
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export_0);
195
- const len0 = WASM_VECTOR_LEN;
196
- const ret = wasm.acir_read_bytes(ptr0, len0);
197
- return takeObject(ret);
198
- }
199
-
200
- function getArrayU8FromWasm0(ptr, len) {
201
- ptr = ptr >>> 0;
202
- return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
203
- }
204
- /**
205
- * @param {any} acir
206
- * @returns {Uint8Array}
207
- */
208
- export function acir_write_bytes(acir) {
209
- try {
210
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
211
- wasm.acir_write_bytes(retptr, addHeapObject(acir));
212
- var r0 = getInt32Memory0()[retptr / 4 + 0];
213
- var r1 = getInt32Memory0()[retptr / 4 + 1];
214
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
215
- wasm.__wbindgen_export_2(r0, r1 * 1);
216
- return v1;
217
- } finally {
218
- wasm.__wbindgen_add_to_stack_pointer(16);
219
- }
220
- }
221
-
222
183
  function _assertClass(instance, klass) {
223
184
  if (!(instance instanceof klass)) {
224
185
  throw new Error(`expected instance of ${klass.name}`);
@@ -254,23 +215,6 @@ export function compile_(entry_point, contracts, dependency_graph, file_source_m
254
215
  }
255
216
  }
256
217
 
257
- /**
258
- * @param {string} level
259
- */
260
- export function init_log_level(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
- export function build_info() {
270
- const ret = wasm.build_info();
271
- return takeObject(ret);
272
- }
273
-
274
218
  /**
275
219
  * @param {string} entry_point
276
220
  * @param {boolean | undefined} contracts
@@ -298,6 +242,23 @@ export function compile(entry_point, contracts, dependency_graph, file_source_ma
298
242
  }
299
243
  }
300
244
 
245
+ /**
246
+ * @param {string} filter
247
+ */
248
+ export function init_log_level(filter) {
249
+ const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
250
+ const len0 = WASM_VECTOR_LEN;
251
+ wasm.init_log_level(ptr0, len0);
252
+ }
253
+
254
+ /**
255
+ * @returns {any}
256
+ */
257
+ export function build_info() {
258
+ const ret = wasm.build_info();
259
+ return takeObject(ret);
260
+ }
261
+
301
262
  function handleError(f, args) {
302
263
  try {
303
264
  return f.apply(this, args);
@@ -515,6 +476,10 @@ async function __wbg_load(module, imports) {
515
476
  function __wbg_get_imports() {
516
477
  const imports = {};
517
478
  imports.wbg = {};
479
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
480
+ const ret = getObject(arg0) === undefined;
481
+ return ret;
482
+ };
518
483
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
519
484
  takeObject(arg0);
520
485
  };
@@ -522,18 +487,10 @@ function __wbg_get_imports() {
522
487
  const ret = new Error(takeObject(arg0));
523
488
  return addHeapObject(ret);
524
489
  };
525
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
526
- const ret = getObject(arg0) === undefined;
527
- return ret;
528
- };
529
490
  imports.wbg.__wbg_constructor_a3b5b211c5053ce8 = function() {
530
491
  const ret = new Object();
531
492
  return addHeapObject(ret);
532
493
  };
533
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
534
- const ret = getStringFromWasm0(arg0, arg1);
535
- return addHeapObject(ret);
536
- };
537
494
  imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
538
495
  const ret = new Error();
539
496
  return addHeapObject(ret);
@@ -556,6 +513,13 @@ function __wbg_get_imports() {
556
513
  wasm.__wbindgen_export_2(deferred0_0, deferred0_1);
557
514
  }
558
515
  };
516
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
517
+ const ret = getStringFromWasm0(arg0, arg1);
518
+ return addHeapObject(ret);
519
+ };
520
+ imports.wbg.__wbg_debug_e3f6a1578e6d45ca = function(arg0) {
521
+ console.debug(getObject(arg0));
522
+ };
559
523
  imports.wbg.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
560
524
  console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
561
525
  };
@@ -565,11 +529,14 @@ function __wbg_get_imports() {
565
529
  imports.wbg.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
566
530
  console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
567
531
  };
532
+ imports.wbg.__wbg_info_05db236d79f1b785 = function(arg0) {
533
+ console.info(getObject(arg0));
534
+ };
568
535
  imports.wbg.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
569
536
  console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
570
537
  };
571
- imports.wbg.__wbg_log_9b164efbe6db702f = function(arg0, arg1, arg2, arg3) {
572
- console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
538
+ imports.wbg.__wbg_warn_9bdd743e9f5fe1e0 = function(arg0) {
539
+ console.warn(getObject(arg0));
573
540
  };
574
541
  imports.wbg.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
575
542
  console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
Binary file
@@ -1,8 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export function acir_read_bytes(a: number, b: number): number;
5
- export function acir_write_bytes(a: number, b: number): void;
6
4
  export function __wbg_compilercontext_free(a: number): void;
7
5
  export function __wbg_crateid_free(a: number): void;
8
6
  export function compilercontext_new(a: number): number;
@@ -12,12 +10,12 @@ export function compilercontext_add_dependency_edge(a: number, b: number, c: num
12
10
  export function compilercontext_compile_program(a: number, b: number, c: number): void;
13
11
  export function compilercontext_compile_contract(a: number, b: number, c: number): void;
14
12
  export function compile_(a: number, b: number, c: number, d: number, e: number, f: number): void;
15
- export function init_log_level(a: number, b: number): void;
16
- export function build_info(): number;
17
13
  export function __wbg_pathtofilesourcemap_free(a: number): void;
18
14
  export function pathtofilesourcemap_new(): number;
19
15
  export function pathtofilesourcemap_add_source_code(a: number, b: number, c: number, d: number, e: number): number;
20
16
  export function compile(a: number, b: number, c: number, d: number, e: number, f: number): void;
17
+ export function init_log_level(a: number, b: number): void;
18
+ export function build_info(): number;
21
19
  export function __wbindgen_export_0(a: number): number;
22
20
  export function __wbindgen_export_1(a: number, b: number, c: number): number;
23
21
  export function __wbindgen_add_to_stack_pointer(a: number): number;