Output the built wasm under spartan_wasm

Simpler to have the build files under its own source dir
This commit is contained in:
Daniel Tehrani
2023-01-31 13:54:36 +09:00
parent e15985f103
commit 5d54fe98d1
3 changed files with 4 additions and 6 deletions

View File

@@ -1,7 +1,5 @@
# Copy circuit artifacts into the lib build dir
mkdir -p ./build/circuits/ &&
cp ./src/circuits/* ./build/circuits/ &&
cp ./src/circuits/* ./build/circuits/
# Copy wasm into the lib build dir
cp ./src/wasm/build/*.wasm ./build/wasm/build/

View File

@@ -4,7 +4,7 @@ import * as fs from "fs";
* Load the wasm file and output a typescript file with the wasm bytes embedded
*/
const loadWasm = async () => {
let wasm = fs.readFileSync("src/wasm/build/spartan_wasm_bg.wasm");
let wasm = fs.readFileSync("../spartan_wasm/build/spartan_wasm_bg.wasm");
let bytes = new Uint8Array(wasm.buffer);

View File

@@ -1,3 +1,3 @@
rm -rf ./packages/lib/src/wasm/build &&
rm -rf ./packages/spartan_wasm/build &&
cd ./packages/spartan_wasm &&
wasm-pack build --target web --out-dir ../lib/src/wasm/build
wasm-pack build --target web --out-dir ../spartan_wasm/build