mirror of
https://github.com/AtHeartEngineer/spartan-ecdsa.git
synced 2026-01-09 05:18:01 -05:00
Output the built wasm under spartan_wasm
Simpler to have the build files under its own source dir
This commit is contained in:
@@ -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/
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user