@noir-lang/noir_wasm 0.6.0-7bad243 → 0.6.0-953b184

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
1
  # Noir Lang WASM JavaScript Package
2
2
 
3
3
  ## Tracks
4
- Noir lang Repository [noir-lang/noir@7bad243](https://github.com/noir-lang/noir/tree/7bad243f2da93337afdddd832dd6467c8c8ddfb2)
4
+ Noir lang Repository [noir-lang/noir@953b184](https://github.com/noir-lang/noir/tree/953b1847c0dbdeaa459ce91f16343efcd0807bc1)
@@ -1,6 +1,14 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
+ * @param {string} level
5
+ */
6
+ export function init_log_level(level: string): void;
7
+ /**
8
+ * @returns {any}
9
+ */
10
+ export function build_info(): any;
11
+ /**
4
12
  * @param {Uint8Array} bytes
5
13
  * @returns {any}
6
14
  */
@@ -15,11 +23,3 @@ export function acir_write_bytes(acir: any): Uint8Array;
15
23
  * @returns {any}
16
24
  */
17
25
  export function compile(args: any): any;
18
- /**
19
- * @param {string} level
20
- */
21
- export function init_log_level(level: string): void;
22
- /**
23
- * @returns {any}
24
- */
25
- export function build_info(): any;
@@ -38,6 +38,7 @@ function getUint8Memory0() {
38
38
  }
39
39
 
40
40
  function getStringFromWasm0(ptr, len) {
41
+ ptr = ptr >>> 0;
41
42
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
42
43
  }
43
44
 
@@ -71,14 +72,14 @@ function passStringToWasm0(arg, malloc, realloc) {
71
72
 
72
73
  if (realloc === undefined) {
73
74
  const buf = cachedTextEncoder.encode(arg);
74
- const ptr = malloc(buf.length);
75
+ const ptr = malloc(buf.length) >>> 0;
75
76
  getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
76
77
  WASM_VECTOR_LEN = buf.length;
77
78
  return ptr;
78
79
  }
79
80
 
80
81
  let len = arg.length;
81
- let ptr = malloc(len);
82
+ let ptr = malloc(len) >>> 0;
82
83
 
83
84
  const mem = getUint8Memory0();
84
85
 
@@ -94,7 +95,7 @@ function passStringToWasm0(arg, malloc, realloc) {
94
95
  if (offset !== 0) {
95
96
  arg = arg.slice(offset);
96
97
  }
97
- ptr = realloc(ptr, len, len = offset + arg.length * 3);
98
+ ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0;
98
99
  const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
99
100
  const ret = encodeString(arg, view);
100
101
 
@@ -117,9 +118,25 @@ function getInt32Memory0() {
117
118
  }
118
119
  return cachedInt32Memory0;
119
120
  }
121
+ /**
122
+ * @param {string} level
123
+ */
124
+ module.exports.init_log_level = function(level) {
125
+ const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
126
+ const len0 = WASM_VECTOR_LEN;
127
+ wasm.init_log_level(ptr0, len0);
128
+ };
129
+
130
+ /**
131
+ * @returns {any}
132
+ */
133
+ module.exports.build_info = function() {
134
+ const ret = wasm.build_info();
135
+ return takeObject(ret);
136
+ };
120
137
 
121
138
  function passArray8ToWasm0(arg, malloc) {
122
- const ptr = malloc(arg.length * 1);
139
+ const ptr = malloc(arg.length * 1) >>> 0;
123
140
  getUint8Memory0().set(arg, ptr / 1);
124
141
  WASM_VECTOR_LEN = arg.length;
125
142
  return ptr;
@@ -136,6 +153,7 @@ module.exports.acir_read_bytes = function(bytes) {
136
153
  };
137
154
 
138
155
  function getArrayU8FromWasm0(ptr, len) {
156
+ ptr = ptr >>> 0;
139
157
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
140
158
  }
141
159
  /**
@@ -148,9 +166,9 @@ module.exports.acir_write_bytes = function(acir) {
148
166
  wasm.acir_write_bytes(retptr, addHeapObject(acir));
149
167
  var r0 = getInt32Memory0()[retptr / 4 + 0];
150
168
  var r1 = getInt32Memory0()[retptr / 4 + 1];
151
- var v0 = getArrayU8FromWasm0(r0, r1).slice();
169
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
152
170
  wasm.__wbindgen_export_2(r0, r1 * 1);
153
- return v0;
171
+ return v1;
154
172
  } finally {
155
173
  wasm.__wbindgen_add_to_stack_pointer(16);
156
174
  }
@@ -165,23 +183,6 @@ module.exports.compile = function(args) {
165
183
  return takeObject(ret);
166
184
  };
167
185
 
168
- /**
169
- * @param {string} level
170
- */
171
- module.exports.init_log_level = function(level) {
172
- const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
173
- const len0 = WASM_VECTOR_LEN;
174
- wasm.init_log_level(ptr0, len0);
175
- };
176
-
177
- /**
178
- * @returns {any}
179
- */
180
- module.exports.build_info = function() {
181
- const ret = wasm.build_info();
182
- return takeObject(ret);
183
- };
184
-
185
186
  function handleError(f, args) {
186
187
  try {
187
188
  return f.apply(this, args);
@@ -216,67 +217,71 @@ module.exports.__wbg_new_abda76e883ba8a5f = function() {
216
217
 
217
218
  module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
218
219
  const ret = getObject(arg1).stack;
219
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
220
- const len0 = WASM_VECTOR_LEN;
221
- getInt32Memory0()[arg0 / 4 + 1] = len0;
222
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
220
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
221
+ const len1 = WASM_VECTOR_LEN;
222
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
223
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
223
224
  };
224
225
 
225
226
  module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
227
+ let deferred0_0;
228
+ let deferred0_1;
226
229
  try {
230
+ deferred0_0 = arg0;
231
+ deferred0_1 = arg1;
227
232
  console.error(getStringFromWasm0(arg0, arg1));
228
233
  } finally {
229
- wasm.__wbindgen_export_2(arg0, arg1);
234
+ wasm.__wbindgen_export_2(deferred0_0, deferred0_1);
230
235
  }
231
236
  };
232
237
 
233
238
  module.exports.__wbg_readfile_865ff7b07c118548 = function() { return handleError(function (arg0, arg1, arg2) {
234
239
  const ret = read_file(getStringFromWasm0(arg1, arg2));
235
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
236
- const len0 = WASM_VECTOR_LEN;
237
- getInt32Memory0()[arg0 / 4 + 1] = len0;
238
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
240
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
241
+ const len1 = WASM_VECTOR_LEN;
242
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
243
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
239
244
  }, arguments) };
240
245
 
241
- module.exports.__wbg_debug_7960d327fd96f71a = function(arg0, arg1, arg2, arg3) {
246
+ module.exports.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
242
247
  console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
243
248
  };
244
249
 
245
- module.exports.__wbg_error_fe807da27c4a4ced = function(arg0) {
250
+ module.exports.__wbg_error_a7e23606158b68b9 = function(arg0) {
246
251
  console.error(getObject(arg0));
247
252
  };
248
253
 
249
- module.exports.__wbg_error_fd84ca2a8a977774 = function(arg0, arg1, arg2, arg3) {
254
+ module.exports.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
250
255
  console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
251
256
  };
252
257
 
253
- module.exports.__wbg_info_5566be377f5b52ae = function(arg0, arg1, arg2, arg3) {
258
+ module.exports.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
254
259
  console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
255
260
  };
256
261
 
257
- module.exports.__wbg_log_7b690f184ae4519b = function(arg0, arg1, arg2, arg3) {
262
+ module.exports.__wbg_log_9b164efbe6db702f = function(arg0, arg1, arg2, arg3) {
258
263
  console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
259
264
  };
260
265
 
261
- module.exports.__wbg_warn_48cbddced45e5414 = function(arg0, arg1, arg2, arg3) {
266
+ module.exports.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
262
267
  console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
263
268
  };
264
269
 
265
270
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
266
271
  const obj = getObject(arg1);
267
272
  const ret = typeof(obj) === 'string' ? obj : undefined;
268
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
269
- var len0 = WASM_VECTOR_LEN;
270
- getInt32Memory0()[arg0 / 4 + 1] = len0;
271
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
273
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
274
+ var len1 = WASM_VECTOR_LEN;
275
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
276
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
272
277
  };
273
278
 
274
- module.exports.__wbg_parse_3ac95b51fc312db8 = function() { return handleError(function (arg0, arg1) {
279
+ module.exports.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {
275
280
  const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
276
281
  return addHeapObject(ret);
277
282
  }, arguments) };
278
283
 
279
- module.exports.__wbg_stringify_029a979dfb73aa17 = function() { return handleError(function (arg0) {
284
+ module.exports.__wbg_stringify_d06ad2addc54d51e = function() { return handleError(function (arg0) {
280
285
  const ret = JSON.stringify(getObject(arg0));
281
286
  return addHeapObject(ret);
282
287
  }, arguments) };
Binary file
@@ -1,11 +1,11 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export function init_log_level(a: number, b: number): void;
5
+ export function build_info(): number;
4
6
  export function acir_read_bytes(a: number, b: number): number;
5
7
  export function acir_write_bytes(a: number, b: number): void;
6
8
  export function compile(a: number): number;
7
- export function init_log_level(a: number, b: number): void;
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;
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.6.0-7bad243",
6
+ "version": "0.6.0-953b184",
7
7
  "files": [
8
8
  "nodejs",
9
9
  "web",
@@ -21,6 +21,6 @@
21
21
  "url": "https://github.com/noir-lang/noir_wasm.git"
22
22
  },
23
23
  "compiler": {
24
- "versionHash": "7bad243f2da93337afdddd832dd6467c8c8ddfb2"
24
+ "versionHash": "953b1847c0dbdeaa459ce91f16343efcd0807bc1"
25
25
  }
26
26
  }
@@ -1,6 +1,14 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
+ * @param {string} level
5
+ */
6
+ export function init_log_level(level: string): void;
7
+ /**
8
+ * @returns {any}
9
+ */
10
+ export function build_info(): any;
11
+ /**
4
12
  * @param {Uint8Array} bytes
5
13
  * @returns {any}
6
14
  */
@@ -15,24 +23,16 @@ export function acir_write_bytes(acir: any): Uint8Array;
15
23
  * @returns {any}
16
24
  */
17
25
  export function compile(args: any): any;
18
- /**
19
- * @param {string} level
20
- */
21
- export function init_log_level(level: string): void;
22
- /**
23
- * @returns {any}
24
- */
25
- export function build_info(): any;
26
26
 
27
27
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
28
28
 
29
29
  export interface InitOutput {
30
30
  readonly memory: WebAssembly.Memory;
31
+ readonly init_log_level: (a: number, b: number) => void;
32
+ readonly build_info: () => number;
31
33
  readonly acir_read_bytes: (a: number, b: number) => number;
32
34
  readonly acir_write_bytes: (a: number, b: number) => void;
33
35
  readonly compile: (a: number) => number;
34
- readonly init_log_level: (a: number, b: number) => void;
35
- readonly build_info: () => number;
36
36
  readonly __wbindgen_export_0: (a: number) => number;
37
37
  readonly __wbindgen_export_1: (a: number, b: number, c: number) => number;
38
38
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
@@ -59,4 +59,4 @@ export function initSync(module: SyncInitInput): InitOutput;
59
59
  *
60
60
  * @returns {Promise<InitOutput>}
61
61
  */
62
- export default function init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
62
+ export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
package/web/noir_wasm.js CHANGED
@@ -22,9 +22,9 @@ function takeObject(idx) {
22
22
  return ret;
23
23
  }
24
24
 
25
- const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
25
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
26
26
 
27
- cachedTextDecoder.decode();
27
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
28
28
 
29
29
  let cachedUint8Memory0 = null;
30
30
 
@@ -36,6 +36,7 @@ function getUint8Memory0() {
36
36
  }
37
37
 
38
38
  function getStringFromWasm0(ptr, len) {
39
+ ptr = ptr >>> 0;
39
40
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
40
41
  }
41
42
 
@@ -50,7 +51,7 @@ function addHeapObject(obj) {
50
51
 
51
52
  let WASM_VECTOR_LEN = 0;
52
53
 
53
- const cachedTextEncoder = new TextEncoder('utf-8');
54
+ const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
54
55
 
55
56
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
56
57
  ? function (arg, view) {
@@ -69,14 +70,14 @@ function passStringToWasm0(arg, malloc, realloc) {
69
70
 
70
71
  if (realloc === undefined) {
71
72
  const buf = cachedTextEncoder.encode(arg);
72
- const ptr = malloc(buf.length);
73
+ const ptr = malloc(buf.length) >>> 0;
73
74
  getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
74
75
  WASM_VECTOR_LEN = buf.length;
75
76
  return ptr;
76
77
  }
77
78
 
78
79
  let len = arg.length;
79
- let ptr = malloc(len);
80
+ let ptr = malloc(len) >>> 0;
80
81
 
81
82
  const mem = getUint8Memory0();
82
83
 
@@ -92,7 +93,7 @@ function passStringToWasm0(arg, malloc, realloc) {
92
93
  if (offset !== 0) {
93
94
  arg = arg.slice(offset);
94
95
  }
95
- ptr = realloc(ptr, len, len = offset + arg.length * 3);
96
+ ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0;
96
97
  const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
97
98
  const ret = encodeString(arg, view);
98
99
 
@@ -115,9 +116,25 @@ function getInt32Memory0() {
115
116
  }
116
117
  return cachedInt32Memory0;
117
118
  }
119
+ /**
120
+ * @param {string} level
121
+ */
122
+ export function init_log_level(level) {
123
+ const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
124
+ const len0 = WASM_VECTOR_LEN;
125
+ wasm.init_log_level(ptr0, len0);
126
+ }
127
+
128
+ /**
129
+ * @returns {any}
130
+ */
131
+ export function build_info() {
132
+ const ret = wasm.build_info();
133
+ return takeObject(ret);
134
+ }
118
135
 
119
136
  function passArray8ToWasm0(arg, malloc) {
120
- const ptr = malloc(arg.length * 1);
137
+ const ptr = malloc(arg.length * 1) >>> 0;
121
138
  getUint8Memory0().set(arg, ptr / 1);
122
139
  WASM_VECTOR_LEN = arg.length;
123
140
  return ptr;
@@ -134,6 +151,7 @@ export function acir_read_bytes(bytes) {
134
151
  }
135
152
 
136
153
  function getArrayU8FromWasm0(ptr, len) {
154
+ ptr = ptr >>> 0;
137
155
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
138
156
  }
139
157
  /**
@@ -146,9 +164,9 @@ export function acir_write_bytes(acir) {
146
164
  wasm.acir_write_bytes(retptr, addHeapObject(acir));
147
165
  var r0 = getInt32Memory0()[retptr / 4 + 0];
148
166
  var r1 = getInt32Memory0()[retptr / 4 + 1];
149
- var v0 = getArrayU8FromWasm0(r0, r1).slice();
167
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
150
168
  wasm.__wbindgen_export_2(r0, r1 * 1);
151
- return v0;
169
+ return v1;
152
170
  } finally {
153
171
  wasm.__wbindgen_add_to_stack_pointer(16);
154
172
  }
@@ -163,23 +181,6 @@ export function compile(args) {
163
181
  return takeObject(ret);
164
182
  }
165
183
 
166
- /**
167
- * @param {string} level
168
- */
169
- export function init_log_level(level) {
170
- const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
171
- const len0 = WASM_VECTOR_LEN;
172
- wasm.init_log_level(ptr0, len0);
173
- }
174
-
175
- /**
176
- * @returns {any}
177
- */
178
- export function build_info() {
179
- const ret = wasm.build_info();
180
- return takeObject(ret);
181
- }
182
-
183
184
  function handleError(f, args) {
184
185
  try {
185
186
  return f.apply(this, args);
@@ -188,7 +189,7 @@ function handleError(f, args) {
188
189
  }
189
190
  }
190
191
 
191
- async function load(module, imports) {
192
+ async function __wbg_load(module, imports) {
192
193
  if (typeof Response === 'function' && module instanceof Response) {
193
194
  if (typeof WebAssembly.instantiateStreaming === 'function') {
194
195
  try {
@@ -219,7 +220,7 @@ async function load(module, imports) {
219
220
  }
220
221
  }
221
222
 
222
- function getImports() {
223
+ function __wbg_get_imports() {
223
224
  const imports = {};
224
225
  imports.wbg = {};
225
226
  imports.wbg.__wbindgen_is_undefined = function(arg0) {
@@ -243,56 +244,60 @@ function getImports() {
243
244
  };
244
245
  imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
245
246
  const ret = getObject(arg1).stack;
246
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
247
- const len0 = WASM_VECTOR_LEN;
248
- getInt32Memory0()[arg0 / 4 + 1] = len0;
249
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
247
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
248
+ const len1 = WASM_VECTOR_LEN;
249
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
250
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
250
251
  };
251
252
  imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
253
+ let deferred0_0;
254
+ let deferred0_1;
252
255
  try {
256
+ deferred0_0 = arg0;
257
+ deferred0_1 = arg1;
253
258
  console.error(getStringFromWasm0(arg0, arg1));
254
259
  } finally {
255
- wasm.__wbindgen_export_2(arg0, arg1);
260
+ wasm.__wbindgen_export_2(deferred0_0, deferred0_1);
256
261
  }
257
262
  };
258
263
  imports.wbg.__wbg_readfile_865ff7b07c118548 = function() { return handleError(function (arg0, arg1, arg2) {
259
264
  const ret = read_file(getStringFromWasm0(arg1, arg2));
260
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
261
- const len0 = WASM_VECTOR_LEN;
262
- getInt32Memory0()[arg0 / 4 + 1] = len0;
263
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
265
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
266
+ const len1 = WASM_VECTOR_LEN;
267
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
268
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
264
269
  }, arguments) };
265
- imports.wbg.__wbg_debug_7960d327fd96f71a = function(arg0, arg1, arg2, arg3) {
270
+ imports.wbg.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
266
271
  console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
267
272
  };
268
- imports.wbg.__wbg_error_fe807da27c4a4ced = function(arg0) {
273
+ imports.wbg.__wbg_error_a7e23606158b68b9 = function(arg0) {
269
274
  console.error(getObject(arg0));
270
275
  };
271
- imports.wbg.__wbg_error_fd84ca2a8a977774 = function(arg0, arg1, arg2, arg3) {
276
+ imports.wbg.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
272
277
  console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
273
278
  };
274
- imports.wbg.__wbg_info_5566be377f5b52ae = function(arg0, arg1, arg2, arg3) {
279
+ imports.wbg.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
275
280
  console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
276
281
  };
277
- imports.wbg.__wbg_log_7b690f184ae4519b = function(arg0, arg1, arg2, arg3) {
282
+ imports.wbg.__wbg_log_9b164efbe6db702f = function(arg0, arg1, arg2, arg3) {
278
283
  console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
279
284
  };
280
- imports.wbg.__wbg_warn_48cbddced45e5414 = function(arg0, arg1, arg2, arg3) {
285
+ imports.wbg.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
281
286
  console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
282
287
  };
283
288
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
284
289
  const obj = getObject(arg1);
285
290
  const ret = typeof(obj) === 'string' ? obj : undefined;
286
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
287
- var len0 = WASM_VECTOR_LEN;
288
- getInt32Memory0()[arg0 / 4 + 1] = len0;
289
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
291
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
292
+ var len1 = WASM_VECTOR_LEN;
293
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
294
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
290
295
  };
291
- imports.wbg.__wbg_parse_3ac95b51fc312db8 = function() { return handleError(function (arg0, arg1) {
296
+ imports.wbg.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {
292
297
  const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
293
298
  return addHeapObject(ret);
294
299
  }, arguments) };
295
- imports.wbg.__wbg_stringify_029a979dfb73aa17 = function() { return handleError(function (arg0) {
300
+ imports.wbg.__wbg_stringify_d06ad2addc54d51e = function() { return handleError(function (arg0) {
296
301
  const ret = JSON.stringify(getObject(arg0));
297
302
  return addHeapObject(ret);
298
303
  }, arguments) };
@@ -303,13 +308,13 @@ function getImports() {
303
308
  return imports;
304
309
  }
305
310
 
306
- function initMemory(imports, maybe_memory) {
311
+ function __wbg_init_memory(imports, maybe_memory) {
307
312
 
308
313
  }
309
314
 
310
- function finalizeInit(instance, module) {
315
+ function __wbg_finalize_init(instance, module) {
311
316
  wasm = instance.exports;
312
- init.__wbindgen_wasm_module = module;
317
+ __wbg_init.__wbindgen_wasm_module = module;
313
318
  cachedInt32Memory0 = null;
314
319
  cachedUint8Memory0 = null;
315
320
 
@@ -318,9 +323,11 @@ function finalizeInit(instance, module) {
318
323
  }
319
324
 
320
325
  function initSync(module) {
321
- const imports = getImports();
326
+ if (wasm !== undefined) return wasm;
322
327
 
323
- initMemory(imports);
328
+ const imports = __wbg_get_imports();
329
+
330
+ __wbg_init_memory(imports);
324
331
 
325
332
  if (!(module instanceof WebAssembly.Module)) {
326
333
  module = new WebAssembly.Module(module);
@@ -328,25 +335,27 @@ function initSync(module) {
328
335
 
329
336
  const instance = new WebAssembly.Instance(module, imports);
330
337
 
331
- return finalizeInit(instance, module);
338
+ return __wbg_finalize_init(instance, module);
332
339
  }
333
340
 
334
- async function init(input) {
341
+ async function __wbg_init(input) {
342
+ if (wasm !== undefined) return wasm;
343
+
335
344
  if (typeof input === 'undefined') {
336
345
  input = new URL('noir_wasm_bg.wasm', import.meta.url);
337
346
  }
338
- const imports = getImports();
347
+ const imports = __wbg_get_imports();
339
348
 
340
349
  if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
341
350
  input = fetch(input);
342
351
  }
343
352
 
344
- initMemory(imports);
353
+ __wbg_init_memory(imports);
345
354
 
346
- const { instance, module } = await load(await input, imports);
355
+ const { instance, module } = await __wbg_load(await input, imports);
347
356
 
348
- return finalizeInit(instance, module);
357
+ return __wbg_finalize_init(instance, module);
349
358
  }
350
359
 
351
360
  export { initSync }
352
- export default init;
361
+ export default __wbg_init;
Binary file
@@ -1,11 +1,11 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export function init_log_level(a: number, b: number): void;
5
+ export function build_info(): number;
4
6
  export function acir_read_bytes(a: number, b: number): number;
5
7
  export function acir_write_bytes(a: number, b: number): void;
6
8
  export function compile(a: number): number;
7
- export function init_log_level(a: number, b: number): void;
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;