@noir-lang/noir_wasm 0.2.0-93d83bf → 0.2.0-9bec92a
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 +2 -2
- package/nodejs/noir_wasm.js +20 -22
- package/nodejs/noir_wasm_bg.wasm +0 -0
- package/nodejs/noir_wasm_bg.wasm.d.ts +1 -1
- package/package.json +2 -2
- package/web/noir_wasm.d.ts +3 -3
- package/web/noir_wasm.js +19 -21
- package/web/noir_wasm_bg.wasm +0 -0
- package/web/noir_wasm_bg.wasm.d.ts +1 -1
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@9bec92a](https://github.com/noir-lang/noir/tree/9bec92a3397423beb30eb8b918b51a55dc9ca9c1)
|
package/nodejs/noir_wasm.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
* @param {
|
|
4
|
+
* @param {any} args
|
|
5
5
|
* @returns {any}
|
|
6
6
|
*/
|
|
7
|
-
export function compile(
|
|
7
|
+
export function compile(args: any): any;
|
|
8
8
|
/**
|
|
9
9
|
* @param {Uint8Array} bytes
|
|
10
10
|
* @returns {any}
|
package/nodejs/noir_wasm.js
CHANGED
|
@@ -108,14 +108,21 @@ cachedTextDecoder.decode();
|
|
|
108
108
|
function getStringFromWasm0(ptr, len) {
|
|
109
109
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
110
110
|
}
|
|
111
|
+
|
|
112
|
+
function addHeapObject(obj) {
|
|
113
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
114
|
+
const idx = heap_next;
|
|
115
|
+
heap_next = heap[idx];
|
|
116
|
+
|
|
117
|
+
heap[idx] = obj;
|
|
118
|
+
return idx;
|
|
119
|
+
}
|
|
111
120
|
/**
|
|
112
|
-
* @param {
|
|
121
|
+
* @param {any} args
|
|
113
122
|
* @returns {any}
|
|
114
123
|
*/
|
|
115
|
-
module.exports.compile = function(
|
|
116
|
-
const
|
|
117
|
-
const len0 = WASM_VECTOR_LEN;
|
|
118
|
-
const ret = wasm.compile(ptr0, len0);
|
|
124
|
+
module.exports.compile = function(args) {
|
|
125
|
+
const ret = wasm.compile(addHeapObject(args));
|
|
119
126
|
return takeObject(ret);
|
|
120
127
|
};
|
|
121
128
|
|
|
@@ -136,15 +143,6 @@ module.exports.acir_from_bytes = function(bytes) {
|
|
|
136
143
|
return takeObject(ret);
|
|
137
144
|
};
|
|
138
145
|
|
|
139
|
-
function addHeapObject(obj) {
|
|
140
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
141
|
-
const idx = heap_next;
|
|
142
|
-
heap_next = heap[idx];
|
|
143
|
-
|
|
144
|
-
heap[idx] = obj;
|
|
145
|
-
return idx;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
146
|
function getArrayU8FromWasm0(ptr, len) {
|
|
149
147
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
150
148
|
}
|
|
@@ -220,14 +218,6 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
|
220
218
|
takeObject(arg0);
|
|
221
219
|
};
|
|
222
220
|
|
|
223
|
-
module.exports.__wbg_readfile_1ed72752a157b319 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
224
|
-
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
225
|
-
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
226
|
-
const len0 = WASM_VECTOR_LEN;
|
|
227
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
228
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
229
|
-
}, arguments) };
|
|
230
|
-
|
|
231
221
|
module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
232
222
|
const ret = new Error();
|
|
233
223
|
return addHeapObject(ret);
|
|
@@ -249,6 +239,14 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
|
249
239
|
}
|
|
250
240
|
};
|
|
251
241
|
|
|
242
|
+
module.exports.__wbg_readfile_1ed72752a157b319 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
243
|
+
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
244
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
245
|
+
const len0 = WASM_VECTOR_LEN;
|
|
246
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
247
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
248
|
+
}, arguments) };
|
|
249
|
+
|
|
252
250
|
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
253
251
|
const obj = getObject(arg1);
|
|
254
252
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
package/nodejs/noir_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export function compile(a: number
|
|
4
|
+
export function compile(a: 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
7
|
export function acir_read_bytes(a: number, b: 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.2.0-
|
|
6
|
+
"version": "0.2.0-9bec92a",
|
|
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": "9bec92a3397423beb30eb8b918b51a55dc9ca9c1"
|
|
25
25
|
}
|
|
26
26
|
}
|
package/web/noir_wasm.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
* @param {
|
|
4
|
+
* @param {any} args
|
|
5
5
|
* @returns {any}
|
|
6
6
|
*/
|
|
7
|
-
export function compile(
|
|
7
|
+
export function compile(args: any): any;
|
|
8
8
|
/**
|
|
9
9
|
* @param {Uint8Array} bytes
|
|
10
10
|
* @returns {any}
|
|
@@ -34,7 +34,7 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
34
34
|
|
|
35
35
|
export interface InitOutput {
|
|
36
36
|
readonly memory: WebAssembly.Memory;
|
|
37
|
-
readonly compile: (a: number
|
|
37
|
+
readonly compile: (a: number) => number;
|
|
38
38
|
readonly acir_from_bytes: (a: number, b: number) => number;
|
|
39
39
|
readonly acir_to_bytes: (a: number, b: number) => void;
|
|
40
40
|
readonly acir_read_bytes: (a: number, b: number) => number;
|
package/web/noir_wasm.js
CHANGED
|
@@ -106,14 +106,21 @@ cachedTextDecoder.decode();
|
|
|
106
106
|
function getStringFromWasm0(ptr, len) {
|
|
107
107
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
108
108
|
}
|
|
109
|
+
|
|
110
|
+
function addHeapObject(obj) {
|
|
111
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
112
|
+
const idx = heap_next;
|
|
113
|
+
heap_next = heap[idx];
|
|
114
|
+
|
|
115
|
+
heap[idx] = obj;
|
|
116
|
+
return idx;
|
|
117
|
+
}
|
|
109
118
|
/**
|
|
110
|
-
* @param {
|
|
119
|
+
* @param {any} args
|
|
111
120
|
* @returns {any}
|
|
112
121
|
*/
|
|
113
|
-
export function compile(
|
|
114
|
-
const
|
|
115
|
-
const len0 = WASM_VECTOR_LEN;
|
|
116
|
-
const ret = wasm.compile(ptr0, len0);
|
|
122
|
+
export function compile(args) {
|
|
123
|
+
const ret = wasm.compile(addHeapObject(args));
|
|
117
124
|
return takeObject(ret);
|
|
118
125
|
}
|
|
119
126
|
|
|
@@ -134,15 +141,6 @@ export function acir_from_bytes(bytes) {
|
|
|
134
141
|
return takeObject(ret);
|
|
135
142
|
}
|
|
136
143
|
|
|
137
|
-
function addHeapObject(obj) {
|
|
138
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
139
|
-
const idx = heap_next;
|
|
140
|
-
heap_next = heap[idx];
|
|
141
|
-
|
|
142
|
-
heap[idx] = obj;
|
|
143
|
-
return idx;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
144
|
function getArrayU8FromWasm0(ptr, len) {
|
|
147
145
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
148
146
|
}
|
|
@@ -250,13 +248,6 @@ function getImports() {
|
|
|
250
248
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
251
249
|
takeObject(arg0);
|
|
252
250
|
};
|
|
253
|
-
imports.wbg.__wbg_readfile_1ed72752a157b319 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
254
|
-
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
255
|
-
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
256
|
-
const len0 = WASM_VECTOR_LEN;
|
|
257
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
258
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
259
|
-
}, arguments) };
|
|
260
251
|
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
261
252
|
const ret = new Error();
|
|
262
253
|
return addHeapObject(ret);
|
|
@@ -275,6 +266,13 @@ function getImports() {
|
|
|
275
266
|
wasm.__wbindgen_export_2(arg0, arg1);
|
|
276
267
|
}
|
|
277
268
|
};
|
|
269
|
+
imports.wbg.__wbg_readfile_1ed72752a157b319 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
270
|
+
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
271
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
272
|
+
const len0 = WASM_VECTOR_LEN;
|
|
273
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
274
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
275
|
+
}, arguments) };
|
|
278
276
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
279
277
|
const obj = getObject(arg1);
|
|
280
278
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
package/web/noir_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export function compile(a: number
|
|
4
|
+
export function compile(a: 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
7
|
export function acir_read_bytes(a: number, b: number): number;
|