@noir-lang/noir_wasm 0.22.0-57eae42.nightly → 0.22.0-5be049e.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.
@@ -11,9 +11,9 @@
11
11
  */
12
12
  export function compile_(entry_point: string, contracts: boolean | undefined, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): CompileResult;
13
13
  /**
14
- * @param {string} level
14
+ * @param {string} filter
15
15
  */
16
- export function init_log_level(level: string): void;
16
+ export function init_log_level(filter: string): void;
17
17
  /**
18
18
  * @returns {any}
19
19
  */
@@ -219,10 +219,10 @@ module.exports.compile_ = function(entry_point, contracts, dependency_graph, fil
219
219
  };
220
220
 
221
221
  /**
222
- * @param {string} level
222
+ * @param {string} filter
223
223
  */
224
- module.exports.init_log_level = function(level) {
225
- const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
224
+ module.exports.init_log_level = function(filter) {
225
+ const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
226
226
  const len0 = WASM_VECTOR_LEN;
227
227
  wasm.init_log_level(ptr0, len0);
228
228
  };
@@ -330,11 +330,21 @@ class CompilerContext {
330
330
  * @param {CrateId} to
331
331
  */
332
332
  add_dependency_edge(crate_name, from, to) {
333
- const ptr0 = passStringToWasm0(crate_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
334
- const len0 = WASM_VECTOR_LEN;
335
- _assertClass(from, CrateId);
336
- _assertClass(to, CrateId);
337
- wasm.compilercontext_add_dependency_edge(this.__wbg_ptr, ptr0, len0, from.__wbg_ptr, to.__wbg_ptr);
333
+ try {
334
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
335
+ const ptr0 = passStringToWasm0(crate_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
336
+ const len0 = WASM_VECTOR_LEN;
337
+ _assertClass(from, CrateId);
338
+ _assertClass(to, CrateId);
339
+ wasm.compilercontext_add_dependency_edge(retptr, this.__wbg_ptr, ptr0, len0, from.__wbg_ptr, to.__wbg_ptr);
340
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
341
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
342
+ if (r1) {
343
+ throw takeObject(r0);
344
+ }
345
+ } finally {
346
+ wasm.__wbindgen_add_to_stack_pointer(16);
347
+ }
338
348
  }
339
349
  /**
340
350
  * @param {number} program_width
@@ -467,11 +477,6 @@ module.exports.__wbindgen_is_undefined = function(arg0) {
467
477
  return ret;
468
478
  };
469
479
 
470
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
471
- const ret = getStringFromWasm0(arg0, arg1);
472
- return addHeapObject(ret);
473
- };
474
-
475
480
  module.exports.__wbg_new_abda76e883ba8a5f = function() {
476
481
  const ret = new Error();
477
482
  return addHeapObject(ret);
@@ -497,6 +502,15 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
497
502
  }
498
503
  };
499
504
 
505
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
506
+ const ret = getStringFromWasm0(arg0, arg1);
507
+ return addHeapObject(ret);
508
+ };
509
+
510
+ module.exports.__wbg_debug_e3f6a1578e6d45ca = function(arg0) {
511
+ console.debug(getObject(arg0));
512
+ };
513
+
500
514
  module.exports.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
501
515
  console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
502
516
  };
@@ -509,12 +523,16 @@ module.exports.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
509
523
  console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
510
524
  };
511
525
 
526
+ module.exports.__wbg_info_05db236d79f1b785 = function(arg0) {
527
+ console.info(getObject(arg0));
528
+ };
529
+
512
530
  module.exports.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
513
531
  console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
514
532
  };
515
533
 
516
- module.exports.__wbg_log_9b164efbe6db702f = function(arg0, arg1, arg2, arg3) {
517
- console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
534
+ module.exports.__wbg_warn_9bdd743e9f5fe1e0 = function(arg0) {
535
+ console.warn(getObject(arg0));
518
536
  };
519
537
 
520
538
  module.exports.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
Binary file
@@ -6,7 +6,7 @@ export function __wbg_crateid_free(a: number): void;
6
6
  export function compilercontext_new(a: number): number;
7
7
  export function compilercontext_process_root_crate(a: number, b: number, c: number): number;
8
8
  export function compilercontext_process_dependency_crate(a: number, b: number, c: number): number;
9
- export function compilercontext_add_dependency_edge(a: number, b: number, c: number, d: number, e: number): void;
9
+ export function compilercontext_add_dependency_edge(a: number, b: number, c: number, d: number, e: number, f: number): void;
10
10
  export function compilercontext_compile_program(a: number, b: number, c: number): void;
11
11
  export function compilercontext_compile_contract(a: number, b: number, c: number): void;
12
12
  export function compile_(a: number, b: number, c: number, d: number, e: number, f: number): void;
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-57eae42.nightly",
6
+ "version": "0.22.0-5be049e.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",
@@ -11,9 +11,9 @@
11
11
  */
12
12
  export function compile_(entry_point: string, contracts: boolean | undefined, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): CompileResult;
13
13
  /**
14
- * @param {string} level
14
+ * @param {string} filter
15
15
  */
16
- export function init_log_level(level: string): void;
16
+ export function init_log_level(filter: string): void;
17
17
  /**
18
18
  * @returns {any}
19
19
  */
@@ -147,7 +147,7 @@ export interface InitOutput {
147
147
  readonly compilercontext_new: (a: number) => number;
148
148
  readonly compilercontext_process_root_crate: (a: number, b: number, c: number) => number;
149
149
  readonly compilercontext_process_dependency_crate: (a: number, b: number, c: number) => number;
150
- readonly compilercontext_add_dependency_edge: (a: number, b: number, c: number, d: number, e: number) => void;
150
+ readonly compilercontext_add_dependency_edge: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
151
151
  readonly compilercontext_compile_program: (a: number, b: number, c: number) => void;
152
152
  readonly compilercontext_compile_contract: (a: number, b: number, c: number) => void;
153
153
  readonly compile_: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
package/web/noir_wasm.js CHANGED
@@ -216,10 +216,10 @@ export function compile_(entry_point, contracts, dependency_graph, file_source_m
216
216
  }
217
217
 
218
218
  /**
219
- * @param {string} level
219
+ * @param {string} filter
220
220
  */
221
- export function init_log_level(level) {
222
- const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
221
+ export function init_log_level(filter) {
222
+ const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
223
223
  const len0 = WASM_VECTOR_LEN;
224
224
  wasm.init_log_level(ptr0, len0);
225
225
  }
@@ -327,11 +327,21 @@ export class CompilerContext {
327
327
  * @param {CrateId} to
328
328
  */
329
329
  add_dependency_edge(crate_name, from, to) {
330
- const ptr0 = passStringToWasm0(crate_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
331
- const len0 = WASM_VECTOR_LEN;
332
- _assertClass(from, CrateId);
333
- _assertClass(to, CrateId);
334
- wasm.compilercontext_add_dependency_edge(this.__wbg_ptr, ptr0, len0, from.__wbg_ptr, to.__wbg_ptr);
330
+ try {
331
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
332
+ const ptr0 = passStringToWasm0(crate_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
333
+ const len0 = WASM_VECTOR_LEN;
334
+ _assertClass(from, CrateId);
335
+ _assertClass(to, CrateId);
336
+ wasm.compilercontext_add_dependency_edge(retptr, this.__wbg_ptr, ptr0, len0, from.__wbg_ptr, to.__wbg_ptr);
337
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
338
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
339
+ if (r1) {
340
+ throw takeObject(r0);
341
+ }
342
+ } finally {
343
+ wasm.__wbindgen_add_to_stack_pointer(16);
344
+ }
335
345
  }
336
346
  /**
337
347
  * @param {number} program_width
@@ -491,10 +501,6 @@ function __wbg_get_imports() {
491
501
  const ret = getObject(arg0) === undefined;
492
502
  return ret;
493
503
  };
494
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
495
- const ret = getStringFromWasm0(arg0, arg1);
496
- return addHeapObject(ret);
497
- };
498
504
  imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
499
505
  const ret = new Error();
500
506
  return addHeapObject(ret);
@@ -517,6 +523,13 @@ function __wbg_get_imports() {
517
523
  wasm.__wbindgen_export_2(deferred0_0, deferred0_1);
518
524
  }
519
525
  };
526
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
527
+ const ret = getStringFromWasm0(arg0, arg1);
528
+ return addHeapObject(ret);
529
+ };
530
+ imports.wbg.__wbg_debug_e3f6a1578e6d45ca = function(arg0) {
531
+ console.debug(getObject(arg0));
532
+ };
520
533
  imports.wbg.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
521
534
  console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
522
535
  };
@@ -526,11 +539,14 @@ function __wbg_get_imports() {
526
539
  imports.wbg.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
527
540
  console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
528
541
  };
542
+ imports.wbg.__wbg_info_05db236d79f1b785 = function(arg0) {
543
+ console.info(getObject(arg0));
544
+ };
529
545
  imports.wbg.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
530
546
  console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
531
547
  };
532
- imports.wbg.__wbg_log_9b164efbe6db702f = function(arg0, arg1, arg2, arg3) {
533
- console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
548
+ imports.wbg.__wbg_warn_9bdd743e9f5fe1e0 = function(arg0) {
549
+ console.warn(getObject(arg0));
534
550
  };
535
551
  imports.wbg.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
536
552
  console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
Binary file
@@ -6,7 +6,7 @@ export function __wbg_crateid_free(a: number): void;
6
6
  export function compilercontext_new(a: number): number;
7
7
  export function compilercontext_process_root_crate(a: number, b: number, c: number): number;
8
8
  export function compilercontext_process_dependency_crate(a: number, b: number, c: number): number;
9
- export function compilercontext_add_dependency_edge(a: number, b: number, c: number, d: number, e: number): void;
9
+ export function compilercontext_add_dependency_edge(a: number, b: number, c: number, d: number, e: number, f: number): void;
10
10
  export function compilercontext_compile_program(a: number, b: number, c: number): void;
11
11
  export function compilercontext_compile_contract(a: number, b: number, c: number): void;
12
12
  export function compile_(a: number, b: number, c: number, d: number, e: number, f: number): void;