@noir-lang/noir_wasm 0.12.0 → 0.16.0-1b40af8c1
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/CHANGELOG.md +24 -0
- package/README.md +2 -2
- package/nodejs/noir_wasm.d.ts +5 -15
- package/nodejs/noir_wasm.js +38 -84
- package/nodejs/noir_wasm_bg.wasm +0 -0
- package/nodejs/noir_wasm_bg.wasm.d.ts +3 -5
- package/package.json +10 -7
- package/web/noir_wasm.d.ts +8 -20
- package/web/noir_wasm.js +36 -77
- package/web/noir_wasm_bg.wasm +0 -0
- package/web/noir_wasm_bg.wasm.d.ts +3 -5
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.7.0](https://github.com/noir-lang/noir/compare/noir_wasm-v0.6.0...noir_wasm-v0.7.0) (2023-06-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* update to ACVM 0.13.0 ([#1393](https://github.com/noir-lang/noir/issues/1393))
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **ci:** update noir to build wasm with a nix flake file ([#1208](https://github.com/noir-lang/noir/issues/1208)) ([2209369](https://github.com/noir-lang/noir/commit/22093699a1a9c0c654c57fcce683fb42808db3e4))
|
|
13
|
+
* pass in closure to `Driver` to signal backend opcode support ([#1349](https://github.com/noir-lang/noir/issues/1349)) ([1e958c2](https://github.com/noir-lang/noir/commit/1e958c2aef89328e5354457c2a1e8697486e2978))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* Fix nargo not showing compiler errors or warnings ([#1694](https://github.com/noir-lang/noir/issues/1694)) ([4233068](https://github.com/noir-lang/noir/commit/4233068e790e6b2544b61571183fdfe8dbaa7c57))
|
|
19
|
+
* **noirc_driver:** Move error printing into nargo ([#1598](https://github.com/noir-lang/noir/issues/1598)) ([561cd63](https://github.com/noir-lang/noir/commit/561cd63debc24d96fa95d3eced72d8b2f8122f49))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Miscellaneous Chores
|
|
23
|
+
|
|
24
|
+
* update to ACVM 0.13.0 ([#1393](https://github.com/noir-lang/noir/issues/1393)) ([22dee75](https://github.com/noir-lang/noir/commit/22dee75464d3d02af17109d9065d37342fbbcddb))
|
package/README.md
CHANGED
|
@@ -9,11 +9,11 @@ The package also handles dependency management like how Nargo (Noir's CLI tool)
|
|
|
9
9
|
Outside of the [noir repo](https://github.com/noir-lang/noir), this package can be built using the command below:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
nix build -L github:noir-lang/noir/master#
|
|
12
|
+
nix build -L github:noir-lang/noir/master#noir_wasm
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
If you are within the noir repo and would like to build local changes, you can use:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
nix build -L #
|
|
18
|
+
nix build -L #noir_wasm
|
|
19
19
|
```
|
package/nodejs/noir_wasm.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
+
* @param {any} args
|
|
5
|
+
* @returns {any}
|
|
6
|
+
*/
|
|
7
|
+
export function compile(args: any): any;
|
|
8
|
+
/**
|
|
4
9
|
* @param {string} level
|
|
5
10
|
*/
|
|
6
11
|
export function init_log_level(level: string): void;
|
|
@@ -18,18 +23,3 @@ export function acir_read_bytes(bytes: Uint8Array): any;
|
|
|
18
23
|
* @returns {Uint8Array}
|
|
19
24
|
*/
|
|
20
25
|
export function acir_write_bytes(acir: any): Uint8Array;
|
|
21
|
-
/**
|
|
22
|
-
* @param {any} args
|
|
23
|
-
* @returns {any}
|
|
24
|
-
*/
|
|
25
|
-
export function compile(args: any): any;
|
|
26
|
-
/**
|
|
27
|
-
* A struct representing a Trap
|
|
28
|
-
*/
|
|
29
|
-
export class Trap {
|
|
30
|
-
free(): void;
|
|
31
|
-
/**
|
|
32
|
-
* @returns {Symbol}
|
|
33
|
-
*/
|
|
34
|
-
static __wbgd_downcast_token(): Symbol;
|
|
35
|
-
}
|
package/nodejs/noir_wasm.js
CHANGED
|
@@ -119,6 +119,22 @@ function getInt32Memory0() {
|
|
|
119
119
|
return cachedInt32Memory0;
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
|
+
* @param {any} args
|
|
123
|
+
* @returns {any}
|
|
124
|
+
*/
|
|
125
|
+
module.exports.compile = function(args) {
|
|
126
|
+
const ret = wasm.compile(addHeapObject(args));
|
|
127
|
+
return takeObject(ret);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
function handleError(f, args) {
|
|
131
|
+
try {
|
|
132
|
+
return f.apply(this, args);
|
|
133
|
+
} catch (e) {
|
|
134
|
+
wasm.__wbindgen_export_2(addHeapObject(e));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
122
138
|
* @param {string} level
|
|
123
139
|
*/
|
|
124
140
|
module.exports.init_log_level = function(level) {
|
|
@@ -167,59 +183,13 @@ module.exports.acir_write_bytes = function(acir) {
|
|
|
167
183
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
168
184
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
169
185
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
170
|
-
wasm.
|
|
186
|
+
wasm.__wbindgen_export_3(r0, r1 * 1);
|
|
171
187
|
return v1;
|
|
172
188
|
} finally {
|
|
173
189
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
174
190
|
}
|
|
175
191
|
};
|
|
176
192
|
|
|
177
|
-
/**
|
|
178
|
-
* @param {any} args
|
|
179
|
-
* @returns {any}
|
|
180
|
-
*/
|
|
181
|
-
module.exports.compile = function(args) {
|
|
182
|
-
const ret = wasm.compile(addHeapObject(args));
|
|
183
|
-
return takeObject(ret);
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
function handleError(f, args) {
|
|
187
|
-
try {
|
|
188
|
-
return f.apply(this, args);
|
|
189
|
-
} catch (e) {
|
|
190
|
-
wasm.__wbindgen_export_3(addHeapObject(e));
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* A struct representing a Trap
|
|
195
|
-
*/
|
|
196
|
-
class Trap {
|
|
197
|
-
|
|
198
|
-
__destroy_into_raw() {
|
|
199
|
-
const ptr = this.__wbg_ptr;
|
|
200
|
-
this.__wbg_ptr = 0;
|
|
201
|
-
|
|
202
|
-
return ptr;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
free() {
|
|
206
|
-
const ptr = this.__destroy_into_raw();
|
|
207
|
-
wasm.__wbg_trap_free(ptr);
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* @returns {Symbol}
|
|
211
|
-
*/
|
|
212
|
-
static __wbgd_downcast_token() {
|
|
213
|
-
const ret = wasm.trap___wbgd_downcast_token();
|
|
214
|
-
return takeObject(ret);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
module.exports.Trap = Trap;
|
|
218
|
-
|
|
219
|
-
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
220
|
-
takeObject(arg0);
|
|
221
|
-
};
|
|
222
|
-
|
|
223
193
|
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
224
194
|
const ret = getObject(arg0) === undefined;
|
|
225
195
|
return ret;
|
|
@@ -230,6 +200,18 @@ module.exports.__wbindgen_is_null = function(arg0) {
|
|
|
230
200
|
return ret;
|
|
231
201
|
};
|
|
232
202
|
|
|
203
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
204
|
+
takeObject(arg0);
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
module.exports.__wbg_readfile_0c1777c7c5aa8c92 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
208
|
+
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
209
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
210
|
+
const len1 = WASM_VECTOR_LEN;
|
|
211
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
212
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
213
|
+
}, arguments) };
|
|
214
|
+
|
|
233
215
|
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
234
216
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
235
217
|
return addHeapObject(ret);
|
|
@@ -256,42 +238,10 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
|
256
238
|
deferred0_1 = arg1;
|
|
257
239
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
258
240
|
} finally {
|
|
259
|
-
wasm.
|
|
241
|
+
wasm.__wbindgen_export_3(deferred0_0, deferred0_1);
|
|
260
242
|
}
|
|
261
243
|
};
|
|
262
244
|
|
|
263
|
-
module.exports.__wbg_readfile_8efacfffd6a3a749 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
264
|
-
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
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;
|
|
269
|
-
}, arguments) };
|
|
270
|
-
|
|
271
|
-
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
272
|
-
const ret = getObject(arg0);
|
|
273
|
-
return addHeapObject(ret);
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
277
|
-
const obj = getObject(arg1);
|
|
278
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
279
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
280
|
-
var len1 = WASM_VECTOR_LEN;
|
|
281
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
282
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
module.exports.__wbg_static_accessor_SYMBOL_45d4d15e3c4aeb33 = function() {
|
|
286
|
-
const ret = Symbol;
|
|
287
|
-
return addHeapObject(ret);
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
module.exports.__wbindgen_is_symbol = function(arg0) {
|
|
291
|
-
const ret = typeof(getObject(arg0)) === 'symbol';
|
|
292
|
-
return ret;
|
|
293
|
-
};
|
|
294
|
-
|
|
295
245
|
module.exports.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
|
|
296
246
|
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
297
247
|
};
|
|
@@ -316,10 +266,14 @@ module.exports.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
|
|
|
316
266
|
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
317
267
|
};
|
|
318
268
|
|
|
319
|
-
module.exports.
|
|
320
|
-
const
|
|
321
|
-
|
|
322
|
-
|
|
269
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
270
|
+
const obj = getObject(arg1);
|
|
271
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
272
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
273
|
+
var len1 = WASM_VECTOR_LEN;
|
|
274
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
275
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
276
|
+
};
|
|
323
277
|
|
|
324
278
|
module.exports.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {
|
|
325
279
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
package/nodejs/noir_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export function compile(a: number): number;
|
|
4
5
|
export function init_log_level(a: number, b: number): void;
|
|
5
6
|
export function build_info(): number;
|
|
6
7
|
export function acir_read_bytes(a: number, b: number): number;
|
|
7
8
|
export function acir_write_bytes(a: number, b: number): void;
|
|
8
|
-
export function compile(a: number): number;
|
|
9
|
-
export function __wbg_trap_free(a: number): void;
|
|
10
|
-
export function trap___wbgd_downcast_token(): number;
|
|
11
9
|
export function __wbindgen_export_0(a: number): number;
|
|
12
10
|
export function __wbindgen_export_1(a: number, b: number, c: number): number;
|
|
11
|
+
export function __wbindgen_export_2(a: number): void;
|
|
13
12
|
export function __wbindgen_add_to_stack_pointer(a: number): number;
|
|
14
|
-
export function
|
|
15
|
-
export function __wbindgen_export_3(a: number): void;
|
|
13
|
+
export function __wbindgen_export_3(a: number, b: number): void;
|
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.16.0-1b40af8c1",
|
|
7
7
|
"license": "(MIT OR Apache-2.0)",
|
|
8
8
|
"main": "./nodejs/noir_wasm.js",
|
|
9
9
|
"types": "./web/noir_wasm.d.ts",
|
|
@@ -20,19 +20,22 @@
|
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "bash ./build.sh",
|
|
23
|
-
"test": "
|
|
24
|
-
"test:node": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"
|
|
25
|
-
"test:browser": "web-test-runner"
|
|
23
|
+
"test": "yarn test:node && yarn test:browser",
|
|
24
|
+
"test:node": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' mocha",
|
|
25
|
+
"test:browser": "web-test-runner",
|
|
26
|
+
"clean": "chmod u+w web nodejs || true && rm -rf ./nodejs ./web ./target ./result",
|
|
27
|
+
"nightly:version": "jq --arg new_version \"-$(git rev-parse --short HEAD)\" '.version = .version + $new_version' package.json > package-tmp.json && mv package-tmp.json package.json",
|
|
28
|
+
"publish": "echo 📡 publishing `$npm_package_name` && yarn npm publish",
|
|
29
|
+
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0"
|
|
26
30
|
},
|
|
27
31
|
"peerDependencies": {
|
|
28
|
-
"@noir-lang/source-resolver": "
|
|
32
|
+
"@noir-lang/source-resolver": "0.16.0-1b40af8c1"
|
|
29
33
|
},
|
|
30
34
|
"devDependencies": {
|
|
31
35
|
"@esm-bundle/chai": "^4.3.4-fix.0",
|
|
32
36
|
"@web/dev-server-esbuild": "^0.3.6",
|
|
33
37
|
"@web/test-runner": "^0.15.3",
|
|
34
38
|
"@web/test-runner-playwright": "^0.10.0",
|
|
35
|
-
"@web/test-runner-webdriver": "^0.7.0",
|
|
36
39
|
"mocha": "^10.2.0"
|
|
37
40
|
}
|
|
38
|
-
}
|
|
41
|
+
}
|
package/web/noir_wasm.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
+
* @param {any} args
|
|
5
|
+
* @returns {any}
|
|
6
|
+
*/
|
|
7
|
+
export function compile(args: any): any;
|
|
8
|
+
/**
|
|
4
9
|
* @param {string} level
|
|
5
10
|
*/
|
|
6
11
|
export function init_log_level(level: string): void;
|
|
@@ -18,38 +23,21 @@ export function acir_read_bytes(bytes: Uint8Array): any;
|
|
|
18
23
|
* @returns {Uint8Array}
|
|
19
24
|
*/
|
|
20
25
|
export function acir_write_bytes(acir: any): Uint8Array;
|
|
21
|
-
/**
|
|
22
|
-
* @param {any} args
|
|
23
|
-
* @returns {any}
|
|
24
|
-
*/
|
|
25
|
-
export function compile(args: any): any;
|
|
26
|
-
/**
|
|
27
|
-
* A struct representing a Trap
|
|
28
|
-
*/
|
|
29
|
-
export class Trap {
|
|
30
|
-
free(): void;
|
|
31
|
-
/**
|
|
32
|
-
* @returns {Symbol}
|
|
33
|
-
*/
|
|
34
|
-
static __wbgd_downcast_token(): Symbol;
|
|
35
|
-
}
|
|
36
26
|
|
|
37
27
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
38
28
|
|
|
39
29
|
export interface InitOutput {
|
|
40
30
|
readonly memory: WebAssembly.Memory;
|
|
31
|
+
readonly compile: (a: number) => number;
|
|
41
32
|
readonly init_log_level: (a: number, b: number) => void;
|
|
42
33
|
readonly build_info: () => number;
|
|
43
34
|
readonly acir_read_bytes: (a: number, b: number) => number;
|
|
44
35
|
readonly acir_write_bytes: (a: number, b: number) => void;
|
|
45
|
-
readonly compile: (a: number) => number;
|
|
46
|
-
readonly __wbg_trap_free: (a: number) => void;
|
|
47
|
-
readonly trap___wbgd_downcast_token: () => number;
|
|
48
36
|
readonly __wbindgen_export_0: (a: number) => number;
|
|
49
37
|
readonly __wbindgen_export_1: (a: number, b: number, c: number) => number;
|
|
38
|
+
readonly __wbindgen_export_2: (a: number) => void;
|
|
50
39
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
51
|
-
readonly
|
|
52
|
-
readonly __wbindgen_export_3: (a: number) => void;
|
|
40
|
+
readonly __wbindgen_export_3: (a: number, b: number) => void;
|
|
53
41
|
}
|
|
54
42
|
|
|
55
43
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
package/web/noir_wasm.js
CHANGED
|
@@ -117,6 +117,22 @@ function getInt32Memory0() {
|
|
|
117
117
|
return cachedInt32Memory0;
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
120
|
+
* @param {any} args
|
|
121
|
+
* @returns {any}
|
|
122
|
+
*/
|
|
123
|
+
export function compile(args) {
|
|
124
|
+
const ret = wasm.compile(addHeapObject(args));
|
|
125
|
+
return takeObject(ret);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function handleError(f, args) {
|
|
129
|
+
try {
|
|
130
|
+
return f.apply(this, args);
|
|
131
|
+
} catch (e) {
|
|
132
|
+
wasm.__wbindgen_export_2(addHeapObject(e));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
120
136
|
* @param {string} level
|
|
121
137
|
*/
|
|
122
138
|
export function init_log_level(level) {
|
|
@@ -165,54 +181,13 @@ export function acir_write_bytes(acir) {
|
|
|
165
181
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
166
182
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
167
183
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
168
|
-
wasm.
|
|
184
|
+
wasm.__wbindgen_export_3(r0, r1 * 1);
|
|
169
185
|
return v1;
|
|
170
186
|
} finally {
|
|
171
187
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
172
188
|
}
|
|
173
189
|
}
|
|
174
190
|
|
|
175
|
-
/**
|
|
176
|
-
* @param {any} args
|
|
177
|
-
* @returns {any}
|
|
178
|
-
*/
|
|
179
|
-
export function compile(args) {
|
|
180
|
-
const ret = wasm.compile(addHeapObject(args));
|
|
181
|
-
return takeObject(ret);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
function handleError(f, args) {
|
|
185
|
-
try {
|
|
186
|
-
return f.apply(this, args);
|
|
187
|
-
} catch (e) {
|
|
188
|
-
wasm.__wbindgen_export_3(addHeapObject(e));
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* A struct representing a Trap
|
|
193
|
-
*/
|
|
194
|
-
export class Trap {
|
|
195
|
-
|
|
196
|
-
__destroy_into_raw() {
|
|
197
|
-
const ptr = this.__wbg_ptr;
|
|
198
|
-
this.__wbg_ptr = 0;
|
|
199
|
-
|
|
200
|
-
return ptr;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
free() {
|
|
204
|
-
const ptr = this.__destroy_into_raw();
|
|
205
|
-
wasm.__wbg_trap_free(ptr);
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* @returns {Symbol}
|
|
209
|
-
*/
|
|
210
|
-
static __wbgd_downcast_token() {
|
|
211
|
-
const ret = wasm.trap___wbgd_downcast_token();
|
|
212
|
-
return takeObject(ret);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
191
|
async function __wbg_load(module, imports) {
|
|
217
192
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
218
193
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
@@ -247,9 +222,6 @@ async function __wbg_load(module, imports) {
|
|
|
247
222
|
function __wbg_get_imports() {
|
|
248
223
|
const imports = {};
|
|
249
224
|
imports.wbg = {};
|
|
250
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
251
|
-
takeObject(arg0);
|
|
252
|
-
};
|
|
253
225
|
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
254
226
|
const ret = getObject(arg0) === undefined;
|
|
255
227
|
return ret;
|
|
@@ -258,6 +230,16 @@ function __wbg_get_imports() {
|
|
|
258
230
|
const ret = getObject(arg0) === null;
|
|
259
231
|
return ret;
|
|
260
232
|
};
|
|
233
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
234
|
+
takeObject(arg0);
|
|
235
|
+
};
|
|
236
|
+
imports.wbg.__wbg_readfile_0c1777c7c5aa8c92 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
237
|
+
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
238
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
239
|
+
const len1 = WASM_VECTOR_LEN;
|
|
240
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
241
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
242
|
+
}, arguments) };
|
|
261
243
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
262
244
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
263
245
|
return addHeapObject(ret);
|
|
@@ -281,36 +263,9 @@ function __wbg_get_imports() {
|
|
|
281
263
|
deferred0_1 = arg1;
|
|
282
264
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
283
265
|
} finally {
|
|
284
|
-
wasm.
|
|
266
|
+
wasm.__wbindgen_export_3(deferred0_0, deferred0_1);
|
|
285
267
|
}
|
|
286
268
|
};
|
|
287
|
-
imports.wbg.__wbg_readfile_8efacfffd6a3a749 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
288
|
-
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
289
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
290
|
-
const len1 = WASM_VECTOR_LEN;
|
|
291
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
292
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
293
|
-
}, arguments) };
|
|
294
|
-
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
295
|
-
const ret = getObject(arg0);
|
|
296
|
-
return addHeapObject(ret);
|
|
297
|
-
};
|
|
298
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
299
|
-
const obj = getObject(arg1);
|
|
300
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
301
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
302
|
-
var len1 = WASM_VECTOR_LEN;
|
|
303
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
304
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
305
|
-
};
|
|
306
|
-
imports.wbg.__wbg_static_accessor_SYMBOL_45d4d15e3c4aeb33 = function() {
|
|
307
|
-
const ret = Symbol;
|
|
308
|
-
return addHeapObject(ret);
|
|
309
|
-
};
|
|
310
|
-
imports.wbg.__wbindgen_is_symbol = function(arg0) {
|
|
311
|
-
const ret = typeof(getObject(arg0)) === 'symbol';
|
|
312
|
-
return ret;
|
|
313
|
-
};
|
|
314
269
|
imports.wbg.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
|
|
315
270
|
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
316
271
|
};
|
|
@@ -329,10 +284,14 @@ function __wbg_get_imports() {
|
|
|
329
284
|
imports.wbg.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
|
|
330
285
|
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
331
286
|
};
|
|
332
|
-
imports.wbg.
|
|
333
|
-
const
|
|
334
|
-
|
|
335
|
-
|
|
287
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
288
|
+
const obj = getObject(arg1);
|
|
289
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
290
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
291
|
+
var len1 = WASM_VECTOR_LEN;
|
|
292
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
293
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
294
|
+
};
|
|
336
295
|
imports.wbg.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {
|
|
337
296
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
338
297
|
return addHeapObject(ret);
|
package/web/noir_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export function compile(a: number): number;
|
|
4
5
|
export function init_log_level(a: number, b: number): void;
|
|
5
6
|
export function build_info(): number;
|
|
6
7
|
export function acir_read_bytes(a: number, b: number): number;
|
|
7
8
|
export function acir_write_bytes(a: number, b: number): void;
|
|
8
|
-
export function compile(a: number): number;
|
|
9
|
-
export function __wbg_trap_free(a: number): void;
|
|
10
|
-
export function trap___wbgd_downcast_token(): number;
|
|
11
9
|
export function __wbindgen_export_0(a: number): number;
|
|
12
10
|
export function __wbindgen_export_1(a: number, b: number, c: number): number;
|
|
11
|
+
export function __wbindgen_export_2(a: number): void;
|
|
13
12
|
export function __wbindgen_add_to_stack_pointer(a: number): number;
|
|
14
|
-
export function
|
|
15
|
-
export function __wbindgen_export_3(a: number): void;
|
|
13
|
+
export function __wbindgen_export_3(a: number, b: number): void;
|