@noir-lang/noir_wasm 0.18.0-3919619.aztec → 0.18.0-778e620.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,6 +1,13 @@
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
+ /**
4
11
  * @param {Uint8Array} bytes
5
12
  * @returns {any}
6
13
  */
@@ -11,13 +18,6 @@ export function acir_read_bytes(bytes: Uint8Array): any;
11
18
  */
12
19
  export function acir_write_bytes(acir: any): Uint8Array;
13
20
  /**
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;
@@ -26,6 +26,13 @@ export function init_log_level(level: string): void;
26
26
  */
27
27
  export function build_info(): any;
28
28
 
29
+ export type DependencyGraph = {
30
+ root_dependencies: readonly string[];
31
+ library_dependencies: Readonly<Record<string, readonly string[]>>;
32
+ }
33
+
34
+
35
+
29
36
  export type Diagnostic = {
30
37
  message: string;
31
38
  file: string;
@@ -42,10 +49,3 @@ export interface CompileError extends Error {
42
49
  }
43
50
 
44
51
 
45
-
46
- export type DependencyGraph = {
47
- root_dependencies: readonly string[];
48
- library_dependencies: Readonly<Record<string, readonly string[]>>;
49
- }
50
-
51
-
@@ -183,6 +183,37 @@ 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
+ }
186
217
 
187
218
  function passArray8ToWasm0(arg, malloc) {
188
219
  const ptr = malloc(arg.length * 1) >>> 0;
@@ -216,44 +247,13 @@ module.exports.acir_write_bytes = function(acir) {
216
247
  var r0 = getInt32Memory0()[retptr / 4 + 0];
217
248
  var r1 = getInt32Memory0()[retptr / 4 + 1];
218
249
  var v1 = getArrayU8FromWasm0(r0, r1).slice();
219
- wasm.__wbindgen_export_2(r0, r1 * 1);
250
+ wasm.__wbindgen_export_3(r0, r1 * 1);
220
251
  return v1;
221
252
  } finally {
222
253
  wasm.__wbindgen_add_to_stack_pointer(16);
223
254
  }
224
255
  };
225
256
 
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
  */
@@ -280,11 +280,6 @@ module.exports.__wbg_constructor_bc58db5a3b38f16c = function(arg0) {
280
280
  return addHeapObject(ret);
281
281
  };
282
282
 
283
- module.exports.__wbindgen_is_undefined = function(arg0) {
284
- const ret = getObject(arg0) === undefined;
285
- return ret;
286
- };
287
-
288
283
  module.exports.__wbg_readfile_a8c4f775fbe0578e = function() { return handleError(function (arg0, arg1, arg2) {
289
284
  const ret = read_file(getStringFromWasm0(arg1, arg2));
290
285
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
@@ -293,6 +288,11 @@ module.exports.__wbg_readfile_a8c4f775fbe0578e = function() { return handleError
293
288
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
294
289
  }, arguments) };
295
290
 
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_2(deferred0_0, deferred0_1);
322
+ wasm.__wbindgen_export_3(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;
4
5
  export function acir_read_bytes(a: number, b: number): number;
5
6
  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, b: number): void;
13
- export function __wbindgen_export_3(a: number): void;
12
+ export function __wbindgen_export_2(a: number): void;
13
+ export function __wbindgen_export_3(a: number, b: 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.18.0-3919619.aztec",
6
+ "version": "0.18.0-778e620.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-3919619.aztec"
34
+ "@noir-lang/source-resolver": "0.18.0-778e620.nightly"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@esm-bundle/chai": "^4.3.4-fix.0",
@@ -1,6 +1,13 @@
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
+ /**
4
11
  * @param {Uint8Array} bytes
5
12
  * @returns {any}
6
13
  */
@@ -11,13 +18,6 @@ export function acir_read_bytes(bytes: Uint8Array): any;
11
18
  */
12
19
  export function acir_write_bytes(acir: any): Uint8Array;
13
20
  /**
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;
@@ -26,6 +26,13 @@ export function init_log_level(level: string): void;
26
26
  */
27
27
  export function build_info(): any;
28
28
 
29
+ export type DependencyGraph = {
30
+ root_dependencies: readonly string[];
31
+ library_dependencies: Readonly<Record<string, readonly string[]>>;
32
+ }
33
+
34
+
35
+
29
36
  export type Diagnostic = {
30
37
  message: string;
31
38
  file: string;
@@ -43,27 +50,20 @@ export interface CompileError extends Error {
43
50
 
44
51
 
45
52
 
46
- export type DependencyGraph = {
47
- root_dependencies: readonly string[];
48
- library_dependencies: Readonly<Record<string, readonly string[]>>;
49
- }
50
-
51
-
52
-
53
53
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
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;
57
58
  readonly acir_read_bytes: (a: number, b: number) => number;
58
59
  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, b: number) => void;
66
- readonly __wbindgen_export_3: (a: number) => void;
65
+ readonly __wbindgen_export_2: (a: number) => void;
66
+ readonly __wbindgen_export_3: (a: number, b: number) => void;
67
67
  }
68
68
 
69
69
  export type SyncInitInput = BufferSource | WebAssembly.Module;
package/web/noir_wasm.js CHANGED
@@ -181,6 +181,37 @@ 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
+ }
184
215
 
185
216
  function passArray8ToWasm0(arg, malloc) {
186
217
  const ptr = malloc(arg.length * 1) >>> 0;
@@ -214,44 +245,13 @@ export function acir_write_bytes(acir) {
214
245
  var r0 = getInt32Memory0()[retptr / 4 + 0];
215
246
  var r1 = getInt32Memory0()[retptr / 4 + 1];
216
247
  var v1 = getArrayU8FromWasm0(r0, r1).slice();
217
- wasm.__wbindgen_export_2(r0, r1 * 1);
248
+ wasm.__wbindgen_export_3(r0, r1 * 1);
218
249
  return v1;
219
250
  } finally {
220
251
  wasm.__wbindgen_add_to_stack_pointer(16);
221
252
  }
222
253
  }
223
254
 
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
  */
@@ -310,10 +310,6 @@ function __wbg_get_imports() {
310
310
  const ret = new Error(takeObject(arg0));
311
311
  return addHeapObject(ret);
312
312
  };
313
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
314
- const ret = getObject(arg0) === undefined;
315
- return ret;
316
- };
317
313
  imports.wbg.__wbg_readfile_a8c4f775fbe0578e = function() { return handleError(function (arg0, arg1, arg2) {
318
314
  const ret = read_file(getStringFromWasm0(arg1, arg2));
319
315
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
@@ -321,6 +317,10 @@ function __wbg_get_imports() {
321
317
  getInt32Memory0()[arg0 / 4 + 1] = len1;
322
318
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
323
319
  }, 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_2(deferred0_0, deferred0_1);
347
+ wasm.__wbindgen_export_3(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;
4
5
  export function acir_read_bytes(a: number, b: number): number;
5
6
  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, b: number): void;
13
- export function __wbindgen_export_3(a: number): void;
12
+ export function __wbindgen_export_2(a: number): void;
13
+ export function __wbindgen_export_3(a: number, b: number): void;