@noir-lang/noir_wasm 0.3.1-70ede61 → 0.3.2-29b1f7df
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.js +44 -38
- package/nodejs/noir_wasm_bg.wasm +0 -0
- package/package.json +3 -3
- package/web/noir_wasm.js +1 -1
- package/web/noir_wasm_bg.wasm +0 -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@29b1f7df](https://github.com/noir-lang/noir/tree/29b1f7df4d563849a62e64c533cb62932188135b)
|
package/nodejs/noir_wasm.js
CHANGED
|
@@ -39,16 +39,16 @@ let cachedTextEncoder = new TextEncoder('utf-8');
|
|
|
39
39
|
|
|
40
40
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
41
41
|
? function (arg, view) {
|
|
42
|
-
|
|
43
|
-
}
|
|
42
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
43
|
+
}
|
|
44
44
|
: function (arg, view) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
});
|
|
45
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
46
|
+
view.set(buf);
|
|
47
|
+
return {
|
|
48
|
+
read: arg.length,
|
|
49
|
+
written: buf.length
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
52
|
|
|
53
53
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
54
54
|
|
|
@@ -121,7 +121,7 @@ function addHeapObject(obj) {
|
|
|
121
121
|
* @param {any} args
|
|
122
122
|
* @returns {any}
|
|
123
123
|
*/
|
|
124
|
-
module.exports.compile = function(args) {
|
|
124
|
+
module.exports.compile = function (args) {
|
|
125
125
|
const ret = wasm.compile(addHeapObject(args));
|
|
126
126
|
return takeObject(ret);
|
|
127
127
|
};
|
|
@@ -136,7 +136,7 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
136
136
|
* @param {Uint8Array} bytes
|
|
137
137
|
* @returns {any}
|
|
138
138
|
*/
|
|
139
|
-
module.exports.acir_from_bytes = function(bytes) {
|
|
139
|
+
module.exports.acir_from_bytes = function (bytes) {
|
|
140
140
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export_0);
|
|
141
141
|
const len0 = WASM_VECTOR_LEN;
|
|
142
142
|
const ret = wasm.acir_from_bytes(ptr0, len0);
|
|
@@ -150,7 +150,7 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
150
150
|
* @param {any} acir
|
|
151
151
|
* @returns {Uint8Array}
|
|
152
152
|
*/
|
|
153
|
-
module.exports.acir_to_bytes = function(acir) {
|
|
153
|
+
module.exports.acir_to_bytes = function (acir) {
|
|
154
154
|
try {
|
|
155
155
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
156
156
|
wasm.acir_to_bytes(retptr, addHeapObject(acir));
|
|
@@ -168,7 +168,7 @@ module.exports.acir_to_bytes = function(acir) {
|
|
|
168
168
|
* @param {Uint8Array} bytes
|
|
169
169
|
* @returns {any}
|
|
170
170
|
*/
|
|
171
|
-
module.exports.acir_read_bytes = function(bytes) {
|
|
171
|
+
module.exports.acir_read_bytes = function (bytes) {
|
|
172
172
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export_0);
|
|
173
173
|
const len0 = WASM_VECTOR_LEN;
|
|
174
174
|
const ret = wasm.acir_read_bytes(ptr0, len0);
|
|
@@ -179,7 +179,7 @@ module.exports.acir_read_bytes = function(bytes) {
|
|
|
179
179
|
* @param {any} acir
|
|
180
180
|
* @returns {Uint8Array}
|
|
181
181
|
*/
|
|
182
|
-
module.exports.acir_write_bytes = function(acir) {
|
|
182
|
+
module.exports.acir_write_bytes = function (acir) {
|
|
183
183
|
try {
|
|
184
184
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
185
185
|
wasm.acir_write_bytes(retptr, addHeapObject(acir));
|
|
@@ -196,7 +196,7 @@ module.exports.acir_write_bytes = function(acir) {
|
|
|
196
196
|
/**
|
|
197
197
|
* @returns {any}
|
|
198
198
|
*/
|
|
199
|
-
module.exports.build_info = function() {
|
|
199
|
+
module.exports.build_info = function () {
|
|
200
200
|
const ret = wasm.build_info();
|
|
201
201
|
return takeObject(ret);
|
|
202
202
|
};
|
|
@@ -209,21 +209,21 @@ function handleError(f, args) {
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
212
|
+
module.exports.__wbindgen_is_undefined = function (arg0) {
|
|
213
213
|
const ret = getObject(arg0) === undefined;
|
|
214
214
|
return ret;
|
|
215
215
|
};
|
|
216
216
|
|
|
217
|
-
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
217
|
+
module.exports.__wbindgen_object_drop_ref = function (arg0) {
|
|
218
218
|
takeObject(arg0);
|
|
219
219
|
};
|
|
220
220
|
|
|
221
|
-
module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
221
|
+
module.exports.__wbg_new_abda76e883ba8a5f = function () {
|
|
222
222
|
const ret = new Error();
|
|
223
223
|
return addHeapObject(ret);
|
|
224
224
|
};
|
|
225
225
|
|
|
226
|
-
module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
226
|
+
module.exports.__wbg_stack_658279fe44541cf6 = function (arg0, arg1) {
|
|
227
227
|
const ret = getObject(arg1).stack;
|
|
228
228
|
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
229
229
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -231,7 +231,7 @@ module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
|
231
231
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
232
232
|
};
|
|
233
233
|
|
|
234
|
-
module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
234
|
+
module.exports.__wbg_error_f851667af71bcfc6 = function (arg0, arg1) {
|
|
235
235
|
try {
|
|
236
236
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
237
237
|
} finally {
|
|
@@ -239,34 +239,40 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
|
239
239
|
}
|
|
240
240
|
};
|
|
241
241
|
|
|
242
|
-
module.exports.
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
242
|
+
module.exports.__wbg_readfile_a43240e6f11dd5eb = function () {
|
|
243
|
+
return handleError(function (arg0, arg1, arg2) {
|
|
244
|
+
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
245
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
246
|
+
const len0 = WASM_VECTOR_LEN;
|
|
247
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
248
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
249
|
+
}, arguments)
|
|
250
|
+
};
|
|
249
251
|
|
|
250
|
-
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
252
|
+
module.exports.__wbindgen_string_get = function (arg0, arg1) {
|
|
251
253
|
const obj = getObject(arg1);
|
|
252
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
254
|
+
const ret = typeof (obj) === 'string' ? obj : undefined;
|
|
253
255
|
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
254
256
|
var len0 = WASM_VECTOR_LEN;
|
|
255
257
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
256
258
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
257
259
|
};
|
|
258
260
|
|
|
259
|
-
module.exports.__wbg_parse_3ac95b51fc312db8 = function
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
module.exports.__wbg_parse_3ac95b51fc312db8 = function () {
|
|
262
|
+
return handleError(function (arg0, arg1) {
|
|
263
|
+
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
264
|
+
return addHeapObject(ret);
|
|
265
|
+
}, arguments)
|
|
266
|
+
};
|
|
263
267
|
|
|
264
|
-
module.exports.__wbg_stringify_029a979dfb73aa17 = function
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
+
module.exports.__wbg_stringify_029a979dfb73aa17 = function () {
|
|
269
|
+
return handleError(function (arg0) {
|
|
270
|
+
const ret = JSON.stringify(getObject(arg0));
|
|
271
|
+
return addHeapObject(ret);
|
|
272
|
+
}, arguments)
|
|
273
|
+
};
|
|
268
274
|
|
|
269
|
-
module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
275
|
+
module.exports.__wbindgen_throw = function (arg0, arg1) {
|
|
270
276
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
271
277
|
};
|
|
272
278
|
|
package/nodejs/noir_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"collaborators": [
|
|
4
4
|
"The Noir Team <kevtheappdev@gmail.com>"
|
|
5
5
|
],
|
|
6
|
-
"version": "0.3.
|
|
6
|
+
"version": "0.3.2-29b1f7df",
|
|
7
7
|
"files": [
|
|
8
8
|
"nodejs",
|
|
9
9
|
"web",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"module": "./web/noir_wasm.js",
|
|
15
15
|
"sideEffects": false,
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@noir-lang/noir-source-resolver": "1.
|
|
17
|
+
"@noir-lang/noir-source-resolver": "1.1.0"
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
21
|
"url": "https://github.com/noir-lang/noir_wasm.git"
|
|
22
22
|
},
|
|
23
23
|
"compiler": {
|
|
24
|
-
"versionHash": "
|
|
24
|
+
"versionHash": "29b1f7df4d563849a62e64c533cb62932188135b"
|
|
25
25
|
}
|
|
26
26
|
}
|
package/web/noir_wasm.js
CHANGED
|
@@ -266,7 +266,7 @@ function getImports() {
|
|
|
266
266
|
wasm.__wbindgen_export_2(arg0, arg1);
|
|
267
267
|
}
|
|
268
268
|
};
|
|
269
|
-
imports.wbg.
|
|
269
|
+
imports.wbg.__wbg_readfile_a43240e6f11dd5eb = function() { return handleError(function (arg0, arg1, arg2) {
|
|
270
270
|
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
|
271
271
|
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
272
272
|
const len0 = WASM_VECTOR_LEN;
|
package/web/noir_wasm_bg.wasm
CHANGED
|
Binary file
|