@noir-lang/noir_wasm 0.1.1-fd64be5 → 0.2.0-356858b
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 +10 -0
- package/nodejs/noir_wasm.js +34 -5
- package/nodejs/noir_wasm_bg.wasm +0 -0
- package/nodejs/noir_wasm_bg.wasm.d.ts +2 -0
- package/package.json +2 -2
- package/web/noir_wasm.d.ts +12 -0
- package/web/noir_wasm.js +33 -4
- package/web/noir_wasm_bg.wasm +0 -0
- package/web/noir_wasm_bg.wasm.d.ts +2 -0
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@356858b](https://github.com/noir-lang/noir/tree/356858b185e4e6500bbe45c27dddf15b125aaaae)
|
package/nodejs/noir_wasm.d.ts
CHANGED
|
@@ -16,6 +16,16 @@ export function acir_from_bytes(bytes: Uint8Array): any;
|
|
|
16
16
|
*/
|
|
17
17
|
export function acir_to_bytes(acir: any): Uint8Array;
|
|
18
18
|
/**
|
|
19
|
+
* @param {Uint8Array} bytes
|
|
20
|
+
* @returns {any}
|
|
21
|
+
*/
|
|
22
|
+
export function acir_read_bytes(bytes: Uint8Array): any;
|
|
23
|
+
/**
|
|
24
|
+
* @param {any} acir
|
|
25
|
+
* @returns {Uint8Array}
|
|
26
|
+
*/
|
|
27
|
+
export function acir_write_bytes(acir: any): Uint8Array;
|
|
28
|
+
/**
|
|
19
29
|
* @returns {any}
|
|
20
30
|
*/
|
|
21
31
|
export function build_info(): any;
|
package/nodejs/noir_wasm.js
CHANGED
|
@@ -166,6 +166,35 @@ module.exports.acir_to_bytes = function(acir) {
|
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
168
|
|
|
169
|
+
/**
|
|
170
|
+
* @param {Uint8Array} bytes
|
|
171
|
+
* @returns {any}
|
|
172
|
+
*/
|
|
173
|
+
module.exports.acir_read_bytes = function(bytes) {
|
|
174
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export_0);
|
|
175
|
+
const len0 = WASM_VECTOR_LEN;
|
|
176
|
+
const ret = wasm.acir_read_bytes(ptr0, len0);
|
|
177
|
+
return takeObject(ret);
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @param {any} acir
|
|
182
|
+
* @returns {Uint8Array}
|
|
183
|
+
*/
|
|
184
|
+
module.exports.acir_write_bytes = function(acir) {
|
|
185
|
+
try {
|
|
186
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
187
|
+
wasm.acir_write_bytes(retptr, addHeapObject(acir));
|
|
188
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
189
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
190
|
+
var v0 = getArrayU8FromWasm0(r0, r1).slice();
|
|
191
|
+
wasm.__wbindgen_export_2(r0, r1 * 1);
|
|
192
|
+
return v0;
|
|
193
|
+
} finally {
|
|
194
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
|
|
169
198
|
/**
|
|
170
199
|
* @returns {any}
|
|
171
200
|
*/
|
|
@@ -182,16 +211,16 @@ function handleError(f, args) {
|
|
|
182
211
|
}
|
|
183
212
|
}
|
|
184
213
|
|
|
214
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
215
|
+
takeObject(arg0);
|
|
216
|
+
};
|
|
217
|
+
|
|
185
218
|
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
186
219
|
const ret = getObject(arg0) === undefined;
|
|
187
220
|
return ret;
|
|
188
221
|
};
|
|
189
222
|
|
|
190
|
-
module.exports.
|
|
191
|
-
takeObject(arg0);
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
module.exports.__wbg_readfile_141fe7d2c0f1edde = function() { return handleError(function (arg0, arg1, arg2) {
|
|
223
|
+
module.exports.__wbg_readfile_1ed72752a157b319 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
195
224
|
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
196
225
|
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
197
226
|
const len0 = WASM_VECTOR_LEN;
|
package/nodejs/noir_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -4,6 +4,8 @@ export const memory: WebAssembly.Memory;
|
|
|
4
4
|
export function compile(a: number, b: number): number;
|
|
5
5
|
export function acir_from_bytes(a: number, b: number): number;
|
|
6
6
|
export function acir_to_bytes(a: number, b: number): void;
|
|
7
|
+
export function acir_read_bytes(a: number, b: number): number;
|
|
8
|
+
export function acir_write_bytes(a: number, b: number): void;
|
|
7
9
|
export function build_info(): number;
|
|
8
10
|
export function __wbindgen_export_0(a: number): number;
|
|
9
11
|
export function __wbindgen_export_1(a: number, b: number, c: number): number;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"collaborators": [
|
|
4
4
|
"The Noir Team <kevtheappdev@gmail.com>"
|
|
5
5
|
],
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.2.0-356858b",
|
|
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": "356858b185e4e6500bbe45c27dddf15b125aaaae"
|
|
25
25
|
}
|
|
26
26
|
}
|
package/web/noir_wasm.d.ts
CHANGED
|
@@ -16,6 +16,16 @@ export function acir_from_bytes(bytes: Uint8Array): any;
|
|
|
16
16
|
*/
|
|
17
17
|
export function acir_to_bytes(acir: any): Uint8Array;
|
|
18
18
|
/**
|
|
19
|
+
* @param {Uint8Array} bytes
|
|
20
|
+
* @returns {any}
|
|
21
|
+
*/
|
|
22
|
+
export function acir_read_bytes(bytes: Uint8Array): any;
|
|
23
|
+
/**
|
|
24
|
+
* @param {any} acir
|
|
25
|
+
* @returns {Uint8Array}
|
|
26
|
+
*/
|
|
27
|
+
export function acir_write_bytes(acir: any): Uint8Array;
|
|
28
|
+
/**
|
|
19
29
|
* @returns {any}
|
|
20
30
|
*/
|
|
21
31
|
export function build_info(): any;
|
|
@@ -27,6 +37,8 @@ export interface InitOutput {
|
|
|
27
37
|
readonly compile: (a: number, b: number) => number;
|
|
28
38
|
readonly acir_from_bytes: (a: number, b: number) => number;
|
|
29
39
|
readonly acir_to_bytes: (a: number, b: number) => void;
|
|
40
|
+
readonly acir_read_bytes: (a: number, b: number) => number;
|
|
41
|
+
readonly acir_write_bytes: (a: number, b: number) => void;
|
|
30
42
|
readonly build_info: () => number;
|
|
31
43
|
readonly __wbindgen_export_0: (a: number) => number;
|
|
32
44
|
readonly __wbindgen_export_1: (a: number, b: number, c: number) => number;
|
package/web/noir_wasm.js
CHANGED
|
@@ -164,6 +164,35 @@ export function acir_to_bytes(acir) {
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
+
/**
|
|
168
|
+
* @param {Uint8Array} bytes
|
|
169
|
+
* @returns {any}
|
|
170
|
+
*/
|
|
171
|
+
export function acir_read_bytes(bytes) {
|
|
172
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export_0);
|
|
173
|
+
const len0 = WASM_VECTOR_LEN;
|
|
174
|
+
const ret = wasm.acir_read_bytes(ptr0, len0);
|
|
175
|
+
return takeObject(ret);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* @param {any} acir
|
|
180
|
+
* @returns {Uint8Array}
|
|
181
|
+
*/
|
|
182
|
+
export function acir_write_bytes(acir) {
|
|
183
|
+
try {
|
|
184
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
185
|
+
wasm.acir_write_bytes(retptr, addHeapObject(acir));
|
|
186
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
187
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
188
|
+
var v0 = getArrayU8FromWasm0(r0, r1).slice();
|
|
189
|
+
wasm.__wbindgen_export_2(r0, r1 * 1);
|
|
190
|
+
return v0;
|
|
191
|
+
} finally {
|
|
192
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
167
196
|
/**
|
|
168
197
|
* @returns {any}
|
|
169
198
|
*/
|
|
@@ -214,14 +243,14 @@ async function load(module, imports) {
|
|
|
214
243
|
function getImports() {
|
|
215
244
|
const imports = {};
|
|
216
245
|
imports.wbg = {};
|
|
246
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
247
|
+
takeObject(arg0);
|
|
248
|
+
};
|
|
217
249
|
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
218
250
|
const ret = getObject(arg0) === undefined;
|
|
219
251
|
return ret;
|
|
220
252
|
};
|
|
221
|
-
imports.wbg.
|
|
222
|
-
takeObject(arg0);
|
|
223
|
-
};
|
|
224
|
-
imports.wbg.__wbg_readfile_141fe7d2c0f1edde = function() { return handleError(function (arg0, arg1, arg2) {
|
|
253
|
+
imports.wbg.__wbg_readfile_1ed72752a157b319 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
225
254
|
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
226
255
|
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
227
256
|
const len0 = WASM_VECTOR_LEN;
|
package/web/noir_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -4,6 +4,8 @@ export const memory: WebAssembly.Memory;
|
|
|
4
4
|
export function compile(a: number, b: number): number;
|
|
5
5
|
export function acir_from_bytes(a: number, b: number): number;
|
|
6
6
|
export function acir_to_bytes(a: number, b: number): void;
|
|
7
|
+
export function acir_read_bytes(a: number, b: number): number;
|
|
8
|
+
export function acir_write_bytes(a: number, b: number): void;
|
|
7
9
|
export function build_info(): number;
|
|
8
10
|
export function __wbindgen_export_0(a: number): number;
|
|
9
11
|
export function __wbindgen_export_1(a: number, b: number, c: number): number;
|