@noir-lang/noir_wasm 1.0.0-beta.2-97afa52.nightly → 1.0.0-beta.2-b7ace68.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.
- package/dist/node/index_bg.wasm +0 -0
- package/dist/node/main.js +37 -37
- package/dist/node/main.js.map +1 -1
- package/dist/types/build/cjs/index.d.ts +4 -4
- package/dist/types/build/esm/index.d.ts +14 -14
- package/dist/web/main.mjs +37 -37
- package/dist/web/main.mjs.map +1 -1
- package/package.json +2 -2
package/dist/node/index_bg.wasm
CHANGED
|
Binary file
|
package/dist/node/main.js
CHANGED
|
@@ -199,21 +199,19 @@ function _assertClass(instance, klass) {
|
|
|
199
199
|
return instance.ptr;
|
|
200
200
|
}
|
|
201
201
|
/**
|
|
202
|
-
* This is a method that exposes the same API as `compile`
|
|
203
|
-
* But uses the Context based APi internally
|
|
204
202
|
* @param {string} entry_point
|
|
205
203
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
206
204
|
* @param {PathToFileSourceMap} file_source_map
|
|
207
205
|
* @returns {ProgramCompileResult}
|
|
208
206
|
*/
|
|
209
|
-
module.exports.
|
|
207
|
+
module.exports.compile_program = function(entry_point, dependency_graph, file_source_map) {
|
|
210
208
|
try {
|
|
211
209
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
212
210
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
213
211
|
const len0 = WASM_VECTOR_LEN;
|
|
214
212
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
215
213
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
216
|
-
wasm.
|
|
214
|
+
wasm.compile_program(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
217
215
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
218
216
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
219
217
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -227,21 +225,19 @@ module.exports.compile_program_ = function(entry_point, dependency_graph, file_s
|
|
|
227
225
|
};
|
|
228
226
|
|
|
229
227
|
/**
|
|
230
|
-
* This is a method that exposes the same API as `compile`
|
|
231
|
-
* But uses the Context based APi internally
|
|
232
228
|
* @param {string} entry_point
|
|
233
229
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
234
230
|
* @param {PathToFileSourceMap} file_source_map
|
|
235
231
|
* @returns {ContractCompileResult}
|
|
236
232
|
*/
|
|
237
|
-
module.exports.
|
|
233
|
+
module.exports.compile_contract = function(entry_point, dependency_graph, file_source_map) {
|
|
238
234
|
try {
|
|
239
235
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
240
236
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
241
237
|
const len0 = WASM_VECTOR_LEN;
|
|
242
238
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
243
239
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
244
|
-
wasm.
|
|
240
|
+
wasm.compile_contract(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
245
241
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
246
242
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
247
243
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -255,36 +251,21 @@ module.exports.compile_contract_ = function(entry_point, dependency_graph, file_
|
|
|
255
251
|
};
|
|
256
252
|
|
|
257
253
|
/**
|
|
258
|
-
*
|
|
259
|
-
|
|
260
|
-
module.exports.init_log_level = function(level) {
|
|
261
|
-
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
262
|
-
const len0 = WASM_VECTOR_LEN;
|
|
263
|
-
wasm.init_log_level(ptr0, len0);
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* @returns {any}
|
|
268
|
-
*/
|
|
269
|
-
module.exports.build_info = function() {
|
|
270
|
-
const ret = wasm.build_info();
|
|
271
|
-
return takeObject(ret);
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
/**
|
|
254
|
+
* This is a method that exposes the same API as `compile`
|
|
255
|
+
* But uses the Context based APi internally
|
|
275
256
|
* @param {string} entry_point
|
|
276
257
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
277
258
|
* @param {PathToFileSourceMap} file_source_map
|
|
278
259
|
* @returns {ProgramCompileResult}
|
|
279
260
|
*/
|
|
280
|
-
module.exports.
|
|
261
|
+
module.exports.compile_program_ = function(entry_point, dependency_graph, file_source_map) {
|
|
281
262
|
try {
|
|
282
263
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
283
264
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
284
265
|
const len0 = WASM_VECTOR_LEN;
|
|
285
266
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
286
267
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
287
|
-
wasm.
|
|
268
|
+
wasm.compile_program_(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
288
269
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
289
270
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
290
271
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -298,19 +279,21 @@ module.exports.compile_program = function(entry_point, dependency_graph, file_so
|
|
|
298
279
|
};
|
|
299
280
|
|
|
300
281
|
/**
|
|
282
|
+
* This is a method that exposes the same API as `compile`
|
|
283
|
+
* But uses the Context based APi internally
|
|
301
284
|
* @param {string} entry_point
|
|
302
285
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
303
286
|
* @param {PathToFileSourceMap} file_source_map
|
|
304
287
|
* @returns {ContractCompileResult}
|
|
305
288
|
*/
|
|
306
|
-
module.exports.
|
|
289
|
+
module.exports.compile_contract_ = function(entry_point, dependency_graph, file_source_map) {
|
|
307
290
|
try {
|
|
308
291
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
309
292
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
310
293
|
const len0 = WASM_VECTOR_LEN;
|
|
311
294
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
312
295
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
313
|
-
wasm.
|
|
296
|
+
wasm.compile_contract_(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
314
297
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
315
298
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
316
299
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -323,6 +306,23 @@ module.exports.compile_contract = function(entry_point, dependency_graph, file_s
|
|
|
323
306
|
}
|
|
324
307
|
};
|
|
325
308
|
|
|
309
|
+
/**
|
|
310
|
+
* @param {string} level
|
|
311
|
+
*/
|
|
312
|
+
module.exports.init_log_level = function(level) {
|
|
313
|
+
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
314
|
+
const len0 = WASM_VECTOR_LEN;
|
|
315
|
+
wasm.init_log_level(ptr0, len0);
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* @returns {any}
|
|
320
|
+
*/
|
|
321
|
+
module.exports.build_info = function() {
|
|
322
|
+
const ret = wasm.build_info();
|
|
323
|
+
return takeObject(ret);
|
|
324
|
+
};
|
|
325
|
+
|
|
326
326
|
function handleError(f, args) {
|
|
327
327
|
try {
|
|
328
328
|
return f.apply(this, args);
|
|
@@ -519,23 +519,23 @@ class PathToFileSourceMap {
|
|
|
519
519
|
}
|
|
520
520
|
module.exports.PathToFileSourceMap = PathToFileSourceMap;
|
|
521
521
|
|
|
522
|
-
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
523
|
-
const ret = getObject(arg0) === undefined;
|
|
524
|
-
return ret;
|
|
525
|
-
};
|
|
526
|
-
|
|
527
522
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
528
523
|
takeObject(arg0);
|
|
529
524
|
};
|
|
530
525
|
|
|
526
|
+
module.exports.__wbg_constructor_cbbf4fc9d5097cdc = function() {
|
|
527
|
+
const ret = new Object();
|
|
528
|
+
return addHeapObject(ret);
|
|
529
|
+
};
|
|
530
|
+
|
|
531
531
|
module.exports.__wbg_constructor_ab239518aa627840 = function(arg0) {
|
|
532
532
|
const ret = new Error(takeObject(arg0));
|
|
533
533
|
return addHeapObject(ret);
|
|
534
534
|
};
|
|
535
535
|
|
|
536
|
-
module.exports.
|
|
537
|
-
const ret =
|
|
538
|
-
return
|
|
536
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
537
|
+
const ret = getObject(arg0) === undefined;
|
|
538
|
+
return ret;
|
|
539
539
|
};
|
|
540
540
|
|
|
541
541
|
module.exports.__wbg_new_abda76e883ba8a5f = function() {
|