Merge pull request #7 from kobigurk/master
Fix memory requirement to not crash chrome
This commit is contained in:
commit
5328cbcc44
3026
build/websnark.js
3026
build/websnark.js
File diff suppressed because one or more lines are too long
3026
example/websnark.js
3026
example/websnark.js
File diff suppressed because one or more lines are too long
@ -179,7 +179,7 @@ async function build() {
|
|||||||
groth16.n32 = groth16.n64*2;
|
groth16.n32 = groth16.n64*2;
|
||||||
groth16.n8 = groth16.n64*8;
|
groth16.n8 = groth16.n64*8;
|
||||||
|
|
||||||
groth16.memory = new WebAssembly.Memory({initial:10000});
|
groth16.memory = new WebAssembly.Memory({initial:5000});
|
||||||
groth16.i32 = new Uint32Array(groth16.memory.buffer);
|
groth16.i32 = new Uint32Array(groth16.memory.buffer);
|
||||||
|
|
||||||
const wasmModule = await WebAssembly.compile(groth16_wasm.code);
|
const wasmModule = await WebAssembly.compile(groth16_wasm.code);
|
||||||
@ -247,7 +247,7 @@ async function build() {
|
|||||||
const copyCode = groth16_wasm.code.buffer.slice(0);
|
const copyCode = groth16_wasm.code.buffer.slice(0);
|
||||||
initPromises.push(groth16.postAction(i, {
|
initPromises.push(groth16.postAction(i, {
|
||||||
command: "INIT",
|
command: "INIT",
|
||||||
init: 10000,
|
init: 5000,
|
||||||
code: copyCode
|
code: copyCode
|
||||||
|
|
||||||
}, [copyCode]));
|
}, [copyCode]));
|
||||||
|
Loading…
Reference in New Issue
Block a user