From 0950610f900cefbb3b6f0ded64af74ba0841d744 Mon Sep 17 00:00:00 2001 From: Brent Schroeter Date: Sun, 25 Jan 2026 23:35:05 +0000 Subject: [PATCH] remove unnecessary files, deps, and configuration --- .npmignore | 1 + giallo-js/Cargo.lock | 69 -------------------------------------------- giallo-js/Cargo.toml | 2 -- mise.toml | 21 ++------------ 4 files changed, 4 insertions(+), 89 deletions(-) diff --git a/.npmignore b/.npmignore index 2253be1..8bfa328 100644 --- a/.npmignore +++ b/.npmignore @@ -4,6 +4,7 @@ /giallo-js/Cargo.toml /giallo-js/src /giallo-js/target +/giallo-js/wit /mise.toml /node_modules /test diff --git a/giallo-js/Cargo.lock b/giallo-js/Cargo.lock index 73b06c2..52e8b68 100644 --- a/giallo-js/Cargo.lock +++ b/giallo-js/Cargo.lock @@ -26,12 +26,6 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" -[[package]] -name = "bumpalo" -version = "3.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" - [[package]] name = "cc" version = "1.2.53" @@ -104,8 +98,6 @@ name = "giallo-js" version = "0.0.1" dependencies = [ "giallo", - "js-sys", - "wasm-bindgen", "wit-bindgen", ] @@ -154,16 +146,6 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" -[[package]] -name = "js-sys" -version = "0.3.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - [[package]] name = "leb128fmt" version = "0.1.0" @@ -298,12 +280,6 @@ dependencies = [ "serde", ] -[[package]] -name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - [[package]] name = "seize" version = "0.5.1" @@ -398,51 +374,6 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "wasm-bindgen" -version = "0.2.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" -dependencies = [ - "bumpalo", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" -dependencies = [ - "unicode-ident", -] - [[package]] name = "wasm-encoder" version = "0.244.0" diff --git a/giallo-js/Cargo.toml b/giallo-js/Cargo.toml index 8fa039a..0c34f0f 100644 --- a/giallo-js/Cargo.toml +++ b/giallo-js/Cargo.toml @@ -19,6 +19,4 @@ crate-type = ["cdylib"] [dependencies] giallo = { version = "0.2.2", features = ["dump"] } -js-sys = "0.3.85" -wasm-bindgen = "0.2.108" wit-bindgen = "0.51.0" diff --git a/mise.toml b/mise.toml index fafd751..6313ed6 100644 --- a/mise.toml +++ b/mise.toml @@ -9,32 +9,17 @@ targets = "wasm32-wasip2" [tools."github:WebAssembly/wasi-sdk"] version_prefix = "wasi-sdk-" version = "29" -postinstall = 'mise run link-wasi "$MISE_TOOL_INSTALL_PATH"' [tasks.clean] run = """ -rm -r ./target || 0 -rm -r ./transpiled || 0 -""" -dir = "giallo-js" - -[tasks.link-wasi] -hide = true -description = "[INTERNAL] Symlink the WASI artifacts installed by mise into the project directory." -usage = 'arg ""' -run = """ -mkdir -p ./build -ln -sf "${usage_wasi_install_path?}" ./build/wasi-sdk +rm -r ./target || true +rm -r ./transpiled || true """ dir = "giallo-js" [tasks.compile] description = "Compile Rust code to wasm component." -run = """ -RUSTFLAGS="-L $(pwd)/build/wasi-sdk/share/wasi-sysroot/lib/wasm32-wasi -lstatic=c++ -lstatic=c++abi" \ - CC="$(pwd)/build/wasi-sdk/bin/clang" \ - cargo build --target=wasm32-wasip2 -""" +run = "cargo build --target=wasm32-wasip2" dir = "giallo-js" [tasks.transpile]