@noir-lang/noir_wasm 0.1.1-f329379 → 0.2.0-007ab75

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 CHANGED
@@ -1,4 +1,4 @@
1
1
  # Noir Lang WASM JavaScript Package
2
2
 
3
3
  ## Tracks
4
- Noir lang Repository [noir-lang/noir@f329379](https://github.com/noir-lang/noir/tree/f3293793e7fd4a595971c24c4dcab9b0e7b921dd)
4
+ Noir lang Repository [noir-lang/noir@007ab75](https://github.com/noir-lang/noir/tree/007ab75abc6581c604791b14ecc5e8e73157e7c8)
@@ -15,3 +15,17 @@ export function acir_from_bytes(bytes: Uint8Array): any;
15
15
  * @returns {Uint8Array}
16
16
  */
17
17
  export function acir_to_bytes(acir: any): Uint8Array;
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
+ /**
29
+ * @returns {any}
30
+ */
31
+ export function build_info(): any;
@@ -166,6 +166,43 @@ 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
+
198
+ /**
199
+ * @returns {any}
200
+ */
201
+ module.exports.build_info = function() {
202
+ const ret = wasm.build_info();
203
+ return takeObject(ret);
204
+ };
205
+
169
206
  function handleError(f, args) {
170
207
  try {
171
208
  return f.apply(this, args);
@@ -183,7 +220,7 @@ module.exports.__wbindgen_is_undefined = function(arg0) {
183
220
  return ret;
184
221
  };
185
222
 
186
- 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) {
187
224
  const ret = read_file(getStringFromWasm0(arg1, arg2));
188
225
  const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
189
226
  const len0 = WASM_VECTOR_LEN;
Binary file
@@ -4,6 +4,9 @@ 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;
9
+ export function build_info(): number;
7
10
  export function __wbindgen_export_0(a: number): number;
8
11
  export function __wbindgen_export_1(a: number, b: number, c: number): number;
9
12
  export function __wbindgen_add_to_stack_pointer(a: 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.1.1-f329379",
6
+ "version": "0.2.0-007ab75",
7
7
  "files": [
8
8
  "nodejs",
9
9
  "web",
@@ -19,5 +19,8 @@
19
19
  "repository": {
20
20
  "type": "git",
21
21
  "url": "https://github.com/noir-lang/noir_wasm.git"
22
+ },
23
+ "compiler": {
24
+ "versionHash": "007ab75abc6581c604791b14ecc5e8e73157e7c8"
22
25
  }
23
26
  }
@@ -15,6 +15,20 @@ export function acir_from_bytes(bytes: Uint8Array): any;
15
15
  * @returns {Uint8Array}
16
16
  */
17
17
  export function acir_to_bytes(acir: any): Uint8Array;
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
+ /**
29
+ * @returns {any}
30
+ */
31
+ export function build_info(): any;
18
32
 
19
33
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
20
34
 
@@ -23,6 +37,9 @@ export interface InitOutput {
23
37
  readonly compile: (a: number, b: number) => number;
24
38
  readonly acir_from_bytes: (a: number, b: number) => number;
25
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;
42
+ readonly build_info: () => number;
26
43
  readonly __wbindgen_export_0: (a: number) => number;
27
44
  readonly __wbindgen_export_1: (a: number, b: number, c: number) => number;
28
45
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
package/web/noir_wasm.js CHANGED
@@ -164,6 +164,43 @@ 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
+
196
+ /**
197
+ * @returns {any}
198
+ */
199
+ export function build_info() {
200
+ const ret = wasm.build_info();
201
+ return takeObject(ret);
202
+ }
203
+
167
204
  function handleError(f, args) {
168
205
  try {
169
206
  return f.apply(this, args);
@@ -213,7 +250,7 @@ function getImports() {
213
250
  const ret = getObject(arg0) === undefined;
214
251
  return ret;
215
252
  };
216
- 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) {
217
254
  const ret = read_file(getStringFromWasm0(arg1, arg2));
218
255
  const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
219
256
  const len0 = WASM_VECTOR_LEN;
Binary file
@@ -4,6 +4,9 @@ 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;
9
+ export function build_info(): number;
7
10
  export function __wbindgen_export_0(a: number): number;
8
11
  export function __wbindgen_export_1(a: number, b: number, c: number): number;
9
12
  export function __wbindgen_add_to_stack_pointer(a: number): number;