@noir-lang/noir_wasm 0.5.1-f144391 → 0.6.0-1237dfd
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/README.md +1 -1
- package/nodejs/noir_wasm.d.ts +7 -7
- package/nodejs/noir_wasm.js +52 -46
- package/nodejs/noir_wasm_bg.wasm +0 -0
- package/nodejs/noir_wasm_bg.wasm.d.ts +3 -3
- package/package.json +2 -2
- package/web/noir_wasm.d.ts +11 -11
- package/web/noir_wasm.js +72 -62
- package/web/noir_wasm_bg.wasm +0 -0
- package/web/noir_wasm_bg.wasm.d.ts +3 -3
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
# Noir Lang WASM JavaScript Package
|
|
2
2
|
|
|
3
3
|
## Tracks
|
|
4
|
-
Noir lang Repository [noir-lang/noir@
|
|
4
|
+
Noir lang Repository [noir-lang/noir@1237dfd](https://github.com/noir-lang/noir/tree/1237dfd5b52d0c7b88efe9b7d56d4a1b557bf391)
|
package/nodejs/noir_wasm.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
* @param {
|
|
4
|
+
* @param {string} level
|
|
5
|
+
*/
|
|
6
|
+
export function init_log_level(level: string): void;
|
|
7
|
+
/**
|
|
5
8
|
* @returns {any}
|
|
6
9
|
*/
|
|
7
|
-
export function
|
|
10
|
+
export function build_info(): any;
|
|
8
11
|
/**
|
|
9
12
|
* @param {Uint8Array} bytes
|
|
10
13
|
* @returns {any}
|
|
@@ -16,10 +19,7 @@ export function acir_read_bytes(bytes: Uint8Array): any;
|
|
|
16
19
|
*/
|
|
17
20
|
export function acir_write_bytes(acir: any): Uint8Array;
|
|
18
21
|
/**
|
|
19
|
-
* @param {
|
|
20
|
-
*/
|
|
21
|
-
export function init_log_level(level: string): void;
|
|
22
|
-
/**
|
|
22
|
+
* @param {any} args
|
|
23
23
|
* @returns {any}
|
|
24
24
|
*/
|
|
25
|
-
export function
|
|
25
|
+
export function compile(args: any): any;
|
package/nodejs/noir_wasm.js
CHANGED
|
@@ -38,6 +38,7 @@ function getUint8Memory0() {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
function getStringFromWasm0(ptr, len) {
|
|
41
|
+
ptr = ptr >>> 0;
|
|
41
42
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
42
43
|
}
|
|
43
44
|
|
|
@@ -71,14 +72,14 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
71
72
|
|
|
72
73
|
if (realloc === undefined) {
|
|
73
74
|
const buf = cachedTextEncoder.encode(arg);
|
|
74
|
-
const ptr = malloc(buf.length);
|
|
75
|
+
const ptr = malloc(buf.length) >>> 0;
|
|
75
76
|
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
76
77
|
WASM_VECTOR_LEN = buf.length;
|
|
77
78
|
return ptr;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
let len = arg.length;
|
|
81
|
-
let ptr = malloc(len);
|
|
82
|
+
let ptr = malloc(len) >>> 0;
|
|
82
83
|
|
|
83
84
|
const mem = getUint8Memory0();
|
|
84
85
|
|
|
@@ -94,7 +95,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
94
95
|
if (offset !== 0) {
|
|
95
96
|
arg = arg.slice(offset);
|
|
96
97
|
}
|
|
97
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3);
|
|
98
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0;
|
|
98
99
|
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
99
100
|
const ret = encodeString(arg, view);
|
|
100
101
|
|
|
@@ -118,16 +119,24 @@ function getInt32Memory0() {
|
|
|
118
119
|
return cachedInt32Memory0;
|
|
119
120
|
}
|
|
120
121
|
/**
|
|
121
|
-
* @param {
|
|
122
|
+
* @param {string} level
|
|
123
|
+
*/
|
|
124
|
+
module.exports.init_log_level = function(level) {
|
|
125
|
+
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
126
|
+
const len0 = WASM_VECTOR_LEN;
|
|
127
|
+
wasm.init_log_level(ptr0, len0);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/**
|
|
122
131
|
* @returns {any}
|
|
123
132
|
*/
|
|
124
|
-
module.exports.
|
|
125
|
-
const ret = wasm.
|
|
133
|
+
module.exports.build_info = function() {
|
|
134
|
+
const ret = wasm.build_info();
|
|
126
135
|
return takeObject(ret);
|
|
127
136
|
};
|
|
128
137
|
|
|
129
138
|
function passArray8ToWasm0(arg, malloc) {
|
|
130
|
-
const ptr = malloc(arg.length * 1);
|
|
139
|
+
const ptr = malloc(arg.length * 1) >>> 0;
|
|
131
140
|
getUint8Memory0().set(arg, ptr / 1);
|
|
132
141
|
WASM_VECTOR_LEN = arg.length;
|
|
133
142
|
return ptr;
|
|
@@ -144,6 +153,7 @@ module.exports.acir_read_bytes = function(bytes) {
|
|
|
144
153
|
};
|
|
145
154
|
|
|
146
155
|
function getArrayU8FromWasm0(ptr, len) {
|
|
156
|
+
ptr = ptr >>> 0;
|
|
147
157
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
148
158
|
}
|
|
149
159
|
/**
|
|
@@ -156,28 +166,20 @@ module.exports.acir_write_bytes = function(acir) {
|
|
|
156
166
|
wasm.acir_write_bytes(retptr, addHeapObject(acir));
|
|
157
167
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
158
168
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
159
|
-
var
|
|
169
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
160
170
|
wasm.__wbindgen_export_2(r0, r1 * 1);
|
|
161
|
-
return
|
|
171
|
+
return v1;
|
|
162
172
|
} finally {
|
|
163
173
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
164
174
|
}
|
|
165
175
|
};
|
|
166
176
|
|
|
167
177
|
/**
|
|
168
|
-
* @param {
|
|
169
|
-
*/
|
|
170
|
-
module.exports.init_log_level = function(level) {
|
|
171
|
-
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
172
|
-
const len0 = WASM_VECTOR_LEN;
|
|
173
|
-
wasm.init_log_level(ptr0, len0);
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
/**
|
|
178
|
+
* @param {any} args
|
|
177
179
|
* @returns {any}
|
|
178
180
|
*/
|
|
179
|
-
module.exports.
|
|
180
|
-
const ret = wasm.
|
|
181
|
+
module.exports.compile = function(args) {
|
|
182
|
+
const ret = wasm.compile(addHeapObject(args));
|
|
181
183
|
return takeObject(ret);
|
|
182
184
|
};
|
|
183
185
|
|
|
@@ -194,15 +196,15 @@ module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
|
194
196
|
return ret;
|
|
195
197
|
};
|
|
196
198
|
|
|
199
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
200
|
+
takeObject(arg0);
|
|
201
|
+
};
|
|
202
|
+
|
|
197
203
|
module.exports.__wbindgen_is_null = function(arg0) {
|
|
198
204
|
const ret = getObject(arg0) === null;
|
|
199
205
|
return ret;
|
|
200
206
|
};
|
|
201
207
|
|
|
202
|
-
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
203
|
-
takeObject(arg0);
|
|
204
|
-
};
|
|
205
|
-
|
|
206
208
|
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
207
209
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
208
210
|
return addHeapObject(ret);
|
|
@@ -215,67 +217,71 @@ module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
|
215
217
|
|
|
216
218
|
module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
217
219
|
const ret = getObject(arg1).stack;
|
|
218
|
-
const
|
|
219
|
-
const
|
|
220
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
221
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
220
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
221
|
+
const len1 = WASM_VECTOR_LEN;
|
|
222
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
223
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
222
224
|
};
|
|
223
225
|
|
|
224
226
|
module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
227
|
+
let deferred0_0;
|
|
228
|
+
let deferred0_1;
|
|
225
229
|
try {
|
|
230
|
+
deferred0_0 = arg0;
|
|
231
|
+
deferred0_1 = arg1;
|
|
226
232
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
227
233
|
} finally {
|
|
228
|
-
wasm.__wbindgen_export_2(
|
|
234
|
+
wasm.__wbindgen_export_2(deferred0_0, deferred0_1);
|
|
229
235
|
}
|
|
230
236
|
};
|
|
231
237
|
|
|
232
|
-
module.exports.
|
|
238
|
+
module.exports.__wbg_readfile_865ff7b07c118548 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
233
239
|
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
234
|
-
const
|
|
235
|
-
const
|
|
236
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
237
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
240
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
241
|
+
const len1 = WASM_VECTOR_LEN;
|
|
242
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
243
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
238
244
|
}, arguments) };
|
|
239
245
|
|
|
240
|
-
module.exports.
|
|
246
|
+
module.exports.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
|
|
241
247
|
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
242
248
|
};
|
|
243
249
|
|
|
244
|
-
module.exports.
|
|
250
|
+
module.exports.__wbg_error_a7e23606158b68b9 = function(arg0) {
|
|
245
251
|
console.error(getObject(arg0));
|
|
246
252
|
};
|
|
247
253
|
|
|
248
|
-
module.exports.
|
|
254
|
+
module.exports.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
|
|
249
255
|
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
250
256
|
};
|
|
251
257
|
|
|
252
|
-
module.exports.
|
|
258
|
+
module.exports.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
|
|
253
259
|
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
254
260
|
};
|
|
255
261
|
|
|
256
|
-
module.exports.
|
|
262
|
+
module.exports.__wbg_log_9b164efbe6db702f = function(arg0, arg1, arg2, arg3) {
|
|
257
263
|
console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
258
264
|
};
|
|
259
265
|
|
|
260
|
-
module.exports.
|
|
266
|
+
module.exports.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
|
|
261
267
|
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
262
268
|
};
|
|
263
269
|
|
|
264
270
|
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
265
271
|
const obj = getObject(arg1);
|
|
266
272
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
267
|
-
var
|
|
268
|
-
var
|
|
269
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
270
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
273
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
274
|
+
var len1 = WASM_VECTOR_LEN;
|
|
275
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
276
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
271
277
|
};
|
|
272
278
|
|
|
273
|
-
module.exports.
|
|
279
|
+
module.exports.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {
|
|
274
280
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
275
281
|
return addHeapObject(ret);
|
|
276
282
|
}, arguments) };
|
|
277
283
|
|
|
278
|
-
module.exports.
|
|
284
|
+
module.exports.__wbg_stringify_d06ad2addc54d51e = function() { return handleError(function (arg0) {
|
|
279
285
|
const ret = JSON.stringify(getObject(arg0));
|
|
280
286
|
return addHeapObject(ret);
|
|
281
287
|
}, arguments) };
|
package/nodejs/noir_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export function compile(a: number): number;
|
|
5
|
-
export function acir_read_bytes(a: number, b: number): number;
|
|
6
|
-
export function acir_write_bytes(a: number, b: number): void;
|
|
7
4
|
export function init_log_level(a: number, b: number): void;
|
|
8
5
|
export function build_info(): number;
|
|
6
|
+
export function acir_read_bytes(a: number, b: number): number;
|
|
7
|
+
export function acir_write_bytes(a: number, b: number): void;
|
|
8
|
+
export function compile(a: number): number;
|
|
9
9
|
export function __wbindgen_export_0(a: number): number;
|
|
10
10
|
export function __wbindgen_export_1(a: number, b: number, c: number): number;
|
|
11
11
|
export function __wbindgen_add_to_stack_pointer(a: number): number;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"collaborators": [
|
|
4
4
|
"The Noir Team <team@noir-lang.org>"
|
|
5
5
|
],
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.6.0-1237dfd",
|
|
7
7
|
"files": [
|
|
8
8
|
"nodejs",
|
|
9
9
|
"web",
|
|
@@ -21,6 +21,6 @@
|
|
|
21
21
|
"url": "https://github.com/noir-lang/noir_wasm.git"
|
|
22
22
|
},
|
|
23
23
|
"compiler": {
|
|
24
|
-
"versionHash": "
|
|
24
|
+
"versionHash": "1237dfd5b52d0c7b88efe9b7d56d4a1b557bf391"
|
|
25
25
|
}
|
|
26
26
|
}
|
package/web/noir_wasm.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
* @param {
|
|
4
|
+
* @param {string} level
|
|
5
|
+
*/
|
|
6
|
+
export function init_log_level(level: string): void;
|
|
7
|
+
/**
|
|
5
8
|
* @returns {any}
|
|
6
9
|
*/
|
|
7
|
-
export function
|
|
10
|
+
export function build_info(): any;
|
|
8
11
|
/**
|
|
9
12
|
* @param {Uint8Array} bytes
|
|
10
13
|
* @returns {any}
|
|
@@ -16,23 +19,20 @@ export function acir_read_bytes(bytes: Uint8Array): any;
|
|
|
16
19
|
*/
|
|
17
20
|
export function acir_write_bytes(acir: any): Uint8Array;
|
|
18
21
|
/**
|
|
19
|
-
* @param {
|
|
20
|
-
*/
|
|
21
|
-
export function init_log_level(level: string): void;
|
|
22
|
-
/**
|
|
22
|
+
* @param {any} args
|
|
23
23
|
* @returns {any}
|
|
24
24
|
*/
|
|
25
|
-
export function
|
|
25
|
+
export function compile(args: any): any;
|
|
26
26
|
|
|
27
27
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
28
28
|
|
|
29
29
|
export interface InitOutput {
|
|
30
30
|
readonly memory: WebAssembly.Memory;
|
|
31
|
-
readonly compile: (a: number) => number;
|
|
32
|
-
readonly acir_read_bytes: (a: number, b: number) => number;
|
|
33
|
-
readonly acir_write_bytes: (a: number, b: number) => void;
|
|
34
31
|
readonly init_log_level: (a: number, b: number) => void;
|
|
35
32
|
readonly build_info: () => number;
|
|
33
|
+
readonly acir_read_bytes: (a: number, b: number) => number;
|
|
34
|
+
readonly acir_write_bytes: (a: number, b: number) => void;
|
|
35
|
+
readonly compile: (a: number) => number;
|
|
36
36
|
readonly __wbindgen_export_0: (a: number) => number;
|
|
37
37
|
readonly __wbindgen_export_1: (a: number, b: number, c: number) => number;
|
|
38
38
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
@@ -59,4 +59,4 @@ export function initSync(module: SyncInitInput): InitOutput;
|
|
|
59
59
|
*
|
|
60
60
|
* @returns {Promise<InitOutput>}
|
|
61
61
|
*/
|
|
62
|
-
export default function
|
|
62
|
+
export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
|
package/web/noir_wasm.js
CHANGED
|
@@ -22,9 +22,9 @@ function takeObject(idx) {
|
|
|
22
22
|
return ret;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
25
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
26
26
|
|
|
27
|
-
cachedTextDecoder.decode();
|
|
27
|
+
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
28
28
|
|
|
29
29
|
let cachedUint8Memory0 = null;
|
|
30
30
|
|
|
@@ -36,6 +36,7 @@ function getUint8Memory0() {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
function getStringFromWasm0(ptr, len) {
|
|
39
|
+
ptr = ptr >>> 0;
|
|
39
40
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
40
41
|
}
|
|
41
42
|
|
|
@@ -50,7 +51,7 @@ function addHeapObject(obj) {
|
|
|
50
51
|
|
|
51
52
|
let WASM_VECTOR_LEN = 0;
|
|
52
53
|
|
|
53
|
-
const cachedTextEncoder = new TextEncoder('utf-8');
|
|
54
|
+
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
54
55
|
|
|
55
56
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
56
57
|
? function (arg, view) {
|
|
@@ -69,14 +70,14 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
69
70
|
|
|
70
71
|
if (realloc === undefined) {
|
|
71
72
|
const buf = cachedTextEncoder.encode(arg);
|
|
72
|
-
const ptr = malloc(buf.length);
|
|
73
|
+
const ptr = malloc(buf.length) >>> 0;
|
|
73
74
|
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
74
75
|
WASM_VECTOR_LEN = buf.length;
|
|
75
76
|
return ptr;
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
let len = arg.length;
|
|
79
|
-
let ptr = malloc(len);
|
|
80
|
+
let ptr = malloc(len) >>> 0;
|
|
80
81
|
|
|
81
82
|
const mem = getUint8Memory0();
|
|
82
83
|
|
|
@@ -92,7 +93,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
92
93
|
if (offset !== 0) {
|
|
93
94
|
arg = arg.slice(offset);
|
|
94
95
|
}
|
|
95
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3);
|
|
96
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0;
|
|
96
97
|
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
97
98
|
const ret = encodeString(arg, view);
|
|
98
99
|
|
|
@@ -116,16 +117,24 @@ function getInt32Memory0() {
|
|
|
116
117
|
return cachedInt32Memory0;
|
|
117
118
|
}
|
|
118
119
|
/**
|
|
119
|
-
* @param {
|
|
120
|
+
* @param {string} level
|
|
121
|
+
*/
|
|
122
|
+
export function init_log_level(level) {
|
|
123
|
+
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
124
|
+
const len0 = WASM_VECTOR_LEN;
|
|
125
|
+
wasm.init_log_level(ptr0, len0);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
120
129
|
* @returns {any}
|
|
121
130
|
*/
|
|
122
|
-
export function
|
|
123
|
-
const ret = wasm.
|
|
131
|
+
export function build_info() {
|
|
132
|
+
const ret = wasm.build_info();
|
|
124
133
|
return takeObject(ret);
|
|
125
134
|
}
|
|
126
135
|
|
|
127
136
|
function passArray8ToWasm0(arg, malloc) {
|
|
128
|
-
const ptr = malloc(arg.length * 1);
|
|
137
|
+
const ptr = malloc(arg.length * 1) >>> 0;
|
|
129
138
|
getUint8Memory0().set(arg, ptr / 1);
|
|
130
139
|
WASM_VECTOR_LEN = arg.length;
|
|
131
140
|
return ptr;
|
|
@@ -142,6 +151,7 @@ export function acir_read_bytes(bytes) {
|
|
|
142
151
|
}
|
|
143
152
|
|
|
144
153
|
function getArrayU8FromWasm0(ptr, len) {
|
|
154
|
+
ptr = ptr >>> 0;
|
|
145
155
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
146
156
|
}
|
|
147
157
|
/**
|
|
@@ -154,28 +164,20 @@ export function acir_write_bytes(acir) {
|
|
|
154
164
|
wasm.acir_write_bytes(retptr, addHeapObject(acir));
|
|
155
165
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
156
166
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
157
|
-
var
|
|
167
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
158
168
|
wasm.__wbindgen_export_2(r0, r1 * 1);
|
|
159
|
-
return
|
|
169
|
+
return v1;
|
|
160
170
|
} finally {
|
|
161
171
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
162
172
|
}
|
|
163
173
|
}
|
|
164
174
|
|
|
165
175
|
/**
|
|
166
|
-
* @param {
|
|
167
|
-
*/
|
|
168
|
-
export function init_log_level(level) {
|
|
169
|
-
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
170
|
-
const len0 = WASM_VECTOR_LEN;
|
|
171
|
-
wasm.init_log_level(ptr0, len0);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/**
|
|
176
|
+
* @param {any} args
|
|
175
177
|
* @returns {any}
|
|
176
178
|
*/
|
|
177
|
-
export function
|
|
178
|
-
const ret = wasm.
|
|
179
|
+
export function compile(args) {
|
|
180
|
+
const ret = wasm.compile(addHeapObject(args));
|
|
179
181
|
return takeObject(ret);
|
|
180
182
|
}
|
|
181
183
|
|
|
@@ -187,7 +189,7 @@ function handleError(f, args) {
|
|
|
187
189
|
}
|
|
188
190
|
}
|
|
189
191
|
|
|
190
|
-
async function
|
|
192
|
+
async function __wbg_load(module, imports) {
|
|
191
193
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
192
194
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
193
195
|
try {
|
|
@@ -218,20 +220,20 @@ async function load(module, imports) {
|
|
|
218
220
|
}
|
|
219
221
|
}
|
|
220
222
|
|
|
221
|
-
function
|
|
223
|
+
function __wbg_get_imports() {
|
|
222
224
|
const imports = {};
|
|
223
225
|
imports.wbg = {};
|
|
224
226
|
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
225
227
|
const ret = getObject(arg0) === undefined;
|
|
226
228
|
return ret;
|
|
227
229
|
};
|
|
230
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
231
|
+
takeObject(arg0);
|
|
232
|
+
};
|
|
228
233
|
imports.wbg.__wbindgen_is_null = function(arg0) {
|
|
229
234
|
const ret = getObject(arg0) === null;
|
|
230
235
|
return ret;
|
|
231
236
|
};
|
|
232
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
233
|
-
takeObject(arg0);
|
|
234
|
-
};
|
|
235
237
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
236
238
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
237
239
|
return addHeapObject(ret);
|
|
@@ -242,56 +244,60 @@ function getImports() {
|
|
|
242
244
|
};
|
|
243
245
|
imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
244
246
|
const ret = getObject(arg1).stack;
|
|
245
|
-
const
|
|
246
|
-
const
|
|
247
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
248
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
247
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
248
|
+
const len1 = WASM_VECTOR_LEN;
|
|
249
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
250
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
249
251
|
};
|
|
250
252
|
imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
253
|
+
let deferred0_0;
|
|
254
|
+
let deferred0_1;
|
|
251
255
|
try {
|
|
256
|
+
deferred0_0 = arg0;
|
|
257
|
+
deferred0_1 = arg1;
|
|
252
258
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
253
259
|
} finally {
|
|
254
|
-
wasm.__wbindgen_export_2(
|
|
260
|
+
wasm.__wbindgen_export_2(deferred0_0, deferred0_1);
|
|
255
261
|
}
|
|
256
262
|
};
|
|
257
|
-
imports.wbg.
|
|
263
|
+
imports.wbg.__wbg_readfile_865ff7b07c118548 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
258
264
|
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
259
|
-
const
|
|
260
|
-
const
|
|
261
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
262
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
265
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
266
|
+
const len1 = WASM_VECTOR_LEN;
|
|
267
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
268
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
263
269
|
}, arguments) };
|
|
264
|
-
imports.wbg.
|
|
270
|
+
imports.wbg.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
|
|
265
271
|
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
266
272
|
};
|
|
267
|
-
imports.wbg.
|
|
273
|
+
imports.wbg.__wbg_error_a7e23606158b68b9 = function(arg0) {
|
|
268
274
|
console.error(getObject(arg0));
|
|
269
275
|
};
|
|
270
|
-
imports.wbg.
|
|
276
|
+
imports.wbg.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
|
|
271
277
|
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
272
278
|
};
|
|
273
|
-
imports.wbg.
|
|
279
|
+
imports.wbg.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
|
|
274
280
|
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
275
281
|
};
|
|
276
|
-
imports.wbg.
|
|
282
|
+
imports.wbg.__wbg_log_9b164efbe6db702f = function(arg0, arg1, arg2, arg3) {
|
|
277
283
|
console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
278
284
|
};
|
|
279
|
-
imports.wbg.
|
|
285
|
+
imports.wbg.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
|
|
280
286
|
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
281
287
|
};
|
|
282
288
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
283
289
|
const obj = getObject(arg1);
|
|
284
290
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
285
|
-
var
|
|
286
|
-
var
|
|
287
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
288
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
291
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
292
|
+
var len1 = WASM_VECTOR_LEN;
|
|
293
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
294
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
289
295
|
};
|
|
290
|
-
imports.wbg.
|
|
296
|
+
imports.wbg.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {
|
|
291
297
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
292
298
|
return addHeapObject(ret);
|
|
293
299
|
}, arguments) };
|
|
294
|
-
imports.wbg.
|
|
300
|
+
imports.wbg.__wbg_stringify_d06ad2addc54d51e = function() { return handleError(function (arg0) {
|
|
295
301
|
const ret = JSON.stringify(getObject(arg0));
|
|
296
302
|
return addHeapObject(ret);
|
|
297
303
|
}, arguments) };
|
|
@@ -302,13 +308,13 @@ function getImports() {
|
|
|
302
308
|
return imports;
|
|
303
309
|
}
|
|
304
310
|
|
|
305
|
-
function
|
|
311
|
+
function __wbg_init_memory(imports, maybe_memory) {
|
|
306
312
|
|
|
307
313
|
}
|
|
308
314
|
|
|
309
|
-
function
|
|
315
|
+
function __wbg_finalize_init(instance, module) {
|
|
310
316
|
wasm = instance.exports;
|
|
311
|
-
|
|
317
|
+
__wbg_init.__wbindgen_wasm_module = module;
|
|
312
318
|
cachedInt32Memory0 = null;
|
|
313
319
|
cachedUint8Memory0 = null;
|
|
314
320
|
|
|
@@ -317,9 +323,11 @@ function finalizeInit(instance, module) {
|
|
|
317
323
|
}
|
|
318
324
|
|
|
319
325
|
function initSync(module) {
|
|
320
|
-
|
|
326
|
+
if (wasm !== undefined) return wasm;
|
|
321
327
|
|
|
322
|
-
|
|
328
|
+
const imports = __wbg_get_imports();
|
|
329
|
+
|
|
330
|
+
__wbg_init_memory(imports);
|
|
323
331
|
|
|
324
332
|
if (!(module instanceof WebAssembly.Module)) {
|
|
325
333
|
module = new WebAssembly.Module(module);
|
|
@@ -327,25 +335,27 @@ function initSync(module) {
|
|
|
327
335
|
|
|
328
336
|
const instance = new WebAssembly.Instance(module, imports);
|
|
329
337
|
|
|
330
|
-
return
|
|
338
|
+
return __wbg_finalize_init(instance, module);
|
|
331
339
|
}
|
|
332
340
|
|
|
333
|
-
async function
|
|
341
|
+
async function __wbg_init(input) {
|
|
342
|
+
if (wasm !== undefined) return wasm;
|
|
343
|
+
|
|
334
344
|
if (typeof input === 'undefined') {
|
|
335
345
|
input = new URL('noir_wasm_bg.wasm', import.meta.url);
|
|
336
346
|
}
|
|
337
|
-
const imports =
|
|
347
|
+
const imports = __wbg_get_imports();
|
|
338
348
|
|
|
339
349
|
if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
|
|
340
350
|
input = fetch(input);
|
|
341
351
|
}
|
|
342
352
|
|
|
343
|
-
|
|
353
|
+
__wbg_init_memory(imports);
|
|
344
354
|
|
|
345
|
-
const { instance, module } = await
|
|
355
|
+
const { instance, module } = await __wbg_load(await input, imports);
|
|
346
356
|
|
|
347
|
-
return
|
|
357
|
+
return __wbg_finalize_init(instance, module);
|
|
348
358
|
}
|
|
349
359
|
|
|
350
360
|
export { initSync }
|
|
351
|
-
export default
|
|
361
|
+
export default __wbg_init;
|
package/web/noir_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export function compile(a: number): number;
|
|
5
|
-
export function acir_read_bytes(a: number, b: number): number;
|
|
6
|
-
export function acir_write_bytes(a: number, b: number): void;
|
|
7
4
|
export function init_log_level(a: number, b: number): void;
|
|
8
5
|
export function build_info(): number;
|
|
6
|
+
export function acir_read_bytes(a: number, b: number): number;
|
|
7
|
+
export function acir_write_bytes(a: number, b: number): void;
|
|
8
|
+
export function compile(a: number): number;
|
|
9
9
|
export function __wbindgen_export_0(a: number): number;
|
|
10
10
|
export function __wbindgen_export_1(a: number, b: number, c: number): number;
|
|
11
11
|
export function __wbindgen_add_to_stack_pointer(a: number): number;
|