[tools.node] version = "24.13" [tools.rust] version = "1.93" components = "rust-analyzer,rust-docs,rustfmt,clippy" targets = "wasm32-wasip2" [tools."github:WebAssembly/wasi-sdk"] version_prefix = "wasi-sdk-" version = "29" [tasks.clean] run = """ rm -r ./target || true rm -r ./transpiled || true """ dir = "giallo-js" [tasks.compile] description = "Compile Rust code to wasm component." run = "cargo build --target=wasm32-wasip2" dir = "giallo-js" [tasks.transpile] alias = "build" description = "Generate Javascript bindings for compiled wasm component." depends = [{ task = "compile", args = ["--profile=release"] }] run = "npx @bytecodealliance/jco transpile target/wasm32-wasip2/release/giallo_js.wasm -I sync -o transpiled" dir = "giallo-js" [tasks.test] description = "Run Jest tests." depends = [{ task = "transpile" }] run = 'NODE_OPTIONS="$NODE_OPTIONS --experimental-vm-modules" npx jest'