@noir-lang/noir_wasm 0.17.0-b8b7782.aztec → 0.18.0-1de0e6d.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,13 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * @param {string} entry_point
5
- * @param {boolean | undefined} contracts
6
- * @param {DependencyGraph | undefined} dependency_graph
7
- * @returns {any}
8
- */
9
- export function compile(entry_point: string, contracts?: boolean, dependency_graph?: DependencyGraph): any;
10
- /**
11
4
  * @param {Uint8Array} bytes
12
5
  * @returns {any}
13
6
  */
@@ -18,6 +11,13 @@ export function acir_read_bytes(bytes: Uint8Array): any;
18
11
  */
19
12
  export function acir_write_bytes(acir: any): Uint8Array;
20
13
  /**
14
+ * @param {string} entry_point
15
+ * @param {boolean | undefined} contracts
16
+ * @param {DependencyGraph | undefined} dependency_graph
17
+ * @returns {any}
18
+ */
19
+ export function compile(entry_point: string, contracts?: boolean, dependency_graph?: DependencyGraph): any;
20
+ /**
21
21
  * @param {string} level
22
22
  */
23
23
  export function init_log_level(level: string): void;
@@ -183,37 +183,6 @@ function debugString(val) {
183
183
  // TODO we could test for more things here, like `Set`s and `Map`s.
184
184
  return className;
185
185
  }
186
- /**
187
- * @param {string} entry_point
188
- * @param {boolean | undefined} contracts
189
- * @param {DependencyGraph | undefined} dependency_graph
190
- * @returns {any}
191
- */
192
- module.exports.compile = function(entry_point, contracts, dependency_graph) {
193
- try {
194
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
195
- const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
196
- const len0 = WASM_VECTOR_LEN;
197
- wasm.compile(retptr, ptr0, len0, isLikeNone(contracts) ? 0xFFFFFF : contracts ? 1 : 0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph));
198
- var r0 = getInt32Memory0()[retptr / 4 + 0];
199
- var r1 = getInt32Memory0()[retptr / 4 + 1];
200
- var r2 = getInt32Memory0()[retptr / 4 + 2];
201
- if (r2) {
202
- throw takeObject(r1);
203
- }
204
- return takeObject(r0);
205
- } finally {
206
- wasm.__wbindgen_add_to_stack_pointer(16);
207
- }
208
- };
209
-
210
- function handleError(f, args) {
211
- try {
212
- return f.apply(this, args);
213
- } catch (e) {
214
- wasm.__wbindgen_export_2(addHeapObject(e));
215
- }
216
- }
217
186
 
218
187
  function passArray8ToWasm0(arg, malloc) {
219
188
  const ptr = malloc(arg.length * 1) >>> 0;
@@ -247,13 +216,44 @@ module.exports.acir_write_bytes = function(acir) {
247
216
  var r0 = getInt32Memory0()[retptr / 4 + 0];
248
217
  var r1 = getInt32Memory0()[retptr / 4 + 1];
249
218
  var v1 = getArrayU8FromWasm0(r0, r1).slice();
250
- wasm.__wbindgen_export_3(r0, r1 * 1);
219
+ wasm.__wbindgen_export_2(r0, r1 * 1);
251
220
  return v1;
252
221
  } finally {
253
222
  wasm.__wbindgen_add_to_stack_pointer(16);
254
223
  }
255
224
  };
256
225
 
226
+ /**
227
+ * @param {string} entry_point
228
+ * @param {boolean | undefined} contracts
229
+ * @param {DependencyGraph | undefined} dependency_graph
230
+ * @returns {any}
231
+ */
232
+ module.exports.compile = function(entry_point, contracts, dependency_graph) {
233
+ try {
234
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
235
+ const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
236
+ const len0 = WASM_VECTOR_LEN;
237
+ wasm.compile(retptr, ptr0, len0, isLikeNone(contracts) ? 0xFFFFFF : contracts ? 1 : 0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph));
238
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
239
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
240
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
241
+ if (r2) {
242
+ throw takeObject(r1);
243
+ }
244
+ return takeObject(r0);
245
+ } finally {
246
+ wasm.__wbindgen_add_to_stack_pointer(16);
247
+ }
248
+ };
249
+
250
+ function handleError(f, args) {
251
+ try {
252
+ return f.apply(this, args);
253
+ } catch (e) {
254
+ wasm.__wbindgen_export_3(addHeapObject(e));
255
+ }
256
+ }
257
257
  /**
258
258
  * @param {string} level
259
259
  */
@@ -275,12 +275,17 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
275
275
  takeObject(arg0);
276
276
  };
277
277
 
278
- module.exports.__wbg_constructor_5ae64b4b6121edd9 = function(arg0) {
278
+ module.exports.__wbg_constructor_bc58db5a3b38f16c = function(arg0) {
279
279
  const ret = new Error(takeObject(arg0));
280
280
  return addHeapObject(ret);
281
281
  };
282
282
 
283
- module.exports.__wbg_readfile_db7d495e3e198483 = function() { return handleError(function (arg0, arg1, arg2) {
283
+ module.exports.__wbindgen_is_undefined = function(arg0) {
284
+ const ret = getObject(arg0) === undefined;
285
+ return ret;
286
+ };
287
+
288
+ module.exports.__wbg_readfile_a8c4f775fbe0578e = function() { return handleError(function (arg0, arg1, arg2) {
284
289
  const ret = read_file(getStringFromWasm0(arg1, arg2));
285
290
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
286
291
  const len1 = WASM_VECTOR_LEN;
@@ -288,11 +293,6 @@ module.exports.__wbg_readfile_db7d495e3e198483 = function() { return handleError
288
293
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
289
294
  }, arguments) };
290
295
 
291
- module.exports.__wbindgen_is_undefined = function(arg0) {
292
- const ret = getObject(arg0) === undefined;
293
- return ret;
294
- };
295
-
296
296
  module.exports.__wbindgen_string_new = function(arg0, arg1) {
297
297
  const ret = getStringFromWasm0(arg0, arg1);
298
298
  return addHeapObject(ret);
@@ -319,7 +319,7 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
319
319
  deferred0_1 = arg1;
320
320
  console.error(getStringFromWasm0(arg0, arg1));
321
321
  } finally {
322
- wasm.__wbindgen_export_3(deferred0_0, deferred0_1);
322
+ wasm.__wbindgen_export_2(deferred0_0, deferred0_1);
323
323
  }
324
324
  };
325
325
 
Binary file
@@ -1,13 +1,13 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export function compile(a: number, b: number, c: number, d: number, e: number): void;
5
4
  export function acir_read_bytes(a: number, b: number): number;
6
5
  export function acir_write_bytes(a: number, b: number): void;
6
+ export function compile(a: number, b: number, c: number, d: number, e: number): void;
7
7
  export function init_log_level(a: number, b: number): void;
8
8
  export function build_info(): number;
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;
12
- export function __wbindgen_export_2(a: number): void;
13
- export function __wbindgen_export_3(a: number, b: number): void;
12
+ export function __wbindgen_export_2(a: number, b: number): void;
13
+ export function __wbindgen_export_3(a: number): void;
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.17.0-b8b7782.aztec",
6
+ "version": "0.18.0-1de0e6d.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.17.0-b8b7782.aztec"
34
+ "@noir-lang/source-resolver": "0.18.0-1de0e6d.nightly"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@esm-bundle/chai": "^4.3.4-fix.0",
@@ -1,13 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * @param {string} entry_point
5
- * @param {boolean | undefined} contracts
6
- * @param {DependencyGraph | undefined} dependency_graph
7
- * @returns {any}
8
- */
9
- export function compile(entry_point: string, contracts?: boolean, dependency_graph?: DependencyGraph): any;
10
- /**
11
4
  * @param {Uint8Array} bytes
12
5
  * @returns {any}
13
6
  */
@@ -18,6 +11,13 @@ export function acir_read_bytes(bytes: Uint8Array): any;
18
11
  */
19
12
  export function acir_write_bytes(acir: any): Uint8Array;
20
13
  /**
14
+ * @param {string} entry_point
15
+ * @param {boolean | undefined} contracts
16
+ * @param {DependencyGraph | undefined} dependency_graph
17
+ * @returns {any}
18
+ */
19
+ export function compile(entry_point: string, contracts?: boolean, dependency_graph?: DependencyGraph): any;
20
+ /**
21
21
  * @param {string} level
22
22
  */
23
23
  export function init_log_level(level: string): void;
@@ -54,16 +54,16 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
54
54
 
55
55
  export interface InitOutput {
56
56
  readonly memory: WebAssembly.Memory;
57
- readonly compile: (a: number, b: number, c: number, d: number, e: number) => void;
58
57
  readonly acir_read_bytes: (a: number, b: number) => number;
59
58
  readonly acir_write_bytes: (a: number, b: number) => void;
59
+ readonly compile: (a: number, b: number, c: number, d: number, e: number) => void;
60
60
  readonly init_log_level: (a: number, b: number) => void;
61
61
  readonly build_info: () => number;
62
62
  readonly __wbindgen_export_0: (a: number) => number;
63
63
  readonly __wbindgen_export_1: (a: number, b: number, c: number) => number;
64
64
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
65
- readonly __wbindgen_export_2: (a: number) => void;
66
- readonly __wbindgen_export_3: (a: number, b: number) => void;
65
+ readonly __wbindgen_export_2: (a: number, b: number) => void;
66
+ readonly __wbindgen_export_3: (a: number) => void;
67
67
  }
68
68
 
69
69
  export type SyncInitInput = BufferSource | WebAssembly.Module;
package/web/noir_wasm.js CHANGED
@@ -181,37 +181,6 @@ function debugString(val) {
181
181
  // TODO we could test for more things here, like `Set`s and `Map`s.
182
182
  return className;
183
183
  }
184
- /**
185
- * @param {string} entry_point
186
- * @param {boolean | undefined} contracts
187
- * @param {DependencyGraph | undefined} dependency_graph
188
- * @returns {any}
189
- */
190
- export function compile(entry_point, contracts, dependency_graph) {
191
- try {
192
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
193
- const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
194
- const len0 = WASM_VECTOR_LEN;
195
- wasm.compile(retptr, ptr0, len0, isLikeNone(contracts) ? 0xFFFFFF : contracts ? 1 : 0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph));
196
- var r0 = getInt32Memory0()[retptr / 4 + 0];
197
- var r1 = getInt32Memory0()[retptr / 4 + 1];
198
- var r2 = getInt32Memory0()[retptr / 4 + 2];
199
- if (r2) {
200
- throw takeObject(r1);
201
- }
202
- return takeObject(r0);
203
- } finally {
204
- wasm.__wbindgen_add_to_stack_pointer(16);
205
- }
206
- }
207
-
208
- function handleError(f, args) {
209
- try {
210
- return f.apply(this, args);
211
- } catch (e) {
212
- wasm.__wbindgen_export_2(addHeapObject(e));
213
- }
214
- }
215
184
 
216
185
  function passArray8ToWasm0(arg, malloc) {
217
186
  const ptr = malloc(arg.length * 1) >>> 0;
@@ -245,13 +214,44 @@ export function acir_write_bytes(acir) {
245
214
  var r0 = getInt32Memory0()[retptr / 4 + 0];
246
215
  var r1 = getInt32Memory0()[retptr / 4 + 1];
247
216
  var v1 = getArrayU8FromWasm0(r0, r1).slice();
248
- wasm.__wbindgen_export_3(r0, r1 * 1);
217
+ wasm.__wbindgen_export_2(r0, r1 * 1);
249
218
  return v1;
250
219
  } finally {
251
220
  wasm.__wbindgen_add_to_stack_pointer(16);
252
221
  }
253
222
  }
254
223
 
224
+ /**
225
+ * @param {string} entry_point
226
+ * @param {boolean | undefined} contracts
227
+ * @param {DependencyGraph | undefined} dependency_graph
228
+ * @returns {any}
229
+ */
230
+ export function compile(entry_point, contracts, dependency_graph) {
231
+ try {
232
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
233
+ const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
234
+ const len0 = WASM_VECTOR_LEN;
235
+ wasm.compile(retptr, ptr0, len0, isLikeNone(contracts) ? 0xFFFFFF : contracts ? 1 : 0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph));
236
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
237
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
238
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
239
+ if (r2) {
240
+ throw takeObject(r1);
241
+ }
242
+ return takeObject(r0);
243
+ } finally {
244
+ wasm.__wbindgen_add_to_stack_pointer(16);
245
+ }
246
+ }
247
+
248
+ function handleError(f, args) {
249
+ try {
250
+ return f.apply(this, args);
251
+ } catch (e) {
252
+ wasm.__wbindgen_export_3(addHeapObject(e));
253
+ }
254
+ }
255
255
  /**
256
256
  * @param {string} level
257
257
  */
@@ -306,21 +306,21 @@ function __wbg_get_imports() {
306
306
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
307
307
  takeObject(arg0);
308
308
  };
309
- imports.wbg.__wbg_constructor_5ae64b4b6121edd9 = function(arg0) {
309
+ imports.wbg.__wbg_constructor_bc58db5a3b38f16c = function(arg0) {
310
310
  const ret = new Error(takeObject(arg0));
311
311
  return addHeapObject(ret);
312
312
  };
313
- imports.wbg.__wbg_readfile_db7d495e3e198483 = function() { return handleError(function (arg0, arg1, arg2) {
313
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
314
+ const ret = getObject(arg0) === undefined;
315
+ return ret;
316
+ };
317
+ imports.wbg.__wbg_readfile_a8c4f775fbe0578e = function() { return handleError(function (arg0, arg1, arg2) {
314
318
  const ret = read_file(getStringFromWasm0(arg1, arg2));
315
319
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
316
320
  const len1 = WASM_VECTOR_LEN;
317
321
  getInt32Memory0()[arg0 / 4 + 1] = len1;
318
322
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
319
323
  }, arguments) };
320
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
321
- const ret = getObject(arg0) === undefined;
322
- return ret;
323
- };
324
324
  imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
325
325
  const ret = getStringFromWasm0(arg0, arg1);
326
326
  return addHeapObject(ret);
@@ -344,7 +344,7 @@ function __wbg_get_imports() {
344
344
  deferred0_1 = arg1;
345
345
  console.error(getStringFromWasm0(arg0, arg1));
346
346
  } finally {
347
- wasm.__wbindgen_export_3(deferred0_0, deferred0_1);
347
+ wasm.__wbindgen_export_2(deferred0_0, deferred0_1);
348
348
  }
349
349
  };
350
350
  imports.wbg.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
Binary file
@@ -1,13 +1,13 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export function compile(a: number, b: number, c: number, d: number, e: number): void;
5
4
  export function acir_read_bytes(a: number, b: number): number;
6
5
  export function acir_write_bytes(a: number, b: number): void;
6
+ export function compile(a: number, b: number, c: number, d: number, e: number): void;
7
7
  export function init_log_level(a: number, b: number): void;
8
8
  export function build_info(): number;
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;
12
- export function __wbindgen_export_2(a: number): void;
13
- export function __wbindgen_export_3(a: number, b: number): void;
12
+ export function __wbindgen_export_2(a: number, b: number): void;
13
+ export function __wbindgen_export_3(a: number): void;