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