@noir-lang/noir_wasm 1.0.0-beta.2-44c35dc.nightly → 1.0.0-beta.3-c254c3c.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/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 +38 -38
- package/dist/node/main.js.map +1 -1
- package/dist/types/build/cjs/index.d.ts +5 -5
- package/dist/types/build/esm/index.d.ts +14 -14
- package/dist/web/main.mjs +630 -630
- package/dist/web/main.mjs.map +1 -1
- package/package.json +3 -3
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
|
@@ -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_malloc, wasm.__wbindgen_realloc);
|
|
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_malloc, wasm.__wbindgen_realloc);
|
|
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,21 +255,36 @@ module.exports.compile_contract = function(entry_point, dependency_graph, file_s
|
|
|
251
255
|
};
|
|
252
256
|
|
|
253
257
|
/**
|
|
254
|
-
*
|
|
255
|
-
|
|
258
|
+
* @param {string} level
|
|
259
|
+
*/
|
|
260
|
+
module.exports.init_log_level = function(level) {
|
|
261
|
+
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
262
|
+
const len0 = WASM_VECTOR_LEN;
|
|
263
|
+
wasm.init_log_level(ptr0, len0);
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* @returns {any}
|
|
268
|
+
*/
|
|
269
|
+
module.exports.build_info = function() {
|
|
270
|
+
const ret = wasm.build_info();
|
|
271
|
+
return takeObject(ret);
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
/**
|
|
256
275
|
* @param {string} entry_point
|
|
257
276
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
258
277
|
* @param {PathToFileSourceMap} file_source_map
|
|
259
278
|
* @returns {ProgramCompileResult}
|
|
260
279
|
*/
|
|
261
|
-
module.exports.
|
|
280
|
+
module.exports.compile_program = function(entry_point, dependency_graph, file_source_map) {
|
|
262
281
|
try {
|
|
263
282
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
264
283
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
265
284
|
const len0 = WASM_VECTOR_LEN;
|
|
266
285
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
267
286
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
268
|
-
wasm.
|
|
287
|
+
wasm.compile_program(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
269
288
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
270
289
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
271
290
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -279,21 +298,19 @@ module.exports.compile_program_ = function(entry_point, dependency_graph, file_s
|
|
|
279
298
|
};
|
|
280
299
|
|
|
281
300
|
/**
|
|
282
|
-
* This is a method that exposes the same API as `compile`
|
|
283
|
-
* But uses the Context based APi internally
|
|
284
301
|
* @param {string} entry_point
|
|
285
302
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
286
303
|
* @param {PathToFileSourceMap} file_source_map
|
|
287
304
|
* @returns {ContractCompileResult}
|
|
288
305
|
*/
|
|
289
|
-
module.exports.
|
|
306
|
+
module.exports.compile_contract = function(entry_point, dependency_graph, file_source_map) {
|
|
290
307
|
try {
|
|
291
308
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
292
309
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
293
310
|
const len0 = WASM_VECTOR_LEN;
|
|
294
311
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
295
312
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
296
|
-
wasm.
|
|
313
|
+
wasm.compile_contract(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
297
314
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
298
315
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
299
316
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -306,23 +323,6 @@ module.exports.compile_contract_ = function(entry_point, dependency_graph, file_
|
|
|
306
323
|
}
|
|
307
324
|
};
|
|
308
325
|
|
|
309
|
-
/**
|
|
310
|
-
* @param {string} level
|
|
311
|
-
*/
|
|
312
|
-
module.exports.init_log_level = function(level) {
|
|
313
|
-
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
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,22 +519,22 @@ class PathToFileSourceMap {
|
|
|
519
519
|
}
|
|
520
520
|
module.exports.PathToFileSourceMap = PathToFileSourceMap;
|
|
521
521
|
|
|
522
|
-
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
523
|
-
const ret = getObject(arg0) === undefined;
|
|
524
|
-
return ret;
|
|
525
|
-
};
|
|
526
|
-
|
|
527
522
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
528
523
|
takeObject(arg0);
|
|
529
524
|
};
|
|
530
525
|
|
|
531
|
-
module.exports.
|
|
532
|
-
const ret = new
|
|
526
|
+
module.exports.__wbg_constructor_e81ab801e8a0ffd1 = function(arg0) {
|
|
527
|
+
const ret = new Error(takeObject(arg0));
|
|
533
528
|
return addHeapObject(ret);
|
|
534
529
|
};
|
|
535
530
|
|
|
536
|
-
module.exports.
|
|
537
|
-
const ret =
|
|
531
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
532
|
+
const ret = getObject(arg0) === undefined;
|
|
533
|
+
return ret;
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
module.exports.__wbg_constructor_c09d82b787c1aa69 = function() {
|
|
537
|
+
const ret = new Object();
|
|
538
538
|
return addHeapObject(ret);
|
|
539
539
|
};
|
|
540
540
|
|