@noir-lang/noir_wasm 0.22.0 → 0.23.0

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.
Files changed (36) hide show
  1. package/build/cjs/package.json +15 -0
  2. package/build/esm/package.json +18 -0
  3. package/dist/node/index_bg.wasm +0 -0
  4. package/dist/node/main.js +12857 -0
  5. package/dist/node/main.js.map +1 -0
  6. package/dist/types/build/cjs/index.d.ts +93 -0
  7. package/dist/types/build/esm/index.d.ts +92 -0
  8. package/dist/types/src/index.d.cts +8 -0
  9. package/dist/types/src/index.d.mts +8 -0
  10. package/dist/types/src/noir/debug.d.ts +2 -0
  11. package/dist/types/src/noir/dependencies/dependency-manager.d.ts +48 -0
  12. package/dist/types/src/noir/dependencies/dependency-resolver.d.ts +22 -0
  13. package/dist/types/src/noir/dependencies/github-dependency-resolver.d.ts +29 -0
  14. package/dist/types/src/noir/dependencies/local-dependency-resolver.d.ts +12 -0
  15. package/dist/types/src/noir/file-manager/file-manager.d.ts +74 -0
  16. package/dist/types/src/noir/file-manager/memfs-file-manager.d.ts +8 -0
  17. package/dist/types/src/noir/file-manager/nodejs-file-manager.d.ts +7 -0
  18. package/dist/types/src/noir/noir-wasm-compiler.d.ts +31 -0
  19. package/dist/types/src/noir/package.d.ts +81 -0
  20. package/dist/types/src/types/noir_artifact.d.ts +173 -0
  21. package/dist/types/src/types/noir_package_config.d.ts +44 -0
  22. package/dist/types/src/utils.d.ts +5 -0
  23. package/dist/types/web-test-runner.config.d.mts +9 -0
  24. package/dist/types/webpack.config.d.ts +4 -0
  25. package/dist/web/index.html +9 -0
  26. package/dist/web/main.mjs +35340 -0
  27. package/dist/web/main.mjs.map +1 -0
  28. package/package.json +64 -19
  29. package/nodejs/noir_wasm.d.ts +0 -149
  30. package/nodejs/noir_wasm.js +0 -606
  31. package/nodejs/noir_wasm_bg.wasm +0 -0
  32. package/nodejs/noir_wasm_bg.wasm.d.ts +0 -25
  33. package/web/noir_wasm.d.ts +0 -198
  34. package/web/noir_wasm.js +0 -661
  35. package/web/noir_wasm_bg.wasm +0 -0
  36. package/web/noir_wasm_bg.wasm.d.ts +0 -25
@@ -1,606 +0,0 @@
1
- let imports = {};
2
- imports['__wbindgen_placeholder__'] = module.exports;
3
- let wasm;
4
- const { TextDecoder, TextEncoder } = require(`util`);
5
-
6
- const heap = new Array(128).fill(undefined);
7
-
8
- heap.push(undefined, null, true, false);
9
-
10
- function getObject(idx) { return heap[idx]; }
11
-
12
- let heap_next = heap.length;
13
-
14
- function dropObject(idx) {
15
- if (idx < 132) return;
16
- heap[idx] = heap_next;
17
- heap_next = idx;
18
- }
19
-
20
- function takeObject(idx) {
21
- const ret = getObject(idx);
22
- dropObject(idx);
23
- return ret;
24
- }
25
-
26
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
27
-
28
- cachedTextDecoder.decode();
29
-
30
- let cachedUint8Memory0 = null;
31
-
32
- function getUint8Memory0() {
33
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
34
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
35
- }
36
- return cachedUint8Memory0;
37
- }
38
-
39
- function getStringFromWasm0(ptr, len) {
40
- ptr = ptr >>> 0;
41
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
42
- }
43
-
44
- function addHeapObject(obj) {
45
- if (heap_next === heap.length) heap.push(heap.length + 1);
46
- const idx = heap_next;
47
- heap_next = heap[idx];
48
-
49
- heap[idx] = obj;
50
- return idx;
51
- }
52
-
53
- let WASM_VECTOR_LEN = 0;
54
-
55
- let cachedTextEncoder = new TextEncoder('utf-8');
56
-
57
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
58
- ? function (arg, view) {
59
- return cachedTextEncoder.encodeInto(arg, view);
60
- }
61
- : function (arg, view) {
62
- const buf = cachedTextEncoder.encode(arg);
63
- view.set(buf);
64
- return {
65
- read: arg.length,
66
- written: buf.length
67
- };
68
- });
69
-
70
- function passStringToWasm0(arg, malloc, realloc) {
71
-
72
- if (realloc === undefined) {
73
- const buf = cachedTextEncoder.encode(arg);
74
- const ptr = malloc(buf.length) >>> 0;
75
- getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
76
- WASM_VECTOR_LEN = buf.length;
77
- return ptr;
78
- }
79
-
80
- let len = arg.length;
81
- let ptr = malloc(len) >>> 0;
82
-
83
- const mem = getUint8Memory0();
84
-
85
- let offset = 0;
86
-
87
- for (; offset < len; offset++) {
88
- const code = arg.charCodeAt(offset);
89
- if (code > 0x7F) break;
90
- mem[ptr + offset] = code;
91
- }
92
-
93
- if (offset !== len) {
94
- if (offset !== 0) {
95
- arg = arg.slice(offset);
96
- }
97
- ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0;
98
- const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
99
- const ret = encodeString(arg, view);
100
-
101
- offset += ret.written;
102
- }
103
-
104
- WASM_VECTOR_LEN = offset;
105
- return ptr;
106
- }
107
-
108
- function isLikeNone(x) {
109
- return x === undefined || x === null;
110
- }
111
-
112
- let cachedInt32Memory0 = null;
113
-
114
- function getInt32Memory0() {
115
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
116
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
117
- }
118
- return cachedInt32Memory0;
119
- }
120
-
121
- function debugString(val) {
122
- // primitive types
123
- const type = typeof val;
124
- if (type == 'number' || type == 'boolean' || val == null) {
125
- return `${val}`;
126
- }
127
- if (type == 'string') {
128
- return `"${val}"`;
129
- }
130
- if (type == 'symbol') {
131
- const description = val.description;
132
- if (description == null) {
133
- return 'Symbol';
134
- } else {
135
- return `Symbol(${description})`;
136
- }
137
- }
138
- if (type == 'function') {
139
- const name = val.name;
140
- if (typeof name == 'string' && name.length > 0) {
141
- return `Function(${name})`;
142
- } else {
143
- return 'Function';
144
- }
145
- }
146
- // objects
147
- if (Array.isArray(val)) {
148
- const length = val.length;
149
- let debug = '[';
150
- if (length > 0) {
151
- debug += debugString(val[0]);
152
- }
153
- for(let i = 1; i < length; i++) {
154
- debug += ', ' + debugString(val[i]);
155
- }
156
- debug += ']';
157
- return debug;
158
- }
159
- // Test for built-in
160
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
161
- let className;
162
- if (builtInMatches.length > 1) {
163
- className = builtInMatches[1];
164
- } else {
165
- // Failed to match the standard '[object ClassName]'
166
- return toString.call(val);
167
- }
168
- if (className == 'Object') {
169
- // we're a user defined class or Object
170
- // JSON.stringify avoids problems with cycles, and is generally much
171
- // easier than looping through ownProperties of `val`.
172
- try {
173
- return 'Object(' + JSON.stringify(val) + ')';
174
- } catch (_) {
175
- return 'Object';
176
- }
177
- }
178
- // errors
179
- if (val instanceof Error) {
180
- return `${val.name}: ${val.message}\n${val.stack}`;
181
- }
182
- // TODO we could test for more things here, like `Set`s and `Map`s.
183
- return className;
184
- }
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
- function _assertClass(instance, klass) {
226
- if (!(instance instanceof klass)) {
227
- throw new Error(`expected instance of ${klass.name}`);
228
- }
229
- return instance.ptr;
230
- }
231
- /**
232
- * This is a method that exposes the same API as `compile`
233
- * But uses the Context based APi internally
234
- * @param {string} entry_point
235
- * @param {boolean | undefined} contracts
236
- * @param {DependencyGraph | undefined} dependency_graph
237
- * @param {PathToFileSourceMap} file_source_map
238
- * @returns {CompileResult}
239
- */
240
- module.exports.compile_ = function(entry_point, contracts, dependency_graph, file_source_map) {
241
- try {
242
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
243
- const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
244
- const len0 = WASM_VECTOR_LEN;
245
- _assertClass(file_source_map, PathToFileSourceMap);
246
- var ptr1 = file_source_map.__destroy_into_raw();
247
- wasm.compile_(retptr, ptr0, len0, isLikeNone(contracts) ? 0xFFFFFF : contracts ? 1 : 0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
248
- var r0 = getInt32Memory0()[retptr / 4 + 0];
249
- var r1 = getInt32Memory0()[retptr / 4 + 1];
250
- var r2 = getInt32Memory0()[retptr / 4 + 2];
251
- if (r2) {
252
- throw takeObject(r1);
253
- }
254
- return takeObject(r0);
255
- } finally {
256
- wasm.__wbindgen_add_to_stack_pointer(16);
257
- }
258
- };
259
-
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
- /**
278
- * @param {string} entry_point
279
- * @param {boolean | undefined} contracts
280
- * @param {DependencyGraph | undefined} dependency_graph
281
- * @param {PathToFileSourceMap} file_source_map
282
- * @returns {CompileResult}
283
- */
284
- module.exports.compile = function(entry_point, contracts, dependency_graph, file_source_map) {
285
- try {
286
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
287
- const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
288
- const len0 = WASM_VECTOR_LEN;
289
- _assertClass(file_source_map, PathToFileSourceMap);
290
- var ptr1 = file_source_map.__destroy_into_raw();
291
- wasm.compile(retptr, ptr0, len0, isLikeNone(contracts) ? 0xFFFFFF : contracts ? 1 : 0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
292
- var r0 = getInt32Memory0()[retptr / 4 + 0];
293
- var r1 = getInt32Memory0()[retptr / 4 + 1];
294
- var r2 = getInt32Memory0()[retptr / 4 + 2];
295
- if (r2) {
296
- throw takeObject(r1);
297
- }
298
- return takeObject(r0);
299
- } finally {
300
- wasm.__wbindgen_add_to_stack_pointer(16);
301
- }
302
- };
303
-
304
- function handleError(f, args) {
305
- try {
306
- return f.apply(this, args);
307
- } catch (e) {
308
- wasm.__wbindgen_export_3(addHeapObject(e));
309
- }
310
- }
311
- /**
312
- * This is a wrapper class that is wasm-bindgen compatible
313
- * We do not use js_name and rename it like CrateId because
314
- * then the impl block is not picked up in javascript.
315
- */
316
- class CompilerContext {
317
-
318
- static __wrap(ptr) {
319
- ptr = ptr >>> 0;
320
- const obj = Object.create(CompilerContext.prototype);
321
- obj.__wbg_ptr = ptr;
322
-
323
- return obj;
324
- }
325
-
326
- __destroy_into_raw() {
327
- const ptr = this.__wbg_ptr;
328
- this.__wbg_ptr = 0;
329
-
330
- return ptr;
331
- }
332
-
333
- free() {
334
- const ptr = this.__destroy_into_raw();
335
- wasm.__wbg_compilercontext_free(ptr);
336
- }
337
- /**
338
- * @param {PathToFileSourceMap} source_map
339
- */
340
- constructor(source_map) {
341
- _assertClass(source_map, PathToFileSourceMap);
342
- var ptr0 = source_map.__destroy_into_raw();
343
- const ret = wasm.compilercontext_new(ptr0);
344
- return CompilerContext.__wrap(ret);
345
- }
346
- /**
347
- * @param {string} path_to_crate
348
- * @returns {CrateId}
349
- */
350
- process_root_crate(path_to_crate) {
351
- const ptr0 = passStringToWasm0(path_to_crate, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
352
- const len0 = WASM_VECTOR_LEN;
353
- const ret = wasm.compilercontext_process_root_crate(this.__wbg_ptr, ptr0, len0);
354
- return CrateId.__wrap(ret);
355
- }
356
- /**
357
- * @param {string} path_to_crate
358
- * @returns {CrateId}
359
- */
360
- process_dependency_crate(path_to_crate) {
361
- const ptr0 = passStringToWasm0(path_to_crate, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
362
- const len0 = WASM_VECTOR_LEN;
363
- const ret = wasm.compilercontext_process_dependency_crate(this.__wbg_ptr, ptr0, len0);
364
- return CrateId.__wrap(ret);
365
- }
366
- /**
367
- * @param {string} crate_name
368
- * @param {CrateId} from
369
- * @param {CrateId} to
370
- */
371
- add_dependency_edge(crate_name, from, to) {
372
- const ptr0 = passStringToWasm0(crate_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
373
- const len0 = WASM_VECTOR_LEN;
374
- _assertClass(from, CrateId);
375
- _assertClass(to, CrateId);
376
- wasm.compilercontext_add_dependency_edge(this.__wbg_ptr, ptr0, len0, from.__wbg_ptr, to.__wbg_ptr);
377
- }
378
- /**
379
- * @param {number} program_width
380
- * @returns {CompileResult}
381
- */
382
- compile_program(program_width) {
383
- try {
384
- const ptr = this.__destroy_into_raw();
385
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
386
- wasm.compilercontext_compile_program(retptr, ptr, program_width);
387
- var r0 = getInt32Memory0()[retptr / 4 + 0];
388
- var r1 = getInt32Memory0()[retptr / 4 + 1];
389
- var r2 = getInt32Memory0()[retptr / 4 + 2];
390
- if (r2) {
391
- throw takeObject(r1);
392
- }
393
- return takeObject(r0);
394
- } finally {
395
- wasm.__wbindgen_add_to_stack_pointer(16);
396
- }
397
- }
398
- /**
399
- * @param {number} program_width
400
- * @returns {CompileResult}
401
- */
402
- compile_contract(program_width) {
403
- try {
404
- const ptr = this.__destroy_into_raw();
405
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
406
- wasm.compilercontext_compile_contract(retptr, ptr, program_width);
407
- var r0 = getInt32Memory0()[retptr / 4 + 0];
408
- var r1 = getInt32Memory0()[retptr / 4 + 1];
409
- var r2 = getInt32Memory0()[retptr / 4 + 2];
410
- if (r2) {
411
- throw takeObject(r1);
412
- }
413
- return takeObject(r0);
414
- } finally {
415
- wasm.__wbindgen_add_to_stack_pointer(16);
416
- }
417
- }
418
- }
419
- module.exports.CompilerContext = CompilerContext;
420
- /**
421
- */
422
- class CrateId {
423
-
424
- static __wrap(ptr) {
425
- ptr = ptr >>> 0;
426
- const obj = Object.create(CrateId.prototype);
427
- obj.__wbg_ptr = ptr;
428
-
429
- return obj;
430
- }
431
-
432
- __destroy_into_raw() {
433
- const ptr = this.__wbg_ptr;
434
- this.__wbg_ptr = 0;
435
-
436
- return ptr;
437
- }
438
-
439
- free() {
440
- const ptr = this.__destroy_into_raw();
441
- wasm.__wbg_crateid_free(ptr);
442
- }
443
- }
444
- module.exports.CrateId = CrateId;
445
- /**
446
- */
447
- class PathToFileSourceMap {
448
-
449
- static __wrap(ptr) {
450
- ptr = ptr >>> 0;
451
- const obj = Object.create(PathToFileSourceMap.prototype);
452
- obj.__wbg_ptr = ptr;
453
-
454
- return obj;
455
- }
456
-
457
- __destroy_into_raw() {
458
- const ptr = this.__wbg_ptr;
459
- this.__wbg_ptr = 0;
460
-
461
- return ptr;
462
- }
463
-
464
- free() {
465
- const ptr = this.__destroy_into_raw();
466
- wasm.__wbg_pathtofilesourcemap_free(ptr);
467
- }
468
- /**
469
- */
470
- constructor() {
471
- const ret = wasm.pathtofilesourcemap_new();
472
- return PathToFileSourceMap.__wrap(ret);
473
- }
474
- /**
475
- * @param {string} path
476
- * @param {string} source_code
477
- * @returns {boolean}
478
- */
479
- add_source_code(path, source_code) {
480
- const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
481
- const len0 = WASM_VECTOR_LEN;
482
- const ptr1 = passStringToWasm0(source_code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
483
- const len1 = WASM_VECTOR_LEN;
484
- const ret = wasm.pathtofilesourcemap_add_source_code(this.__wbg_ptr, ptr0, len0, ptr1, len1);
485
- return ret !== 0;
486
- }
487
- }
488
- module.exports.PathToFileSourceMap = PathToFileSourceMap;
489
-
490
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
491
- takeObject(arg0);
492
- };
493
-
494
- module.exports.__wbg_constructor_a29cdb41a75eb0e8 = function(arg0) {
495
- const ret = new Error(takeObject(arg0));
496
- return addHeapObject(ret);
497
- };
498
-
499
- module.exports.__wbindgen_is_undefined = function(arg0) {
500
- const ret = getObject(arg0) === undefined;
501
- return ret;
502
- };
503
-
504
- module.exports.__wbg_constructor_a3b5b211c5053ce8 = function() {
505
- const ret = new Object();
506
- return addHeapObject(ret);
507
- };
508
-
509
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
510
- const ret = getStringFromWasm0(arg0, arg1);
511
- return addHeapObject(ret);
512
- };
513
-
514
- module.exports.__wbg_new_abda76e883ba8a5f = function() {
515
- const ret = new Error();
516
- return addHeapObject(ret);
517
- };
518
-
519
- module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
520
- const ret = getObject(arg1).stack;
521
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
522
- const len1 = WASM_VECTOR_LEN;
523
- getInt32Memory0()[arg0 / 4 + 1] = len1;
524
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
525
- };
526
-
527
- module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
528
- let deferred0_0;
529
- let deferred0_1;
530
- try {
531
- deferred0_0 = arg0;
532
- deferred0_1 = arg1;
533
- console.error(getStringFromWasm0(arg0, arg1));
534
- } finally {
535
- wasm.__wbindgen_export_2(deferred0_0, deferred0_1);
536
- }
537
- };
538
-
539
- module.exports.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
540
- console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
541
- };
542
-
543
- module.exports.__wbg_error_a7e23606158b68b9 = function(arg0) {
544
- console.error(getObject(arg0));
545
- };
546
-
547
- module.exports.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
548
- console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
549
- };
550
-
551
- module.exports.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
552
- console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
553
- };
554
-
555
- module.exports.__wbg_log_9b164efbe6db702f = function(arg0, arg1, arg2, arg3) {
556
- console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
557
- };
558
-
559
- module.exports.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
560
- console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
561
- };
562
-
563
- module.exports.__wbindgen_string_get = function(arg0, arg1) {
564
- const obj = getObject(arg1);
565
- const ret = typeof(obj) === 'string' ? obj : undefined;
566
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
567
- var len1 = WASM_VECTOR_LEN;
568
- getInt32Memory0()[arg0 / 4 + 1] = len1;
569
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
570
- };
571
-
572
- module.exports.__wbg_set_07da13cc24b69217 = function() { return handleError(function (arg0, arg1, arg2) {
573
- const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
574
- return ret;
575
- }, arguments) };
576
-
577
- module.exports.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {
578
- const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
579
- return addHeapObject(ret);
580
- }, arguments) };
581
-
582
- module.exports.__wbg_stringify_d06ad2addc54d51e = function() { return handleError(function (arg0) {
583
- const ret = JSON.stringify(getObject(arg0));
584
- return addHeapObject(ret);
585
- }, arguments) };
586
-
587
- module.exports.__wbindgen_debug_string = function(arg0, arg1) {
588
- const ret = debugString(getObject(arg1));
589
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
590
- const len1 = WASM_VECTOR_LEN;
591
- getInt32Memory0()[arg0 / 4 + 1] = len1;
592
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
593
- };
594
-
595
- module.exports.__wbindgen_throw = function(arg0, arg1) {
596
- throw new Error(getStringFromWasm0(arg0, arg1));
597
- };
598
-
599
- const path = require('path').join(__dirname, 'noir_wasm_bg.wasm');
600
- const bytes = require('fs').readFileSync(path);
601
-
602
- const wasmModule = new WebAssembly.Module(bytes);
603
- const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
604
- wasm = wasmInstance.exports;
605
- module.exports.__wasm = wasm;
606
-
Binary file
@@ -1,25 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
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
- export function __wbg_compilercontext_free(a: number): void;
7
- export function __wbg_crateid_free(a: number): void;
8
- export function compilercontext_new(a: number): number;
9
- export function compilercontext_process_root_crate(a: number, b: number, c: number): number;
10
- export function compilercontext_process_dependency_crate(a: number, b: number, c: number): number;
11
- export function compilercontext_add_dependency_edge(a: number, b: number, c: number, d: number, e: number): void;
12
- export function compilercontext_compile_program(a: number, b: number, c: number): void;
13
- export function compilercontext_compile_contract(a: number, b: number, c: number): void;
14
- 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
- export function __wbg_pathtofilesourcemap_free(a: number): void;
18
- export function pathtofilesourcemap_new(): number;
19
- export function pathtofilesourcemap_add_source_code(a: number, b: number, c: number, d: number, e: number): number;
20
- export function compile(a: number, b: number, c: number, d: number, e: number, f: number): void;
21
- export function __wbindgen_export_0(a: number): number;
22
- export function __wbindgen_export_1(a: number, b: number, c: number): number;
23
- export function __wbindgen_add_to_stack_pointer(a: number): number;
24
- export function __wbindgen_export_2(a: number, b: number): void;
25
- export function __wbindgen_export_3(a: number): void;