@noir-lang/noir_wasm 0.31.0-6936a52.nightly → 0.31.0-70ebf60.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 +33 -33
- package/dist/node/main.js.map +1 -1
- package/dist/types/build/cjs/index.d.ts +3 -3
- package/dist/types/build/esm/index.d.ts +16 -16
- package/dist/web/main.mjs +33 -33
- 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,19 +199,21 @@ 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
|
|
202
204
|
* @param {string} entry_point
|
|
203
205
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
204
206
|
* @param {PathToFileSourceMap} file_source_map
|
|
205
207
|
* @returns {ProgramCompileResult}
|
|
206
208
|
*/
|
|
207
|
-
module.exports.
|
|
209
|
+
module.exports.compile_program_ = function(entry_point, dependency_graph, file_source_map) {
|
|
208
210
|
try {
|
|
209
211
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
210
212
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
211
213
|
const len0 = WASM_VECTOR_LEN;
|
|
212
214
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
213
215
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
214
|
-
wasm.
|
|
216
|
+
wasm.compile_program_(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
215
217
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
216
218
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
217
219
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -225,19 +227,21 @@ module.exports.compile_program = function(entry_point, dependency_graph, file_so
|
|
|
225
227
|
};
|
|
226
228
|
|
|
227
229
|
/**
|
|
230
|
+
* This is a method that exposes the same API as `compile`
|
|
231
|
+
* But uses the Context based APi internally
|
|
228
232
|
* @param {string} entry_point
|
|
229
233
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
230
234
|
* @param {PathToFileSourceMap} file_source_map
|
|
231
235
|
* @returns {ContractCompileResult}
|
|
232
236
|
*/
|
|
233
|
-
module.exports.
|
|
237
|
+
module.exports.compile_contract_ = function(entry_point, dependency_graph, file_source_map) {
|
|
234
238
|
try {
|
|
235
239
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
236
240
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
237
241
|
const len0 = WASM_VECTOR_LEN;
|
|
238
242
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
239
243
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
240
|
-
wasm.
|
|
244
|
+
wasm.compile_contract_(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
241
245
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
242
246
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
243
247
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -251,38 +255,19 @@ module.exports.compile_contract = function(entry_point, dependency_graph, file_s
|
|
|
251
255
|
};
|
|
252
256
|
|
|
253
257
|
/**
|
|
254
|
-
* @param {string} level
|
|
255
|
-
*/
|
|
256
|
-
module.exports.init_log_level = function(level) {
|
|
257
|
-
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
258
|
-
const len0 = WASM_VECTOR_LEN;
|
|
259
|
-
wasm.init_log_level(ptr0, len0);
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* @returns {any}
|
|
264
|
-
*/
|
|
265
|
-
module.exports.build_info = function() {
|
|
266
|
-
const ret = wasm.build_info();
|
|
267
|
-
return takeObject(ret);
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* This is a method that exposes the same API as `compile`
|
|
272
|
-
* But uses the Context based APi internally
|
|
273
258
|
* @param {string} entry_point
|
|
274
259
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
275
260
|
* @param {PathToFileSourceMap} file_source_map
|
|
276
261
|
* @returns {ProgramCompileResult}
|
|
277
262
|
*/
|
|
278
|
-
module.exports.
|
|
263
|
+
module.exports.compile_program = function(entry_point, dependency_graph, file_source_map) {
|
|
279
264
|
try {
|
|
280
265
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
281
266
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
282
267
|
const len0 = WASM_VECTOR_LEN;
|
|
283
268
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
284
269
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
285
|
-
wasm.
|
|
270
|
+
wasm.compile_program(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
286
271
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
287
272
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
288
273
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -296,21 +281,19 @@ module.exports.compile_program_ = function(entry_point, dependency_graph, file_s
|
|
|
296
281
|
};
|
|
297
282
|
|
|
298
283
|
/**
|
|
299
|
-
* This is a method that exposes the same API as `compile`
|
|
300
|
-
* 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_export_0, wasm.__wbindgen_export_1);
|
|
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_
|
|
|
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_export_0, wasm.__wbindgen_export_1);
|
|
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,15 +519,15 @@ class PathToFileSourceMap {
|
|
|
519
519
|
}
|
|
520
520
|
module.exports.PathToFileSourceMap = PathToFileSourceMap;
|
|
521
521
|
|
|
522
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
523
|
+
takeObject(arg0);
|
|
524
|
+
};
|
|
525
|
+
|
|
522
526
|
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
523
527
|
const ret = getObject(arg0) === undefined;
|
|
524
528
|
return ret;
|
|
525
529
|
};
|
|
526
530
|
|
|
527
|
-
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
528
|
-
takeObject(arg0);
|
|
529
|
-
};
|
|
530
|
-
|
|
531
531
|
module.exports.__wbg_constructor_23a70262203c0d24 = function() {
|
|
532
532
|
const ret = new Object();
|
|
533
533
|
return addHeapObject(ret);
|