2026-01-23 19:30:29 +00:00
|
|
|
[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 = """
|
2026-01-25 23:35:05 +00:00
|
|
|
rm -r ./target || true
|
|
|
|
|
rm -r ./transpiled || true
|
2026-01-23 19:30:29 +00:00
|
|
|
"""
|
|
|
|
|
dir = "giallo-js"
|
|
|
|
|
|
|
|
|
|
[tasks.compile]
|
|
|
|
|
description = "Compile Rust code to wasm component."
|
2026-01-25 23:35:05 +00:00
|
|
|
run = "cargo build --target=wasm32-wasip2"
|
2026-01-23 19:30:29 +00:00
|
|
|
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'
|