@noir-lang/noir_wasm 1.0.0-beta.15-881acee.nightly → 1.0.0-beta.15-9dbad18.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 +28 -29
- 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 +16 -16
- package/dist/web/main.mjs +29 -30
- 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
|
@@ -11423,6 +11423,22 @@ function debugString(val) {
|
|
|
11423
11423
|
function isLikeNone(x) {
|
|
11424
11424
|
return x === undefined || x === null;
|
|
11425
11425
|
}
|
|
11426
|
+
/**
|
|
11427
|
+
* @param {string} level
|
|
11428
|
+
*/
|
|
11429
|
+
module.exports.init_log_level = function(level) {
|
|
11430
|
+
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
11431
|
+
const len0 = WASM_VECTOR_LEN;
|
|
11432
|
+
wasm.init_log_level(ptr0, len0);
|
|
11433
|
+
};
|
|
11434
|
+
|
|
11435
|
+
/**
|
|
11436
|
+
* @returns {any}
|
|
11437
|
+
*/
|
|
11438
|
+
module.exports.build_info = function() {
|
|
11439
|
+
const ret = wasm.build_info();
|
|
11440
|
+
return ret;
|
|
11441
|
+
};
|
|
11426
11442
|
|
|
11427
11443
|
function _assertClass(instance, klass) {
|
|
11428
11444
|
if (!(instance instanceof klass)) {
|
|
@@ -11436,19 +11452,17 @@ function takeFromExternrefTable0(idx) {
|
|
|
11436
11452
|
return value;
|
|
11437
11453
|
}
|
|
11438
11454
|
/**
|
|
11439
|
-
* This is a method that exposes the same API as `compile`
|
|
11440
|
-
* But uses the Context based APi internally
|
|
11441
11455
|
* @param {string} entry_point
|
|
11442
11456
|
* @param {DependencyGraph | null | undefined} dependency_graph
|
|
11443
11457
|
* @param {PathToFileSourceMap} file_source_map
|
|
11444
11458
|
* @returns {ProgramCompileResult}
|
|
11445
11459
|
*/
|
|
11446
|
-
module.exports.
|
|
11460
|
+
module.exports.compile_program = function(entry_point, dependency_graph, file_source_map) {
|
|
11447
11461
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
11448
11462
|
const len0 = WASM_VECTOR_LEN;
|
|
11449
11463
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
11450
11464
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
11451
|
-
const ret = wasm.
|
|
11465
|
+
const ret = wasm.compile_program(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);
|
|
11452
11466
|
if (ret[2]) {
|
|
11453
11467
|
throw takeFromExternrefTable0(ret[1]);
|
|
11454
11468
|
}
|
|
@@ -11456,19 +11470,17 @@ module.exports.compile_program_ = function(entry_point, dependency_graph, file_s
|
|
|
11456
11470
|
};
|
|
11457
11471
|
|
|
11458
11472
|
/**
|
|
11459
|
-
* This is a method that exposes the same API as `compile`
|
|
11460
|
-
* But uses the Context based APi internally
|
|
11461
11473
|
* @param {string} entry_point
|
|
11462
11474
|
* @param {DependencyGraph | null | undefined} dependency_graph
|
|
11463
11475
|
* @param {PathToFileSourceMap} file_source_map
|
|
11464
11476
|
* @returns {ContractCompileResult}
|
|
11465
11477
|
*/
|
|
11466
|
-
module.exports.
|
|
11478
|
+
module.exports.compile_contract = function(entry_point, dependency_graph, file_source_map) {
|
|
11467
11479
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
11468
11480
|
const len0 = WASM_VECTOR_LEN;
|
|
11469
11481
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
11470
11482
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
11471
|
-
const ret = wasm.
|
|
11483
|
+
const ret = wasm.compile_contract(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);
|
|
11472
11484
|
if (ret[2]) {
|
|
11473
11485
|
throw takeFromExternrefTable0(ret[1]);
|
|
11474
11486
|
}
|
|
@@ -11476,17 +11488,19 @@ module.exports.compile_contract_ = function(entry_point, dependency_graph, file_
|
|
|
11476
11488
|
};
|
|
11477
11489
|
|
|
11478
11490
|
/**
|
|
11491
|
+
* This is a method that exposes the same API as `compile`
|
|
11492
|
+
* But uses the Context based APi internally
|
|
11479
11493
|
* @param {string} entry_point
|
|
11480
11494
|
* @param {DependencyGraph | null | undefined} dependency_graph
|
|
11481
11495
|
* @param {PathToFileSourceMap} file_source_map
|
|
11482
11496
|
* @returns {ProgramCompileResult}
|
|
11483
11497
|
*/
|
|
11484
|
-
module.exports.
|
|
11498
|
+
module.exports.compile_program_ = function(entry_point, dependency_graph, file_source_map) {
|
|
11485
11499
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
11486
11500
|
const len0 = WASM_VECTOR_LEN;
|
|
11487
11501
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
11488
11502
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
11489
|
-
const ret = wasm.
|
|
11503
|
+
const ret = wasm.compile_program_(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);
|
|
11490
11504
|
if (ret[2]) {
|
|
11491
11505
|
throw takeFromExternrefTable0(ret[1]);
|
|
11492
11506
|
}
|
|
@@ -11494,40 +11508,25 @@ module.exports.compile_program = function(entry_point, dependency_graph, file_so
|
|
|
11494
11508
|
};
|
|
11495
11509
|
|
|
11496
11510
|
/**
|
|
11511
|
+
* This is a method that exposes the same API as `compile`
|
|
11512
|
+
* But uses the Context based APi internally
|
|
11497
11513
|
* @param {string} entry_point
|
|
11498
11514
|
* @param {DependencyGraph | null | undefined} dependency_graph
|
|
11499
11515
|
* @param {PathToFileSourceMap} file_source_map
|
|
11500
11516
|
* @returns {ContractCompileResult}
|
|
11501
11517
|
*/
|
|
11502
|
-
module.exports.
|
|
11518
|
+
module.exports.compile_contract_ = function(entry_point, dependency_graph, file_source_map) {
|
|
11503
11519
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
11504
11520
|
const len0 = WASM_VECTOR_LEN;
|
|
11505
11521
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
11506
11522
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
11507
|
-
const ret = wasm.
|
|
11523
|
+
const ret = wasm.compile_contract_(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);
|
|
11508
11524
|
if (ret[2]) {
|
|
11509
11525
|
throw takeFromExternrefTable0(ret[1]);
|
|
11510
11526
|
}
|
|
11511
11527
|
return takeFromExternrefTable0(ret[0]);
|
|
11512
11528
|
};
|
|
11513
11529
|
|
|
11514
|
-
/**
|
|
11515
|
-
* @param {string} level
|
|
11516
|
-
*/
|
|
11517
|
-
module.exports.init_log_level = function(level) {
|
|
11518
|
-
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
11519
|
-
const len0 = WASM_VECTOR_LEN;
|
|
11520
|
-
wasm.init_log_level(ptr0, len0);
|
|
11521
|
-
};
|
|
11522
|
-
|
|
11523
|
-
/**
|
|
11524
|
-
* @returns {any}
|
|
11525
|
-
*/
|
|
11526
|
-
module.exports.build_info = function() {
|
|
11527
|
-
const ret = wasm.build_info();
|
|
11528
|
-
return ret;
|
|
11529
|
-
};
|
|
11530
|
-
|
|
11531
11530
|
const CompilerContextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
11532
11531
|
? { register: () => {}, unregister: () => {} }
|
|
11533
11532
|
: new FinalizationRegistry(ptr => wasm.__wbg_compilercontext_free(ptr >>> 0, 1));
|