@noir-lang/noir_wasm 0.16.0-20a160c → 0.16.0-38acee5.aztec

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.
@@ -10,6 +10,20 @@ heap.push(undefined, null, true, false);
10
10
 
11
11
  function getObject(idx) { return heap[idx]; }
12
12
 
13
+ let heap_next = heap.length;
14
+
15
+ function dropObject(idx) {
16
+ if (idx < 132) return;
17
+ heap[idx] = heap_next;
18
+ heap_next = idx;
19
+ }
20
+
21
+ function takeObject(idx) {
22
+ const ret = getObject(idx);
23
+ dropObject(idx);
24
+ return ret;
25
+ }
26
+
13
27
  let WASM_VECTOR_LEN = 0;
14
28
 
15
29
  let cachedUint8Memory0 = null;
@@ -87,20 +101,6 @@ function getInt32Memory0() {
87
101
  return cachedInt32Memory0;
88
102
  }
89
103
 
90
- let heap_next = heap.length;
91
-
92
- function dropObject(idx) {
93
- if (idx < 132) return;
94
- heap[idx] = heap_next;
95
- heap_next = idx;
96
- }
97
-
98
- function takeObject(idx) {
99
- const ret = getObject(idx);
100
- dropObject(idx);
101
- return ret;
102
- }
103
-
104
104
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
105
105
 
106
106
  cachedTextDecoder.decode();
@@ -207,19 +207,6 @@ function handleError(f, args) {
207
207
  }
208
208
  }
209
209
 
210
- module.exports.__wbindgen_string_get = function(arg0, arg1) {
211
- const obj = getObject(arg1);
212
- const ret = typeof(obj) === 'string' ? obj : undefined;
213
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
214
- var len1 = WASM_VECTOR_LEN;
215
- getInt32Memory0()[arg0 / 4 + 1] = len1;
216
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
217
- };
218
-
219
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
220
- takeObject(arg0);
221
- };
222
-
223
210
  module.exports.__wbindgen_is_undefined = function(arg0) {
224
211
  const ret = getObject(arg0) === undefined;
225
212
  return ret;
@@ -230,6 +217,19 @@ module.exports.__wbg_constructor_ac1f808f67a5f1e9 = function(arg0) {
230
217
  return addHeapObject(ret);
231
218
  };
232
219
 
220
+ module.exports.__wbindgen_object_drop_ref = function(arg0) {
221
+ takeObject(arg0);
222
+ };
223
+
224
+ module.exports.__wbindgen_string_get = function(arg0, arg1) {
225
+ const obj = getObject(arg1);
226
+ const ret = typeof(obj) === 'string' ? obj : undefined;
227
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
228
+ var len1 = WASM_VECTOR_LEN;
229
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
230
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
231
+ };
232
+
233
233
  module.exports.__wbg_readfile_0c1777c7c5aa8c92 = function() { return handleError(function (arg0, arg1, arg2) {
234
234
  const ret = read_file(getStringFromWasm0(arg1, arg2));
235
235
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
Binary file
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.16.0-20a160c",
6
+ "version": "0.16.0-38acee5.aztec",
7
7
  "license": "(MIT OR Apache-2.0)",
8
8
  "main": "./nodejs/noir_wasm.js",
9
9
  "types": "./web/noir_wasm.d.ts",
@@ -20,16 +20,18 @@
20
20
  },
21
21
  "scripts": {
22
22
  "build": "bash ./build.sh",
23
- "test": "yarn test:node && yarn test:browser",
24
- "test:node": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' mocha",
23
+ "test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",
24
+ "test:node": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",
25
25
  "test:browser": "web-test-runner",
26
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",
27
+ "nightly:version": "jq --arg new_version \"-$(git rev-parse --short HEAD)$1\" '.version = .version + $new_version' package.json > package-tmp.json && mv package-tmp.json package.json",
28
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"
29
+ "lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0",
30
+ "build:nix": "nix build -L .#noir_wasm",
31
+ "install:from:nix": "yarn clean && yarn build:nix && cp -rL ./result/noir_wasm/nodejs ./ && cp -rL ./result/noir_wasm/web ./"
30
32
  },
31
33
  "peerDependencies": {
32
- "@noir-lang/source-resolver": "0.16.0-20a160c"
34
+ "@noir-lang/source-resolver": "0.16.0-38acee5.aztec"
33
35
  },
34
36
  "devDependencies": {
35
37
  "@esm-bundle/chai": "^4.3.4-fix.0",
package/web/noir_wasm.js CHANGED
@@ -8,6 +8,20 @@ heap.push(undefined, null, true, false);
8
8
 
9
9
  function getObject(idx) { return heap[idx]; }
10
10
 
11
+ let heap_next = heap.length;
12
+
13
+ function dropObject(idx) {
14
+ if (idx < 132) return;
15
+ heap[idx] = heap_next;
16
+ heap_next = idx;
17
+ }
18
+
19
+ function takeObject(idx) {
20
+ const ret = getObject(idx);
21
+ dropObject(idx);
22
+ return ret;
23
+ }
24
+
11
25
  let WASM_VECTOR_LEN = 0;
12
26
 
13
27
  let cachedUint8Memory0 = null;
@@ -85,20 +99,6 @@ function getInt32Memory0() {
85
99
  return cachedInt32Memory0;
86
100
  }
87
101
 
88
- let heap_next = heap.length;
89
-
90
- function dropObject(idx) {
91
- if (idx < 132) return;
92
- heap[idx] = heap_next;
93
- heap_next = idx;
94
- }
95
-
96
- function takeObject(idx) {
97
- const ret = getObject(idx);
98
- dropObject(idx);
99
- return ret;
100
- }
101
-
102
102
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
103
103
 
104
104
  if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
@@ -239,17 +239,6 @@ async function __wbg_load(module, imports) {
239
239
  function __wbg_get_imports() {
240
240
  const imports = {};
241
241
  imports.wbg = {};
242
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
243
- const obj = getObject(arg1);
244
- const ret = typeof(obj) === 'string' ? obj : undefined;
245
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
246
- var len1 = WASM_VECTOR_LEN;
247
- getInt32Memory0()[arg0 / 4 + 1] = len1;
248
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
249
- };
250
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
251
- takeObject(arg0);
252
- };
253
242
  imports.wbg.__wbindgen_is_undefined = function(arg0) {
254
243
  const ret = getObject(arg0) === undefined;
255
244
  return ret;
@@ -258,6 +247,17 @@ function __wbg_get_imports() {
258
247
  const ret = new Error(takeObject(arg0));
259
248
  return addHeapObject(ret);
260
249
  };
250
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
251
+ takeObject(arg0);
252
+ };
253
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
254
+ const obj = getObject(arg1);
255
+ const ret = typeof(obj) === 'string' ? obj : undefined;
256
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
257
+ var len1 = WASM_VECTOR_LEN;
258
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
259
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
260
+ };
261
261
  imports.wbg.__wbg_readfile_0c1777c7c5aa8c92 = function() { return handleError(function (arg0, arg1, arg2) {
262
262
  const ret = read_file(getStringFromWasm0(arg1, arg2));
263
263
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
Binary file