@noir-lang/noir_wasm
Advanced tools
Comparing version 0.2.0-93d83bf to 0.2.0-9bec92a
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export const memory: WebAssembly.Memory; | ||
export function compile(a: number, b: number): number; | ||
export function compile(a: number): number; | ||
export function acir_from_bytes(a: number, b: number): number; | ||
@@ -6,0 +6,0 @@ export function acir_to_bytes(a: number, b: number): void; |
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* @param {string} src | ||
* @param {any} args | ||
* @returns {any} | ||
*/ | ||
export function compile(src: string): any; | ||
export function compile(args: any): any; | ||
/** | ||
@@ -9,0 +9,0 @@ * @param {Uint8Array} bytes |
@@ -111,10 +111,17 @@ let imports = {}; | ||
} | ||
function addHeapObject(obj) { | ||
if (heap_next === heap.length) heap.push(heap.length + 1); | ||
const idx = heap_next; | ||
heap_next = heap[idx]; | ||
heap[idx] = obj; | ||
return idx; | ||
} | ||
/** | ||
* @param {string} src | ||
* @param {any} args | ||
* @returns {any} | ||
*/ | ||
module.exports.compile = function(src) { | ||
const ptr0 = passStringToWasm0(src, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.compile(ptr0, len0); | ||
module.exports.compile = function(args) { | ||
const ret = wasm.compile(addHeapObject(args)); | ||
return takeObject(ret); | ||
@@ -140,11 +147,2 @@ }; | ||
function addHeapObject(obj) { | ||
if (heap_next === heap.length) heap.push(heap.length + 1); | ||
const idx = heap_next; | ||
heap_next = heap[idx]; | ||
heap[idx] = obj; | ||
return idx; | ||
} | ||
function getArrayU8FromWasm0(ptr, len) { | ||
@@ -225,10 +223,2 @@ return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len); | ||
module.exports.__wbg_readfile_1ed72752a157b319 = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = read_file(getStringFromWasm0(arg1, arg2)); | ||
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
const len0 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len0; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr0; | ||
}, arguments) }; | ||
module.exports.__wbg_new_abda76e883ba8a5f = function() { | ||
@@ -255,2 +245,10 @@ const ret = new Error(); | ||
module.exports.__wbg_readfile_1ed72752a157b319 = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = read_file(getStringFromWasm0(arg1, arg2)); | ||
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
const len0 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len0; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr0; | ||
}, arguments) }; | ||
module.exports.__wbindgen_string_get = function(arg0, arg1) { | ||
@@ -257,0 +255,0 @@ const obj = getObject(arg1); |
@@ -6,3 +6,3 @@ { | ||
], | ||
"version": "0.2.0-93d83bf", | ||
"version": "0.2.0-9bec92a", | ||
"files": [ | ||
@@ -25,4 +25,4 @@ "nodejs", | ||
"compiler": { | ||
"versionHash": "93d83bf24d9ee340de54bda3d3df80e48855ae66" | ||
"versionHash": "9bec92a3397423beb30eb8b918b51a55dc9ca9c1" | ||
} | ||
} |
# Noir Lang WASM JavaScript Package | ||
## Tracks | ||
Noir lang Repository [noir-lang/noir@93d83bf](https://github.com/noir-lang/noir/tree/93d83bf24d9ee340de54bda3d3df80e48855ae66) | ||
Noir lang Repository [noir-lang/noir@9bec92a](https://github.com/noir-lang/noir/tree/9bec92a3397423beb30eb8b918b51a55dc9ca9c1) |
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export const memory: WebAssembly.Memory; | ||
export function compile(a: number, b: number): number; | ||
export function compile(a: number): number; | ||
export function acir_from_bytes(a: number, b: number): number; | ||
@@ -6,0 +6,0 @@ export function acir_to_bytes(a: number, b: number): void; |
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* @param {string} src | ||
* @param {any} args | ||
* @returns {any} | ||
*/ | ||
export function compile(src: string): any; | ||
export function compile(args: any): any; | ||
/** | ||
@@ -37,3 +37,3 @@ * @param {Uint8Array} bytes | ||
readonly memory: WebAssembly.Memory; | ||
readonly compile: (a: number, b: number) => number; | ||
readonly compile: (a: number) => number; | ||
readonly acir_from_bytes: (a: number, b: number) => number; | ||
@@ -40,0 +40,0 @@ readonly acir_to_bytes: (a: number, b: number) => void; |
@@ -109,10 +109,17 @@ import { read_file } from '@noir-lang/noir-source-resolver'; | ||
} | ||
function addHeapObject(obj) { | ||
if (heap_next === heap.length) heap.push(heap.length + 1); | ||
const idx = heap_next; | ||
heap_next = heap[idx]; | ||
heap[idx] = obj; | ||
return idx; | ||
} | ||
/** | ||
* @param {string} src | ||
* @param {any} args | ||
* @returns {any} | ||
*/ | ||
export function compile(src) { | ||
const ptr0 = passStringToWasm0(src, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.compile(ptr0, len0); | ||
export function compile(args) { | ||
const ret = wasm.compile(addHeapObject(args)); | ||
return takeObject(ret); | ||
@@ -138,11 +145,2 @@ } | ||
function addHeapObject(obj) { | ||
if (heap_next === heap.length) heap.push(heap.length + 1); | ||
const idx = heap_next; | ||
heap_next = heap[idx]; | ||
heap[idx] = obj; | ||
return idx; | ||
} | ||
function getArrayU8FromWasm0(ptr, len) { | ||
@@ -255,9 +253,2 @@ return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len); | ||
}; | ||
imports.wbg.__wbg_readfile_1ed72752a157b319 = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = read_file(getStringFromWasm0(arg1, arg2)); | ||
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
const len0 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len0; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr0; | ||
}, arguments) }; | ||
imports.wbg.__wbg_new_abda76e883ba8a5f = function() { | ||
@@ -281,2 +272,9 @@ const ret = new Error(); | ||
}; | ||
imports.wbg.__wbg_readfile_1ed72752a157b319 = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = read_file(getStringFromWasm0(arg1, arg2)); | ||
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); | ||
const len0 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len0; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr0; | ||
}, arguments) }; | ||
imports.wbg.__wbindgen_string_get = function(arg0, arg1) { | ||
@@ -283,0 +281,0 @@ const obj = getObject(arg1); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
6391069
642