@noir-lang/noir_wasm 1.0.0-beta.4-d8e4de4.nightly → 1.0.0-beta.5
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/build/cjs/package.json +1 -1
- package/build/esm/package.json +1 -1
- package/dist/node/index_bg.wasm +0 -0
- package/dist/node/main.js +34 -33
- package/dist/node/main.js.map +1 -1
- package/dist/types/build/cjs/index.d.ts +7 -7
- package/dist/types/build/esm/index.d.ts +14 -14
- package/dist/web/main.mjs +35 -34
- package/dist/web/main.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/package.json
CHANGED
package/build/esm/package.json
CHANGED
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,19 +11436,17 @@ function takeFromExternrefTable0(idx) {
|
|
|
11452
11436
|
return value;
|
|
11453
11437
|
}
|
|
11454
11438
|
/**
|
|
11455
|
-
* This is a method that exposes the same API as `compile`
|
|
11456
|
-
* But uses the Context based APi internally
|
|
11457
11439
|
* @param {string} entry_point
|
|
11458
11440
|
* @param {DependencyGraph | null | undefined} dependency_graph
|
|
11459
11441
|
* @param {PathToFileSourceMap} file_source_map
|
|
11460
11442
|
* @returns {ProgramCompileResult}
|
|
11461
11443
|
*/
|
|
11462
|
-
module.exports.
|
|
11444
|
+
module.exports.compile_program = function(entry_point, dependency_graph, file_source_map) {
|
|
11463
11445
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
11464
11446
|
const len0 = WASM_VECTOR_LEN;
|
|
11465
11447
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
11466
11448
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
11467
|
-
const ret = wasm.
|
|
11449
|
+
const ret = wasm.compile_program(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);
|
|
11468
11450
|
if (ret[2]) {
|
|
11469
11451
|
throw takeFromExternrefTable0(ret[1]);
|
|
11470
11452
|
}
|
|
@@ -11472,19 +11454,17 @@ module.exports.compile_program_ = function(entry_point, dependency_graph, file_s
|
|
|
11472
11454
|
};
|
|
11473
11455
|
|
|
11474
11456
|
/**
|
|
11475
|
-
* This is a method that exposes the same API as `compile`
|
|
11476
|
-
* But uses the Context based APi internally
|
|
11477
11457
|
* @param {string} entry_point
|
|
11478
11458
|
* @param {DependencyGraph | null | undefined} dependency_graph
|
|
11479
11459
|
* @param {PathToFileSourceMap} file_source_map
|
|
11480
11460
|
* @returns {ContractCompileResult}
|
|
11481
11461
|
*/
|
|
11482
|
-
module.exports.
|
|
11462
|
+
module.exports.compile_contract = function(entry_point, dependency_graph, file_source_map) {
|
|
11483
11463
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
11484
11464
|
const len0 = WASM_VECTOR_LEN;
|
|
11485
11465
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
11486
11466
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
11487
|
-
const ret = wasm.
|
|
11467
|
+
const ret = wasm.compile_contract(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);
|
|
11488
11468
|
if (ret[2]) {
|
|
11489
11469
|
throw takeFromExternrefTable0(ret[1]);
|
|
11490
11470
|
}
|
|
@@ -11492,17 +11472,19 @@ module.exports.compile_contract_ = function(entry_point, dependency_graph, file_
|
|
|
11492
11472
|
};
|
|
11493
11473
|
|
|
11494
11474
|
/**
|
|
11475
|
+
* This is a method that exposes the same API as `compile`
|
|
11476
|
+
* But uses the Context based APi internally
|
|
11495
11477
|
* @param {string} entry_point
|
|
11496
11478
|
* @param {DependencyGraph | null | undefined} dependency_graph
|
|
11497
11479
|
* @param {PathToFileSourceMap} file_source_map
|
|
11498
11480
|
* @returns {ProgramCompileResult}
|
|
11499
11481
|
*/
|
|
11500
|
-
module.exports.
|
|
11482
|
+
module.exports.compile_program_ = function(entry_point, dependency_graph, file_source_map) {
|
|
11501
11483
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
11502
11484
|
const len0 = WASM_VECTOR_LEN;
|
|
11503
11485
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
11504
11486
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
11505
|
-
const ret = wasm.
|
|
11487
|
+
const ret = wasm.compile_program_(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);
|
|
11506
11488
|
if (ret[2]) {
|
|
11507
11489
|
throw takeFromExternrefTable0(ret[1]);
|
|
11508
11490
|
}
|
|
@@ -11510,23 +11492,42 @@ module.exports.compile_program = function(entry_point, dependency_graph, file_so
|
|
|
11510
11492
|
};
|
|
11511
11493
|
|
|
11512
11494
|
/**
|
|
11495
|
+
* This is a method that exposes the same API as `compile`
|
|
11496
|
+
* 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));
|
|
@@ -11699,17 +11700,17 @@ class PathToFileSourceMap {
|
|
|
11699
11700
|
}
|
|
11700
11701
|
module.exports.PathToFileSourceMap = PathToFileSourceMap;
|
|
11701
11702
|
|
|
11702
|
-
module.exports.
|
|
11703
|
-
const ret = new
|
|
11703
|
+
module.exports.__wbg_constructor_3dadd769c5a1a118 = function() {
|
|
11704
|
+
const ret = new Object();
|
|
11704
11705
|
return ret;
|
|
11705
11706
|
};
|
|
11706
11707
|
|
|
11707
|
-
module.exports.
|
|
11708
|
-
const ret = new
|
|
11708
|
+
module.exports.__wbg_constructor_5f09562a541125e5 = function(arg0) {
|
|
11709
|
+
const ret = new Error(arg0);
|
|
11709
11710
|
return ret;
|
|
11710
11711
|
};
|
|
11711
11712
|
|
|
11712
|
-
module.exports.
|
|
11713
|
+
module.exports.__wbg_constructor_dca104070aa08fab = function() {
|
|
11713
11714
|
const ret = new Object();
|
|
11714
11715
|
return ret;
|
|
11715
11716
|
};
|