@noir-lang/noir_wasm 0.2.0-5bd4bd5 → 0.2.0-93d83bf

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@5bd4bd5](https://github.com/noir-lang/noir/tree/5bd4bd5047e4bc9a67bd79ab2a2519dc0c92da42)
4
+ Noir lang Repository [noir-lang/noir@93d83bf](https://github.com/noir-lang/noir/tree/93d83bf24d9ee340de54bda3d3df80e48855ae66)
@@ -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;
@@ -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
  */
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.2.0-5bd4bd5",
6
+ "version": "0.2.0-93d83bf",
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": "5bd4bd5047e4bc9a67bd79ab2a2519dc0c92da42"
24
+ "versionHash": "93d83bf24d9ee340de54bda3d3df80e48855ae66"
25
25
  }
26
26
  }
@@ -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
  */
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;