@noir-lang/noir_wasm 0.37.0-13856a1.nightly → 0.37.0-b8654f7.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
|
@@ -191,6 +191,22 @@ 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
|
+
};
|
|
194
210
|
|
|
195
211
|
function _assertClass(instance, klass) {
|
|
196
212
|
if (!(instance instanceof klass)) {
|
|
@@ -199,21 +215,19 @@ function _assertClass(instance, klass) {
|
|
|
199
215
|
return instance.ptr;
|
|
200
216
|
}
|
|
201
217
|
/**
|
|
202
|
-
* This is a method that exposes the same API as `compile`
|
|
203
|
-
* But uses the Context based APi internally
|
|
204
218
|
* @param {string} entry_point
|
|
205
219
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
206
220
|
* @param {PathToFileSourceMap} file_source_map
|
|
207
221
|
* @returns {ProgramCompileResult}
|
|
208
222
|
*/
|
|
209
|
-
module.exports.
|
|
223
|
+
module.exports.compile_program = function(entry_point, dependency_graph, file_source_map) {
|
|
210
224
|
try {
|
|
211
225
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
212
226
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
213
227
|
const len0 = WASM_VECTOR_LEN;
|
|
214
228
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
215
229
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
216
|
-
wasm.
|
|
230
|
+
wasm.compile_program(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
217
231
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
218
232
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
219
233
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -227,21 +241,19 @@ module.exports.compile_program_ = function(entry_point, dependency_graph, file_s
|
|
|
227
241
|
};
|
|
228
242
|
|
|
229
243
|
/**
|
|
230
|
-
* This is a method that exposes the same API as `compile`
|
|
231
|
-
* But uses the Context based APi internally
|
|
232
244
|
* @param {string} entry_point
|
|
233
245
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
234
246
|
* @param {PathToFileSourceMap} file_source_map
|
|
235
247
|
* @returns {ContractCompileResult}
|
|
236
248
|
*/
|
|
237
|
-
module.exports.
|
|
249
|
+
module.exports.compile_contract = function(entry_point, dependency_graph, file_source_map) {
|
|
238
250
|
try {
|
|
239
251
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
240
252
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
241
253
|
const len0 = WASM_VECTOR_LEN;
|
|
242
254
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
243
255
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
244
|
-
wasm.
|
|
256
|
+
wasm.compile_contract(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
245
257
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
246
258
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
247
259
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -255,36 +267,21 @@ module.exports.compile_contract_ = function(entry_point, dependency_graph, file_
|
|
|
255
267
|
};
|
|
256
268
|
|
|
257
269
|
/**
|
|
258
|
-
*
|
|
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
|
-
/**
|
|
270
|
+
* This is a method that exposes the same API as `compile`
|
|
271
|
+
* But uses the Context based APi internally
|
|
275
272
|
* @param {string} entry_point
|
|
276
273
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
277
274
|
* @param {PathToFileSourceMap} file_source_map
|
|
278
275
|
* @returns {ProgramCompileResult}
|
|
279
276
|
*/
|
|
280
|
-
module.exports.
|
|
277
|
+
module.exports.compile_program_ = function(entry_point, dependency_graph, file_source_map) {
|
|
281
278
|
try {
|
|
282
279
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
283
280
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
284
281
|
const len0 = WASM_VECTOR_LEN;
|
|
285
282
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
286
283
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
287
|
-
wasm.
|
|
284
|
+
wasm.compile_program_(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
288
285
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
289
286
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
290
287
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -298,19 +295,21 @@ module.exports.compile_program = function(entry_point, dependency_graph, file_so
|
|
|
298
295
|
};
|
|
299
296
|
|
|
300
297
|
/**
|
|
298
|
+
* This is a method that exposes the same API as `compile`
|
|
299
|
+
* But uses the Context based APi internally
|
|
301
300
|
* @param {string} entry_point
|
|
302
301
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
303
302
|
* @param {PathToFileSourceMap} file_source_map
|
|
304
303
|
* @returns {ContractCompileResult}
|
|
305
304
|
*/
|
|
306
|
-
module.exports.
|
|
305
|
+
module.exports.compile_contract_ = function(entry_point, dependency_graph, file_source_map) {
|
|
307
306
|
try {
|
|
308
307
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
309
308
|
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
310
309
|
const len0 = WASM_VECTOR_LEN;
|
|
311
310
|
_assertClass(file_source_map, PathToFileSourceMap);
|
|
312
311
|
var ptr1 = file_source_map.__destroy_into_raw();
|
|
313
|
-
wasm.
|
|
312
|
+
wasm.compile_contract_(retptr, ptr0, len0, isLikeNone(dependency_graph) ? 0 : addHeapObject(dependency_graph), ptr1);
|
|
314
313
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
315
314
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
316
315
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|