@noir-lang/noir_wasm
Advanced tools
Comparing version 0.2.0-5bd4bd5 to 0.2.0-93d83bf
@@ -7,2 +7,4 @@ /* tslint:disable */ | ||
export function acir_to_bytes(a: number, b: number): void; | ||
export function acir_read_bytes(a: number, b: number): number; | ||
export function acir_write_bytes(a: number, b: number): void; | ||
export function build_info(): number; | ||
@@ -9,0 +11,0 @@ export function __wbindgen_export_0(a: number): number; |
@@ -19,4 +19,14 @@ /* tslint:disable */ | ||
/** | ||
* @param {Uint8Array} bytes | ||
* @returns {any} | ||
*/ | ||
export function acir_read_bytes(bytes: Uint8Array): any; | ||
/** | ||
* @param {any} acir | ||
* @returns {Uint8Array} | ||
*/ | ||
export function acir_write_bytes(acir: any): Uint8Array; | ||
/** | ||
* @returns {any} | ||
*/ | ||
export function build_info(): any; |
@@ -170,4 +170,33 @@ let imports = {}; | ||
/** | ||
* @param {Uint8Array} bytes | ||
* @returns {any} | ||
*/ | ||
module.exports.acir_read_bytes = function(bytes) { | ||
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export_0); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.acir_read_bytes(ptr0, len0); | ||
return takeObject(ret); | ||
}; | ||
/** | ||
* @param {any} acir | ||
* @returns {Uint8Array} | ||
*/ | ||
module.exports.acir_write_bytes = function(acir) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.acir_write_bytes(retptr, addHeapObject(acir)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var v0 = getArrayU8FromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_export_2(r0, r1 * 1); | ||
return v0; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
}; | ||
/** | ||
* @returns {any} | ||
*/ | ||
module.exports.build_info = function() { | ||
@@ -174,0 +203,0 @@ const ret = wasm.build_info(); |
@@ -6,3 +6,3 @@ { | ||
], | ||
"version": "0.2.0-5bd4bd5", | ||
"version": "0.2.0-93d83bf", | ||
"files": [ | ||
@@ -25,4 +25,4 @@ "nodejs", | ||
"compiler": { | ||
"versionHash": "5bd4bd5047e4bc9a67bd79ab2a2519dc0c92da42" | ||
"versionHash": "93d83bf24d9ee340de54bda3d3df80e48855ae66" | ||
} | ||
} |
# Noir Lang WASM JavaScript Package | ||
## Tracks | ||
Noir lang Repository [noir-lang/noir@5bd4bd5](https://github.com/noir-lang/noir/tree/5bd4bd5047e4bc9a67bd79ab2a2519dc0c92da42) | ||
Noir lang Repository [noir-lang/noir@93d83bf](https://github.com/noir-lang/noir/tree/93d83bf24d9ee340de54bda3d3df80e48855ae66) |
@@ -7,2 +7,4 @@ /* tslint:disable */ | ||
export function acir_to_bytes(a: number, b: number): void; | ||
export function acir_read_bytes(a: number, b: number): number; | ||
export function acir_write_bytes(a: number, b: number): void; | ||
export function build_info(): number; | ||
@@ -9,0 +11,0 @@ export function __wbindgen_export_0(a: number): number; |
@@ -19,4 +19,14 @@ /* tslint:disable */ | ||
/** | ||
* @param {Uint8Array} bytes | ||
* @returns {any} | ||
*/ | ||
export function acir_read_bytes(bytes: Uint8Array): any; | ||
/** | ||
* @param {any} acir | ||
* @returns {Uint8Array} | ||
*/ | ||
export function acir_write_bytes(acir: any): Uint8Array; | ||
/** | ||
* @returns {any} | ||
*/ | ||
export function build_info(): any; | ||
@@ -31,2 +41,4 @@ | ||
readonly acir_to_bytes: (a: number, b: number) => void; | ||
readonly acir_read_bytes: (a: number, b: number) => number; | ||
readonly acir_write_bytes: (a: number, b: number) => void; | ||
readonly build_info: () => number; | ||
@@ -33,0 +45,0 @@ readonly __wbindgen_export_0: (a: number) => number; |
@@ -168,4 +168,33 @@ import { read_file } from '@noir-lang/noir-source-resolver'; | ||
/** | ||
* @param {Uint8Array} bytes | ||
* @returns {any} | ||
*/ | ||
export function acir_read_bytes(bytes) { | ||
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export_0); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.acir_read_bytes(ptr0, len0); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {any} acir | ||
* @returns {Uint8Array} | ||
*/ | ||
export function acir_write_bytes(acir) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.acir_write_bytes(retptr, addHeapObject(acir)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var v0 = getArrayU8FromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_export_2(r0, r1 * 1); | ||
return v0; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
/** | ||
* @returns {any} | ||
*/ | ||
export function build_info() { | ||
@@ -172,0 +201,0 @@ const ret = wasm.build_info(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
6141626
646