@noir-lang/noir_wasm 0.35.0-f6a7306.nightly → 0.36.0
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 +33 -32
- package/dist/node/main.js.map +1 -1
- package/dist/types/build/cjs/index.d.ts +6 -6
- package/dist/types/build/esm/index.d.ts +14 -14
- package/dist/web/main.mjs +34 -33
- 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
|
@@ -191,22 +191,6 @@ function debugString(val) {
|
|
|
191
191
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
192
192
|
return className;
|
|
193
193
|
}
|
|
194
|
-
/**
|
|
195
|
-
* @param {string} level
|
|
196
|
-
*/
|
|
197
|
-
module.exports.init_log_level = function(level) {
|
|
198
|
-
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
199
|
-
const len0 = WASM_VECTOR_LEN;
|
|
200
|
-
wasm.init_log_level(ptr0, len0);
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* @returns {any}
|
|
205
|
-
*/
|
|
206
|
-
module.exports.build_info = function() {
|
|
207
|
-
const ret = wasm.build_info();
|
|
208
|
-
return takeObject(ret);
|
|
209
|
-
};
|
|
210
194
|
|
|
211
195
|
function _assertClass(instance, klass) {
|
|
212
196
|
if (!(instance instanceof klass)) {
|
|
@@ -215,21 +199,19 @@ function _assertClass(instance, klass) {
|
|
|
215
199
|
return instance.ptr;
|
|
216
200
|
}
|
|
217
201
|
/**
|
|
218
|
-
* This is a method that exposes the same API as `compile`
|
|
219
|
-
* But uses the Context based APi internally
|
|
220
202
|
* @param {string} entry_point
|
|
221
203
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
222
204
|
* @param {PathToFileSourceMap} file_source_map
|
|
223
205
|
* @returns {ProgramCompileResult}
|
|
224
206
|
*/
|
|
225
|
-
module.exports.
|
|
207
|
+
module.exports.compile_program = function(entry_point, dependency_graph, file_source_map) {
|
|
226
208
|
try {
|
|
227
209
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
228
210
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
229
211
|
const len0 = WASM_VECTOR_LEN;
|
|
230
212
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
231
213
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
232
|
-
wasm.
|
|
214
|
+
wasm.compile_program(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
233
215
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
234
216
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
235
217
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -243,21 +225,19 @@ module.exports.compile_program_ = function(entry_point, dependency_graph, file_s
|
|
|
243
225
|
};
|
|
244
226
|
|
|
245
227
|
/**
|
|
246
|
-
* This is a method that exposes the same API as `compile`
|
|
247
|
-
* But uses the Context based APi internally
|
|
248
228
|
* @param {string} entry_point
|
|
249
229
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
250
230
|
* @param {PathToFileSourceMap} file_source_map
|
|
251
231
|
* @returns {ContractCompileResult}
|
|
252
232
|
*/
|
|
253
|
-
module.exports.
|
|
233
|
+
module.exports.compile_contract = function(entry_point, dependency_graph, file_source_map) {
|
|
254
234
|
try {
|
|
255
235
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
256
236
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
257
237
|
const len0 = WASM_VECTOR_LEN;
|
|
258
238
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
259
239
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
260
|
-
wasm.
|
|
240
|
+
wasm.compile_contract(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
261
241
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
262
242
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
263
243
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -271,19 +251,21 @@ module.exports.compile_contract_ = function(entry_point, dependency_graph, file_
|
|
|
271
251
|
};
|
|
272
252
|
|
|
273
253
|
/**
|
|
254
|
+
* This is a method that exposes the same API as `compile`
|
|
255
|
+
* But uses the Context based APi internally
|
|
274
256
|
* @param {string} entry_point
|
|
275
257
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
276
258
|
* @param {PathToFileSourceMap} file_source_map
|
|
277
259
|
* @returns {ProgramCompileResult}
|
|
278
260
|
*/
|
|
279
|
-
module.exports.
|
|
261
|
+
module.exports.compile_program_ = function(entry_point, dependency_graph, file_source_map) {
|
|
280
262
|
try {
|
|
281
263
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
282
264
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
283
265
|
const len0 = WASM_VECTOR_LEN;
|
|
284
266
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
285
267
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
286
|
-
wasm.
|
|
268
|
+
wasm.compile_program_(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
287
269
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
288
270
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
289
271
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -297,19 +279,21 @@ module.exports.compile_program = function(entry_point, dependency_graph, file_so
|
|
|
297
279
|
};
|
|
298
280
|
|
|
299
281
|
/**
|
|
282
|
+
* This is a method that exposes the same API as `compile`
|
|
283
|
+
* But uses the Context based APi internally
|
|
300
284
|
* @param {string} entry_point
|
|
301
285
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
302
286
|
* @param {PathToFileSourceMap} file_source_map
|
|
303
287
|
* @returns {ContractCompileResult}
|
|
304
288
|
*/
|
|
305
|
-
module.exports.
|
|
289
|
+
module.exports.compile_contract_ = function(entry_point, dependency_graph, file_source_map) {
|
|
306
290
|
try {
|
|
307
291
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
308
292
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
309
293
|
const len0 = WASM_VECTOR_LEN;
|
|
310
294
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
311
295
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
312
|
-
wasm.
|
|
296
|
+
wasm.compile_contract_(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
313
297
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
314
298
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
315
299
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -322,6 +306,23 @@ module.exports.compile_contract = function(entry_point, dependency_graph, file_s
|
|
|
322
306
|
}
|
|
323
307
|
};
|
|
324
308
|
|
|
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
|
+
|
|
325
326
|
function handleError(f, args) {
|
|
326
327
|
try {
|
|
327
328
|
return f.apply(this, args);
|
|
@@ -522,8 +523,8 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
|
522
523
|
takeObject(arg0);
|
|
523
524
|
};
|
|
524
525
|
|
|
525
|
-
module.exports.
|
|
526
|
-
const ret = new
|
|
526
|
+
module.exports.__wbg_constructor_42abc892058cbf24 = function() {
|
|
527
|
+
const ret = new Object();
|
|
527
528
|
return addHeapObject(ret);
|
|
528
529
|
};
|
|
529
530
|
|
|
@@ -532,8 +533,8 @@ module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
|
532
533
|
return ret;
|
|
533
534
|
};
|
|
534
535
|
|
|
535
|
-
module.exports.
|
|
536
|
-
const ret = new
|
|
536
|
+
module.exports.__wbg_constructor_00b064bf8f1c4a5d = function(arg0) {
|
|
537
|
+
const ret = new Error(takeObject(arg0));
|
|
537
538
|
return addHeapObject(ret);
|
|
538
539
|
};
|
|
539
540
|
|