@noir-lang/noir_wasm 1.0.0-beta.7-077bb6d.nightly → 1.0.0-beta.7-4f69354.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 +2 -2
- 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,34 +11488,19 @@ module.exports.compile_contract_ = function(entry_point, dependency_graph, file_
|
|
|
11476
11488
|
};
|
|
11477
11489
|
|
|
11478
11490
|
/**
|
|
11479
|
-
*
|
|
11480
|
-
|
|
11481
|
-
module.exports.init_log_level = function(level) {
|
|
11482
|
-
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
11483
|
-
const len0 = WASM_VECTOR_LEN;
|
|
11484
|
-
wasm.init_log_level(ptr0, len0);
|
|
11485
|
-
};
|
|
11486
|
-
|
|
11487
|
-
/**
|
|
11488
|
-
* @returns {any}
|
|
11489
|
-
*/
|
|
11490
|
-
module.exports.build_info = function() {
|
|
11491
|
-
const ret = wasm.build_info();
|
|
11492
|
-
return ret;
|
|
11493
|
-
};
|
|
11494
|
-
|
|
11495
|
-
/**
|
|
11491
|
+
* This is a method that exposes the same API as `compile`
|
|
11492
|
+
* But uses the Context based APi internally
|
|
11496
11493
|
* @param {string} entry_point
|
|
11497
11494
|
* @param {DependencyGraph | null | undefined} dependency_graph
|
|
11498
11495
|
* @param {PathToFileSourceMap} file_source_map
|
|
11499
11496
|
* @returns {ProgramCompileResult}
|
|
11500
11497
|
*/
|
|
11501
|
-
module.exports.
|
|
11498
|
+
module.exports.compile_program_ = function(entry_point, dependency_graph, file_source_map) {
|
|
11502
11499
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
11503
11500
|
const len0 = WASM_VECTOR_LEN;
|
|
11504
11501
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
11505
11502
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
11506
|
-
const ret = wasm.
|
|
11503
|
+
const ret = wasm.compile_program_(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);
|
|
11507
11504
|
if (ret[2]) {
|
|
11508
11505
|
throw takeFromExternrefTable0(ret[1]);
|
|
11509
11506
|
}
|
|
@@ -11511,17 +11508,19 @@ module.exports.compile_program = function(entry_point, dependency_graph, file_so
|
|
|
11511
11508
|
};
|
|
11512
11509
|
|
|
11513
11510
|
/**
|
|
11511
|
+
* This is a method that exposes the same API as `compile`
|
|
11512
|
+
* But uses the Context based APi internally
|
|
11514
11513
|
* @param {string} entry_point
|
|
11515
11514
|
* @param {DependencyGraph | null | undefined} dependency_graph
|
|
11516
11515
|
* @param {PathToFileSourceMap} file_source_map
|
|
11517
11516
|
* @returns {ContractCompileResult}
|
|
11518
11517
|
*/
|
|
11519
|
-
module.exports.
|
|
11518
|
+
module.exports.compile_contract_ = function(entry_point, dependency_graph, file_source_map) {
|
|
11520
11519
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
11521
11520
|
const len0 = WASM_VECTOR_LEN;
|
|
11522
11521
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
11523
11522
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
11524
|
-
const ret = wasm.
|
|
11523
|
+
const ret = wasm.compile_contract_(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);
|
|
11525
11524
|
if (ret[2]) {
|
|
11526
11525
|
throw takeFromExternrefTable0(ret[1]);
|
|
11527
11526
|
}
|