From 98681db0e0576bdcbaf02d61c55ca47a21f205a1 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Wed, 3 Apr 2024 16:53:07 -0700 Subject: [PATCH 1/5] bump wasmtime deps to 19.0.1 --- Cargo.lock | 612 +++++++++++------- kinode/Cargo.toml | 7 +- kinode/build.rs | 4 +- .../packages/app_store/app_store/Cargo.toml | 4 +- .../packages/app_store/app_store/src/lib.rs | 3 - kinode/packages/app_store/download/Cargo.toml | 4 +- kinode/packages/app_store/download/src/lib.rs | 8 +- .../packages/app_store/ft_worker/Cargo.toml | 4 +- .../packages/app_store/ft_worker/src/lib.rs | 4 - kinode/packages/app_store/install/Cargo.toml | 4 +- kinode/packages/app_store/install/src/lib.rs | 8 +- .../packages/app_store/uninstall/Cargo.toml | 4 +- .../packages/app_store/uninstall/src/lib.rs | 8 +- kinode/packages/chess/chess/Cargo.toml | 4 +- kinode/packages/chess/chess/src/lib.rs | 4 - kinode/packages/homepage/homepage/Cargo.toml | 4 +- kinode/packages/homepage/homepage/src/lib.rs | 6 +- .../packages/kns_indexer/get_block/Cargo.toml | 4 +- .../packages/kns_indexer/get_block/src/lib.rs | 8 +- .../kns_indexer/kns_indexer/Cargo.toml | 4 +- .../kns_indexer/kns_indexer/src/lib.rs | 105 ++- kinode/packages/kns_indexer/state/Cargo.toml | 4 +- kinode/packages/kns_indexer/state/src/lib.rs | 4 - kinode/packages/terminal/alias/Cargo.toml | 4 +- kinode/packages/terminal/alias/src/lib.rs | 8 +- kinode/packages/terminal/cat/Cargo.toml | 4 +- kinode/packages/terminal/cat/src/lib.rs | 8 +- kinode/packages/terminal/echo/Cargo.toml | 4 +- kinode/packages/terminal/echo/src/lib.rs | 8 +- kinode/packages/terminal/hi/Cargo.toml | 4 +- kinode/packages/terminal/hi/src/lib.rs | 8 +- kinode/packages/terminal/m/Cargo.toml | 4 +- kinode/packages/terminal/m/src/lib.rs | 8 +- .../terminal/namehash_to_name/Cargo.toml | 4 +- .../terminal/namehash_to_name/src/lib.rs | 8 +- .../terminal/net_diagnostics/Cargo.toml | 4 +- .../terminal/net_diagnostics/src/lib.rs | 4 - kinode/packages/terminal/peer/Cargo.toml | 4 +- kinode/packages/terminal/peer/src/lib.rs | 8 +- kinode/packages/terminal/peers/Cargo.toml | 4 +- kinode/packages/terminal/peers/src/lib.rs | 4 - kinode/packages/terminal/terminal/Cargo.toml | 4 +- kinode/packages/terminal/terminal/src/lib.rs | 189 +++--- kinode/packages/terminal/top/Cargo.toml | 4 +- kinode/packages/terminal/top/src/lib.rs | 8 +- kinode/packages/tester/test_runner/Cargo.toml | 4 +- kinode/packages/tester/test_runner/src/lib.rs | 3 - kinode/packages/tester/tester/Cargo.toml | 4 +- kinode/packages/tester/tester/src/lib.rs | 3 - kinode/src/kernel/process.rs | 18 +- kinode/wasi_snapshot_preview1.wasm | Bin 96761 -> 81041 bytes lib/Cargo.toml | 2 +- 52 files changed, 593 insertions(+), 567 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 38b402da0..ba287ca6d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,7 +78,7 @@ name = "alias" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "serde", "serde_json", "wit-bindgen", @@ -423,7 +423,7 @@ dependencies = [ "alloy-sol-types", "anyhow", "bincode", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "rand 0.8.5", "serde", "serde_json", @@ -820,24 +820,24 @@ dependencies = [ [[package]] name = "cap-fs-ext" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88e341d15ac1029aadce600be764a1a1edafe40e03cde23285bc1d261b3a4866" +checksum = "769f8cd02eb04d57f14e2e371ebb533f96817f9b2525d73a5c72b61ca7973747" dependencies = [ - "cap-primitives", - "cap-std", + "cap-primitives 3.0.0", + "cap-std 3.0.0", "io-lifetimes", "windows-sys 0.52.0", ] [[package]] name = "cap-net-ext" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "434168fe6533055f0f4204039abe3ff6d7db338ef46872a5fa39e9d5ad5ab7a9" +checksum = "59ff6d3fb274292a9af283417e383afe6ded1fe66f6472d2c781216d3d80c218" dependencies = [ - "cap-primitives", - "cap-std", + "cap-primitives 3.0.0", + "cap-std 3.0.0", "rustix", "smallvec", ] @@ -859,11 +859,28 @@ dependencies = [ "winx", ] +[[package]] +name = "cap-primitives" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90a0b44fc796b1a84535a63753d50ba3972c4db55c7255c186f79140e63d56d0" +dependencies = [ + "ambient-authority", + "fs-set-times", + "io-extras", + "io-lifetimes", + "ipnet", + "maybe-owned", + "rustix", + "windows-sys 0.52.0", + "winx", +] + [[package]] name = "cap-rand" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20e5695565f0cd7106bc3c7170323597540e772bb73e0be2cd2c662a0f8fa4ca" +checksum = "4327f08daac33a99bb03c54ae18c8f32c3ba31c728a33ddf683c6c6a5043de68" dependencies = [ "ambient-authority", "rand 0.8.5", @@ -875,7 +892,19 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "593db20e4c51f62d3284bae7ee718849c3214f93a3b94ea1899ad85ba119d330" dependencies = [ - "cap-primitives", + "cap-primitives 2.0.1", + "io-extras", + "io-lifetimes", + "rustix", +] + +[[package]] +name = "cap-std" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "266626ce180cf9709f317d0bf9754e3a5006359d87f4bf792f06c9c5f1b63c0f" +dependencies = [ + "cap-primitives 3.0.0", "io-extras", "io-lifetimes", "rustix", @@ -883,12 +912,12 @@ dependencies = [ [[package]] name = "cap-time-ext" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03261630f291f425430a36f38c847828265bc928f517cdd2004c56f4b02f002b" +checksum = "e1353421ba83c19da60726e35db0a89abef984b3be183ff6f58c5b8084fcd0c5" dependencies = [ "ambient-authority", - "cap-primitives", + "cap-primitives 3.0.0", "iana-time-zone", "once_cell", "rustix", @@ -900,7 +929,7 @@ name = "cat" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "serde", "serde_json", "wit-bindgen", @@ -962,7 +991,7 @@ dependencies = [ "anyhow", "base64 0.13.1", "bincode", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "pleco", "serde", "serde_json", @@ -1055,6 +1084,33 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "color-eyre" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5" +dependencies = [ + "backtrace", + "color-spantrace", + "eyre", + "indenter", + "once_cell", + "owo-colors", + "tracing-error", +] + +[[package]] +name = "color-spantrace" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2" +dependencies = [ + "once_cell", + "owo-colors", + "tracing-core", + "tracing-error", +] + [[package]] name = "colorchoice" version = "1.0.0" @@ -1116,9 +1172,9 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpp_demangle" -version = "0.3.5" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" +checksum = "7e8227005286ec39567949b33df9896bcadfa6051bccca2488129f108ca23119" dependencies = [ "cfg-if", ] @@ -1134,18 +1190,18 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.104.1" +version = "0.106.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e7c0d51205b863591dd1e7aaa0fb69c2ea7bed48ffa63d6c4a848b07a35a732" +checksum = "5b3775cc6cc00c90d29eebea55feedb2b0168e23f5415bab7859c4004d7323d1" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.104.1" +version = "0.106.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ffb467cbc25543e4c20d2ad669bf8275598047b03c89652ad5fe2a0f47fc0e1" +checksum = "637f3184ba5bfa48d425bad1d2e4faf5fcf619f5e0ca107edc6dc02f589d4d74" dependencies = [ "bumpalo", "cranelift-bforest", @@ -1164,33 +1220,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.104.1" +version = "0.106.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc7e74aed5c2b91e38d090653506afbd2cd3be1ff70593e2aa6bb82b3c6b77ff" +checksum = "e4b35b8240462341d94d31aab807cad704683988708261aecae3d57db48b7212" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.104.1" +version = "0.106.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff2dd24cce0775566da85770cb48aa58fef901cf2bff30275b42e7dbe62cbd5" +checksum = "8f3cd1555aa9df1d6d8375732de41b4cb0d787006948d55b6d004d521e9efeb0" [[package]] name = "cranelift-control" -version = "0.104.1" +version = "0.106.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8bcf4d5c73bbca309edf3af2839b5218e5c74cfbf22b0ac492af8a1d11120d9" +checksum = "14b31a562a10e98ab148fa146801e20665c5f9eda4fce9b2c5a3836575887d74" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.104.1" +version = "0.106.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "286754159b1a685475d6a0b4710832f950d6f4846a817002e2c23ff001321a65" +checksum = "af1e0467700a3f4fccf5feddbaebdf8b0eb82535b06a9600c4bc5df40872e75d" dependencies = [ "serde", "serde_derive", @@ -1198,9 +1254,9 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.104.1" +version = "0.106.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67150a1fef9857caba710f8c0c8223d640f02c0e5d1ebbfc75ed62912599cb6b" +checksum = "6cb918ee2c23939262efd1b99d76a21212ac7bd35129582133e21a22a6ff0467" dependencies = [ "cranelift-codegen", "log", @@ -1210,15 +1266,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.104.1" +version = "0.106.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb7ceea70d3e0d7f69df7657f99de902e32016731c5a8d2788c1df0215f00952" +checksum = "966e4cfb23cf6d7f1d285d53a912baaffc5f06bcd9c9b0a2d8c66a184fae534b" [[package]] name = "cranelift-native" -version = "0.104.1" +version = "0.106.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707e5d9384ce4fa3c40af1abf4c3ec49857745cced5187593385f4a2c0b95445" +checksum = "bea803aadfc4aabdfae7c3870f1b1f6dd4332f4091859e9758ef5fca6bf8cc87" dependencies = [ "cranelift-codegen", "libc", @@ -1227,17 +1283,17 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.104.1" +version = "0.106.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d957e3ff2a14c2f974a66c22bfcedcd2bd0272af8dce4236869c3942f5a471" +checksum = "11d18a3572cd897555bba3621e568029417d8f5cc26aeede2d7cb0bad6afd916" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools 0.10.5", + "itertools 0.12.1", "log", "smallvec", - "wasmparser 0.118.2", + "wasmparser 0.201.0", "wasmtime-types", ] @@ -1606,7 +1662,7 @@ name = "download" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "serde", "serde_json", "wit-bindgen", @@ -1637,7 +1693,7 @@ name = "echo" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "serde", "serde_json", "wit-bindgen", @@ -1712,6 +1768,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + [[package]] name = "fallible-iterator" version = "0.3.0" @@ -1820,6 +1886,15 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs-err" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg 1.1.0", +] + [[package]] name = "fs-set-times" version = "0.20.1" @@ -1837,7 +1912,7 @@ version = "0.2.0" dependencies = [ "anyhow", "bincode", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "rand 0.8.5", "serde", "serde_json", @@ -1982,7 +2057,7 @@ dependencies = [ name = "get_block" version = "0.1.0" dependencies = [ - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "serde", "serde_json", "wit-bindgen", @@ -2157,7 +2232,7 @@ checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" name = "hi" version = "0.1.0" dependencies = [ - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "serde", "serde_json", "wit-bindgen", @@ -2187,7 +2262,7 @@ version = "0.1.0" dependencies = [ "anyhow", "bincode", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "serde", "serde_json", "wit-bindgen", @@ -2388,6 +2463,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + [[package]] name = "indexmap" version = "2.2.3" @@ -2413,7 +2494,7 @@ name = "install" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "serde", "serde_json", "wit-bindgen", @@ -2590,7 +2671,7 @@ dependencies = [ "bincode", "blake3", "bytes", - "cap-std", + "cap-std 2.0.1", "chacha20poly1305", "chrono", "clap", @@ -2638,6 +2719,7 @@ dependencies = [ "uuid", "walkdir", "warp", + "wasi-common", "wasmtime", "wasmtime-wasi", "zip", @@ -2653,7 +2735,28 @@ dependencies = [ [[package]] name = "kinode_process_lib" version = "0.6.0" -source = "git+https://github.com/kinode-dao/process_lib?tag=v0.6.0#ccf9db2493ec1e112f9146994f852b7bb119dbb6" +source = "git+https://github.com/kinode-dao/process_lib?rev=820b35c#820b35c6dd897101df9844fda4a40aed3abd5dcf" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-rpc-types", + "alloy-transport", + "anyhow", + "bincode", + "http 1.0.0", + "mime_guess", + "rand 0.8.5", + "serde", + "serde_json", + "thiserror", + "url", + "wit-bindgen", +] + +[[package]] +name = "kinode_process_lib" +version = "0.6.0" +source = "git+https://github.com/kinode-dao/process_lib?rev=84b3d84#84b3d84c7c31185f15691a288f1b45dbffb18fe2" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -2673,17 +2776,19 @@ dependencies = [ [[package]] name = "kit" -version = "0.2.0" -source = "git+https://github.com/kinode-dao/kit?rev=1bd7bec#1bd7bec195f4d6878d553a8568b0f2fa1240168a" +version = "0.3.1" +source = "git+https://github.com/kinode-dao/kit?rev=95cfc41#95cfc41e5dd1c6a2c800eb9d08731bcf26c75973" dependencies = [ "anyhow", "base64 0.21.7", "clap", + "color-eyre", "dirs 5.0.1", + "fs-err", "futures-util", "git2", "hex", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=820b35c)", "nix", "regex", "reqwest", @@ -2694,9 +2799,10 @@ dependencies = [ "thiserror", "tokio", "tokio-tungstenite", - "toml 0.8.10", + "toml", "tracing", "tracing-appender", + "tracing-error", "tracing-subscriber", "walkdir", "zip", @@ -2711,7 +2817,7 @@ dependencies = [ "anyhow", "bincode", "hex", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "rmp-serde", "serde", "serde_json", @@ -2891,7 +2997,7 @@ version = "0.1.0" dependencies = [ "anyhow", "clap", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "regex", "serde", "serde_json", @@ -3023,7 +3129,7 @@ dependencies = [ name = "namehash_to_name" version = "0.1.0" dependencies = [ - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "rmp-serde", "serde", "wit-bindgen", @@ -3051,7 +3157,7 @@ dependencies = [ name = "net_diagnostics" version = "0.1.0" dependencies = [ - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "rmp-serde", "serde", "wit-bindgen", @@ -3240,6 +3346,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "owo-colors" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" + [[package]] name = "parity-scale-codec" version = "3.6.9" @@ -3334,7 +3446,7 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" name = "peer" version = "0.1.0" dependencies = [ - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "rmp-serde", "serde", "wit-bindgen", @@ -3344,7 +3456,7 @@ dependencies = [ name = "peers" version = "0.1.0" dependencies = [ - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "rmp-serde", "serde", "wit-bindgen", @@ -4522,7 +4634,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" name = "state" version = "0.1.0" dependencies = [ - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "serde", "serde_json", "wit-bindgen", @@ -4632,13 +4744,13 @@ dependencies = [ [[package]] name = "system-interface" -version = "0.26.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0682e006dd35771e392a6623ac180999a9a854b1d4a6c12fb2e804941c2b1f58" +checksum = "b858526d22750088a9b3cf2e3c2aacebd5377f13adeec02860c30d09113010a6" dependencies = [ "bitflags 2.4.2", "cap-fs-ext", - "cap-std", + "cap-std 3.0.0", "fd-lock", "io-lifetimes", "rustix", @@ -4676,7 +4788,7 @@ version = "0.1.0" dependencies = [ "anyhow", "bincode", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "rand 0.8.5", "regex", "serde", @@ -4690,7 +4802,7 @@ version = "0.1.0" dependencies = [ "anyhow", "bincode", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "serde", "serde_json", "thiserror", @@ -4704,7 +4816,7 @@ dependencies = [ "anyhow", "bincode", "indexmap", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "serde", "serde_json", "thiserror", @@ -4885,15 +4997,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - [[package]] name = "toml" version = "0.8.10" @@ -4944,7 +5047,7 @@ name = "top" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "serde", "serde_json", "wit-bindgen", @@ -5022,6 +5125,16 @@ dependencies = [ "valuable", ] +[[package]] +name = "tracing-error" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" +dependencies = [ + "tracing", + "tracing-subscriber", +] + [[package]] name = "tracing-futures" version = "0.2.5" @@ -5230,7 +5343,7 @@ name = "uninstall" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib", + "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", "serde", "serde_json", "wit-bindgen", @@ -5387,41 +5500,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "wasi-cap-std-sync" -version = "17.0.1" +name = "wasi-common" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "025e842ba390587e523785ff58bd54fbbf1781b8d3072bc9aba4dc0b809f69da" +checksum = "6b53dfacdeacca15ee2a48a4aa0ec6a6d0da737676e465770c0585f79c04e638" dependencies = [ "anyhow", - "async-trait", + "bitflags 2.4.2", "cap-fs-ext", "cap-rand", - "cap-std", + "cap-std 3.0.0", "cap-time-ext", "fs-set-times", "io-extras", "io-lifetimes", + "log", "once_cell", "rustix", "system-interface", - "tracing", - "wasi-common", - "windows-sys 0.52.0", -] - -[[package]] -name = "wasi-common" -version = "17.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da4d4023cc65b3615590d38db0afb79234de09b3bb89cb0d8f83bdee9f5c28a8" -dependencies = [ - "anyhow", - "bitflags 2.4.2", - "cap-rand", - "cap-std", - "io-extras", - "log", - "rustix", "thiserror", "tracing", "wasmtime", @@ -5497,36 +5593,27 @@ checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] name = "wasm-encoder" -version = "0.38.1" +version = "0.201.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad2b51884de9c7f4fe2fd1043fccb8dcad4b1e29558146ee57a144d15779f3f" +checksum = "b9c7d2731df60006819b013f64ccc2019691deccf6e11a1804bc850cd6748f1a" dependencies = [ "leb128", ] [[package]] name = "wasm-encoder" -version = "0.41.2" +version = "0.202.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "972f97a5d8318f908dded23594188a90bcd09365986b1163e66d70170e5287ae" -dependencies = [ - "leb128", -] - -[[package]] -name = "wasm-encoder" -version = "0.200.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e3fb0c8fbddd78aa6095b850dfeedbc7506cf5f81e633f69cf8f2333ab84b9" +checksum = "bfd106365a7f5f7aa3c1916a98cbb3ad477f5ff96ddb130285a91c6e7429e67a" dependencies = [ "leb128", ] [[package]] name = "wasm-metadata" -version = "0.10.20" +version = "0.202.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18ebaa7bd0f9e7a5e5dd29b9a998acf21c4abed74265524dd7e85934597bfb10" +checksum = "094aea3cb90e09f16ee25a4c0e324b3e8c934e7fd838bfa039aef5352f44a917" dependencies = [ "anyhow", "indexmap", @@ -5534,25 +5621,26 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder 0.41.2", - "wasmparser 0.121.2", + "wasm-encoder 0.202.0", + "wasmparser 0.202.0", ] [[package]] name = "wasmparser" -version = "0.118.2" +version = "0.201.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77f1154f1ab868e2a01d9834a805faca7bf8b50d041b4ca714d005d0dab1c50c" +checksum = "84e5df6dba6c0d7fafc63a450f1738451ed7a0b52295d83e868218fa286bf708" dependencies = [ + "bitflags 2.4.2", "indexmap", "semver 1.0.21", ] [[package]] name = "wasmparser" -version = "0.121.2" +version = "0.202.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" +checksum = "d6998515d3cf3f8b980ef7c11b29a9b1017d4cf86b99ae93b546992df9931413" dependencies = [ "bitflags 2.4.2", "indexmap", @@ -5561,20 +5649,21 @@ dependencies = [ [[package]] name = "wasmprinter" -version = "0.2.80" +version = "0.201.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60e73986a6b7fdfedb7c5bf9e7eb71135486507c8fbc4c0c42cffcb6532988b7" +checksum = "a67e66da702706ba08729a78e3c0079085f6bfcb1a62e4799e97bbf728c2c265" dependencies = [ "anyhow", - "wasmparser 0.121.2", + "wasmparser 0.201.0", ] [[package]] name = "wasmtime" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb6aa966be38f613954c3debe7ba6c7a02ffd0537432be438da0b038955cdf" +checksum = "516be5b58a8f75d39b01378516dcb0ff7b9bc39c7f1f10eec5b338d4916cf988" dependencies = [ + "addr2line", "anyhow", "async-trait", "bincode", @@ -5582,27 +5671,33 @@ dependencies = [ "cfg-if", "encoding_rs", "fxprof-processed-profile", + "gimli", "indexmap", + "ittapi", "libc", "log", "object", "once_cell", "paste", "rayon", + "rustix", + "semver 1.0.21", "serde", "serde_derive", "serde_json", "target-lexicon", - "wasm-encoder 0.38.1", - "wasmparser 0.118.2", + "wasm-encoder 0.201.0", + "wasmparser 0.201.0", "wasmtime-cache", "wasmtime-component-macro", "wasmtime-component-util", "wasmtime-cranelift", "wasmtime-environ", "wasmtime-fiber", - "wasmtime-jit", + "wasmtime-jit-debug", + "wasmtime-jit-icache-coherence", "wasmtime-runtime", + "wasmtime-slab", "wasmtime-winch", "wat", "windows-sys 0.52.0", @@ -5610,18 +5705,18 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1495ef4d46aec14f967b672e946e391dd8a14a443cda3d5e0779ff67fb6e28d" +checksum = "e8d22d88a92d69385f18143c946884bf6aaa9ec206ce54c85a2d320c1362b009" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2de1b065bdbaca3df9e7e9f70eb129e326a99d971b16d666acd798d98d47635" +checksum = "068728a840223b56c964507550da671372e7e5c2f3a7856012b57482e3e979a7" dependencies = [ "anyhow", "base64 0.21.7", @@ -5632,16 +5727,16 @@ dependencies = [ "serde", "serde_derive", "sha2", - "toml 0.5.11", + "toml", "windows-sys 0.52.0", - "zstd", + "zstd 0.13.1", ] [[package]] name = "wasmtime-component-macro" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f19bcff82f81ba0273c0b68f3909977b0dd54489bc86c630d8aad43dca92f3f" +checksum = "631244bac89c57ebe7283209d86fe175ad5929328e75f61bf9141895cafbf52d" dependencies = [ "anyhow", "proc-macro2", @@ -5649,20 +5744,20 @@ dependencies = [ "syn 2.0.48", "wasmtime-component-util", "wasmtime-wit-bindgen", - "wit-parser", + "wit-parser 0.201.0", ] [[package]] name = "wasmtime-component-util" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8af072b7ad5ac5583e1f9e4737ebf88923de564fb5d4ace0ca9b4b720bdf95a1" +checksum = "82ad496ba0558f7602da5e9d4c201f35f7aefcca70f973ec916f3f0d0787ef74" [[package]] name = "wasmtime-cranelift" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df08a8bd9a68732577bee05ac685e4c247238b5e79ad9c062e2dfb4d04dca132" +checksum = "961ab5ee4b17e627001b18069ee89ef906edbbd3f84955515f6aad5ab6d82299" dependencies = [ "anyhow", "cfg-if", @@ -5677,7 +5772,7 @@ dependencies = [ "object", "target-lexicon", "thiserror", - "wasmparser 0.118.2", + "wasmparser 0.201.0", "wasmtime-cranelift-shared", "wasmtime-environ", "wasmtime-versioned-export-macros", @@ -5685,9 +5780,9 @@ dependencies = [ [[package]] name = "wasmtime-cranelift-shared" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "404201c9e669083f189f01337b3ed0aa0eb081157fb4e170bbfe193df9497771" +checksum = "bc4db94596be14cd1f85844ce85470bf68acf235143098b9d9bf72b49e47b917" dependencies = [ "anyhow", "cranelift-codegen", @@ -5701,22 +5796,25 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e696b4911c9a69c3c2892ec05eb41bb15436d1a46d8830a755c40f5df47546a" +checksum = "420b13858ef27dfd116f1fdb0513e9593a307a632ade2ea58334b639a3d8d24e" dependencies = [ "anyhow", + "bincode", + "cpp_demangle", "cranelift-entity", "gimli", "indexmap", "log", "object", + "rustc-demangle", "serde", "serde_derive", "target-lexicon", "thiserror", - "wasm-encoder 0.38.1", - "wasmparser 0.118.2", + "wasm-encoder 0.201.0", + "wasmparser 0.201.0", "wasmprinter", "wasmtime-component-util", "wasmtime-types", @@ -5724,9 +5822,9 @@ dependencies = [ [[package]] name = "wasmtime-fiber" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a39681c1f6f54d1bf7efe5dc829f8d7fc0e2ca12c346fd7a3efbf726e9681d2" +checksum = "5d37ff0e11a023019e34fe839c74a1c00880b989f4446176b6cc6da3b58e3ef2" dependencies = [ "anyhow", "cc", @@ -5737,38 +5835,11 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "wasmtime-jit" -version = "17.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c56519882d936c680bd191d58ac04cff071a470eca2dcc664adcd60f986a731" -dependencies = [ - "addr2line", - "anyhow", - "bincode", - "cfg-if", - "cpp_demangle", - "gimli", - "ittapi", - "log", - "object", - "rustc-demangle", - "rustix", - "serde", - "serde_derive", - "target-lexicon", - "wasmtime-environ", - "wasmtime-jit-debug", - "wasmtime-jit-icache-coherence", - "wasmtime-runtime", - "windows-sys 0.52.0", -] - [[package]] name = "wasmtime-jit-debug" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "babc65e64ab0dd4e1ce65624db64e24ed0fbdebb16148729173fa0da9f70e53c" +checksum = "7b849f19ad1d4a8133ff05b82c438144f17fb49b08e5f7995f8c1e25cf35f390" dependencies = [ "object", "once_cell", @@ -5778,9 +5849,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-icache-coherence" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7ec5b11c12d9acb09612e7ce04c4c8aea3e8dc79b2591ffdead986a5ce8ec49" +checksum = "59c48eb4223d6556ffbf3decb146d0da124f1fd043f41c98b705252cb6a5c186" dependencies = [ "cfg-if", "libc", @@ -5789,9 +5860,9 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28e1c31bbdf67cb86f149bcead5193749f23f77c93c5244ec9ac8d192f90966c" +checksum = "7fefac2cb5f5a6f365234a3584bf40bd2e45e7f6cd90a689d9b2afbb9881978f" dependencies = [ "anyhow", "cc", @@ -5807,7 +5878,7 @@ dependencies = [ "psm", "rustix", "sptr", - "wasm-encoder 0.38.1", + "wasm-encoder 0.201.0", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-fiber", @@ -5817,24 +5888,30 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "wasmtime-slab" +version = "19.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52d7b97b92df126fdbe994a53d2215828ec5ed5087535e6d4703b1fbd299f0e3" + [[package]] name = "wasmtime-types" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e799cff634d30fd042db96b417d515e54f903b95f8c1e0ec60e8f604479485" +checksum = "509c88abb830819b259c49e2d4e4f22b555db066ba08ded0b76b071a2aa53ddf" dependencies = [ "cranelift-entity", "serde", "serde_derive", "thiserror", - "wasmparser 0.118.2", + "wasmparser 0.201.0", ] [[package]] name = "wasmtime-versioned-export-macros" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10fe166d4e4c95d5d80c5b47e1e12256af2099ac525ddb9a19b1aeb8896e5e1" +checksum = "f1d81c092a61ca1667013e2eb08fed7c6c53e496dbbaa32d5685dc5152b0a772" dependencies = [ "proc-macro2", "quote", @@ -5843,9 +5920,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494f99111a165dcddc69aaa5fa23604f49dcfab479a869edd84581abd6ac569b" +checksum = "af3ebe8aeb34f49342db2e8fbb1992796e6c7d9f7005b7298ca0dceede532e9d" dependencies = [ "anyhow", "async-trait", @@ -5854,14 +5931,12 @@ dependencies = [ "cap-fs-ext", "cap-net-ext", "cap-rand", - "cap-std", + "cap-std 3.0.0", "cap-time-ext", "fs-set-times", "futures", "io-extras", "io-lifetimes", - "libc", - "log", "once_cell", "rustix", "system-interface", @@ -5869,8 +5944,6 @@ dependencies = [ "tokio", "tracing", "url", - "wasi-cap-std-sync", - "wasi-common", "wasmtime", "wiggle", "windows-sys 0.52.0", @@ -5878,16 +5951,16 @@ dependencies = [ [[package]] name = "wasmtime-winch" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3f5d76d399cb4423e6f178bc154a0e1c314711e28dabaa6e757e56628a083ec" +checksum = "a0958907880e37a2d3974f5b3574c23bf70aaf1fc6c1f716625bb50dac776f1a" dependencies = [ "anyhow", "cranelift-codegen", "gimli", "object", "target-lexicon", - "wasmparser 0.118.2", + "wasmparser 0.201.0", "wasmtime-cranelift-shared", "wasmtime-environ", "winch-codegen", @@ -5895,21 +5968,21 @@ dependencies = [ [[package]] name = "wasmtime-wit-bindgen" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb3bc92c031cf4961135bffe055a69c1bd67c253dca20631478189bb05ec27b" +checksum = "a593ddefd2f80617df6bea084b2e422d8969e924bc209642a794d57518f59587" dependencies = [ "anyhow", "heck", "indexmap", - "wit-parser", + "wit-parser 0.201.0", ] [[package]] name = "wasmtime-wmemcheck" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da08ab734954e16f57be38423b90c25a0b13420e51cbd0a2e37b86a468a988c" +checksum = "b77212b6874bbc86d220bb1d28632d0c11c6afe996c3e1ddcf746b1a6b4919b9" [[package]] name = "wast" @@ -5922,24 +5995,24 @@ dependencies = [ [[package]] name = "wast" -version = "200.0.0" +version = "202.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1810d14e6b03ebb8fb05eef4009ad5749c989b65197d83bce7de7172ed91366" +checksum = "1fbcb11204515c953c9b42ede0a46a1c5e17f82af05c4fae201a8efff1b0f4fe" dependencies = [ "bumpalo", "leb128", "memchr", "unicode-width", - "wasm-encoder 0.200.0", + "wasm-encoder 0.202.0", ] [[package]] name = "wat" -version = "1.200.0" +version = "1.202.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "776cbd10e217f83869beaa3f40e312bb9e91d5eee29bbf6f560db1261b6a4c3d" +checksum = "4de4b15a47135c56a3573406e9977b9518787a6154459b4842a9b9d3d1684848" dependencies = [ - "wast 200.0.0", + "wast 202.0.0", ] [[package]] @@ -5960,9 +6033,9 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "wiggle" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd5b200b5dd3d5d7cc4093166f4f916d2d2839296cf1b1757b9726635f6425c3" +checksum = "f093d8afdb09efaf2ed1037468bd4614308a762d215b6cafd60a7712993a8ffa" dependencies = [ "anyhow", "async-trait", @@ -5975,9 +6048,9 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4dc34a2bc1091599de005e9b854cd1a9ea35b16ca51cac2797274c1a2666e06" +checksum = "47c7bccd5172ce8d853242f723e42c84b8c131b24fb07a1570f9045d99258616" dependencies = [ "anyhow", "heck", @@ -5990,9 +6063,9 @@ dependencies = [ [[package]] name = "wiggle-macro" -version = "17.0.1" +version = "19.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ba3b37f402a7513b9ed7973a6e907074987b3afdcede98d3d79939b3e76f1b" +checksum = "a69d087dee85991096fc0c6eaf4dcf4e17cd16a0594c33b8ab9e2d345234ef75" dependencies = [ "proc-macro2", "quote", @@ -6033,9 +6106,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "0.15.1" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d921185084e134e897e0e202e129a422306d0f1391954ecf4928d36defa897d" +checksum = "e72a6a7034793b874b85e428fd6d7b3ccccb98c326e33af3aa40cdf50d0c33da" dependencies = [ "anyhow", "cranelift-codegen", @@ -6043,7 +6116,7 @@ dependencies = [ "regalloc2", "smallvec", "target-lexicon", - "wasmparser 0.118.2", + "wasmparser 0.201.0", "wasmtime-environ", ] @@ -6228,30 +6301,42 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.17.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=21a46c7#21a46c774532da99384f7a1877c1fcfb7a4c72d3" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" dependencies = [ - "bitflags 2.4.2", + "wit-bindgen-rt", "wit-bindgen-rust-macro", ] [[package]] name = "wit-bindgen-core" -version = "0.17.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=21a46c7#21a46c774532da99384f7a1877c1fcfb7a4c72d3" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" dependencies = [ "anyhow", - "wit-component", - "wit-parser", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0780cf7046630ed70f689a098cd8d56c5c3b22f2a7379bbdb088879963ff96" +dependencies = [ + "bitflags 2.4.2", ] [[package]] name = "wit-bindgen-rust" -version = "0.17.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=21a46c7#21a46c774532da99384f7a1877c1fcfb7a4c72d3" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30acbe8fb708c3a830a33c4cb705df82659bf831b492ec6ca1a17a369cfeeafb" dependencies = [ "anyhow", "heck", + "indexmap", "wasm-metadata", "wit-bindgen-core", "wit-component", @@ -6259,8 +6344,9 @@ dependencies = [ [[package]] name = "wit-bindgen-rust-macro" -version = "0.17.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=21a46c7#21a46c774532da99384f7a1877c1fcfb7a4c72d3" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b1b06eae85feaecdf9f2854f7cac124e00d5a6e5014bfb02eb1ecdeb5f265b9" dependencies = [ "anyhow", "proc-macro2", @@ -6268,14 +6354,13 @@ dependencies = [ "syn 2.0.48", "wit-bindgen-core", "wit-bindgen-rust", - "wit-component", ] [[package]] name = "wit-component" -version = "0.20.3" +version = "0.202.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4436190e87b4e539807bcdcf5b817e79d2e29e16bc5ddb6445413fe3d1f5716" +checksum = "0c836b1fd9932de0431c1758d8be08212071b6bba0151f7bac826dbc4312a2a9" dependencies = [ "anyhow", "bitflags 2.4.2", @@ -6284,17 +6369,35 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder 0.41.2", + "wasm-encoder 0.202.0", "wasm-metadata", - "wasmparser 0.121.2", - "wit-parser", + "wasmparser 0.202.0", + "wit-parser 0.202.0", ] [[package]] name = "wit-parser" -version = "0.13.2" +version = "0.201.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "196d3ecfc4b759a8573bf86a9b3f8996b304b3732e4c7de81655f875f6efdca6" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.21", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.201.0", +] + +[[package]] +name = "wit-parser" +version = "0.202.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "316b36a9f0005f5aa4b03c39bc3728d045df136f8c13a73b7db4510dec725e08" +checksum = "744237b488352f4f27bca05a10acb79474415951c450e52ebd0da784c1df2bcc" dependencies = [ "anyhow", "id-arena", @@ -6305,6 +6408,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", + "wasmparser 0.202.0", ] [[package]] @@ -6404,7 +6508,7 @@ dependencies = [ "pbkdf2", "sha1", "time", - "zstd", + "zstd 0.11.2+zstd.1.5.2", ] [[package]] @@ -6413,7 +6517,16 @@ version = "0.11.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" dependencies = [ - "zstd-safe", + "zstd-safe 5.0.2+zstd.1.5.2", +] + +[[package]] +name = "zstd" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +dependencies = [ + "zstd-safe 7.1.0", ] [[package]] @@ -6426,11 +6539,20 @@ dependencies = [ "zstd-sys", ] +[[package]] +name = "zstd-safe" +version = "7.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +dependencies = [ + "zstd-sys", +] + [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.10+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" dependencies = [ "cc", "pkg-config", diff --git a/kinode/Cargo.toml b/kinode/Cargo.toml index 91f2f5918..703fb9944 100644 --- a/kinode/Cargo.toml +++ b/kinode/Cargo.toml @@ -14,7 +14,7 @@ path = "src/main.rs" [build-dependencies] anyhow = "1.0.71" -kit = { git = "https://github.com/kinode-dao/kit", rev = "1bd7bec" } +kit = { git = "https://github.com/kinode-dao/kit", rev = "95cfc41" } rayon = "1.8.1" sha2 = "0.10" tokio = "1.28" @@ -86,6 +86,7 @@ tokio-tungstenite = "0.20.1" url = "2.4.1" uuid = { version = "1.1.2", features = ["serde", "v4"] } warp = "0.3.5" -wasmtime = "17.0.1" -wasmtime-wasi = "17.0.1" +wasi-common = "19.0.1" +wasmtime = "19.0.1" +wasmtime-wasi = "19.0.1" zip = "0.6" diff --git a/kinode/build.rs b/kinode/build.rs index b86351372..9fb7ed9e7 100644 --- a/kinode/build.rs +++ b/kinode/build.rs @@ -48,7 +48,9 @@ fn build_and_zip_package( ) -> anyhow::Result<(String, String, Vec)> { let rt = tokio::runtime::Runtime::new().unwrap(); rt.block_on(async { - kit::build::execute(&entry_path, true, false, true, features).await?; + kit::build::execute(&entry_path, true, false, true, features) + .await + .map_err(|e| anyhow::anyhow!("{:?}", e))?; let mut writer = Cursor::new(Vec::new()); let options = FileOptions::default() diff --git a/kinode/packages/app_store/app_store/Cargo.toml b/kinode/packages/app_store/app_store/Cargo.toml index 0b1a96622..8880db1ce 100644 --- a/kinode/packages/app_store/app_store/Cargo.toml +++ b/kinode/packages/app_store/app_store/Cargo.toml @@ -11,7 +11,7 @@ alloy-primitives = "0.6.2" alloy-sol-types = "0.6.2" anyhow = "1.0" bincode = "1.3.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } rand = "0.8" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" @@ -19,7 +19,7 @@ sha2 = "0.10.8" sha3 = "0.10.8" url = "2.4.1" urlencoding = "2.1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" zip = { version = "0.6.6", default-features = false } [lib] diff --git a/kinode/packages/app_store/app_store/src/lib.rs b/kinode/packages/app_store/app_store/src/lib.rs index e534a6822..7de8b2657 100644 --- a/kinode/packages/app_store/app_store/src/lib.rs +++ b/kinode/packages/app_store/app_store/src/lib.rs @@ -9,9 +9,6 @@ use std::str::FromStr; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); mod api; diff --git a/kinode/packages/app_store/download/Cargo.toml b/kinode/packages/app_store/download/Cargo.toml index dcafba9aa..5da3fffdd 100644 --- a/kinode/packages/app_store/download/Cargo.toml +++ b/kinode/packages/app_store/download/Cargo.toml @@ -8,10 +8,10 @@ simulation-mode = [] [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/app_store/download/src/lib.rs b/kinode/packages/app_store/download/src/lib.rs index 0e9c39327..0dab71539 100644 --- a/kinode/packages/app_store/download/src/lib.rs +++ b/kinode/packages/app_store/download/src/lib.rs @@ -1,5 +1,5 @@ use kinode_process_lib::{ - await_next_request_body, call_init, println, Address, Message, NodeId, PackageId, Request, + await_next_message_body, call_init, println, Address, Message, NodeId, PackageId, Request, }; mod api; @@ -8,15 +8,11 @@ use api::*; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); call_init!(init); - fn init(our: Address) { - let Ok(body) = await_next_request_body() else { + let Ok(body) = await_next_message_body() else { println!("download: failed to get args!"); return; }; diff --git a/kinode/packages/app_store/ft_worker/Cargo.toml b/kinode/packages/app_store/ft_worker/Cargo.toml index 3ecf4727d..8592df02d 100644 --- a/kinode/packages/app_store/ft_worker/Cargo.toml +++ b/kinode/packages/app_store/ft_worker/Cargo.toml @@ -9,11 +9,11 @@ simulation-mode = [] [dependencies] anyhow = "1.0" bincode = "1.3.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } rand = "0.8" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/app_store/ft_worker/src/lib.rs b/kinode/packages/app_store/ft_worker/src/lib.rs index d7f809ffb..47db47b77 100644 --- a/kinode/packages/app_store/ft_worker/src/lib.rs +++ b/kinode/packages/app_store/ft_worker/src/lib.rs @@ -8,9 +8,6 @@ use ft_worker_lib::*; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); /// internal worker protocol @@ -21,7 +18,6 @@ pub enum FTWorkerProtocol { } call_init!(init); - fn init(our: Address) { let Ok(Message::Request { source: parent_process, diff --git a/kinode/packages/app_store/install/Cargo.toml b/kinode/packages/app_store/install/Cargo.toml index f63ac0fd6..87a0f5792 100644 --- a/kinode/packages/app_store/install/Cargo.toml +++ b/kinode/packages/app_store/install/Cargo.toml @@ -8,10 +8,10 @@ simulation-mode = [] [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/app_store/install/src/lib.rs b/kinode/packages/app_store/install/src/lib.rs index aa9c54a95..c210a7054 100644 --- a/kinode/packages/app_store/install/src/lib.rs +++ b/kinode/packages/app_store/install/src/lib.rs @@ -1,5 +1,5 @@ use kinode_process_lib::{ - await_next_request_body, call_init, println, Address, Message, PackageId, Request, + await_next_message_body, call_init, println, Address, Message, PackageId, Request, }; mod api; @@ -8,15 +8,11 @@ use api::*; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); call_init!(init); - fn init(our: Address) { - let Ok(body) = await_next_request_body() else { + let Ok(body) = await_next_message_body() else { println!("install: failed to get args!"); return; }; diff --git a/kinode/packages/app_store/uninstall/Cargo.toml b/kinode/packages/app_store/uninstall/Cargo.toml index b1352ddf3..0b44c0caf 100644 --- a/kinode/packages/app_store/uninstall/Cargo.toml +++ b/kinode/packages/app_store/uninstall/Cargo.toml @@ -8,10 +8,10 @@ simulation-mode = [] [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/app_store/uninstall/src/lib.rs b/kinode/packages/app_store/uninstall/src/lib.rs index 39e212259..346e80a5c 100644 --- a/kinode/packages/app_store/uninstall/src/lib.rs +++ b/kinode/packages/app_store/uninstall/src/lib.rs @@ -1,5 +1,5 @@ use kinode_process_lib::{ - await_next_request_body, call_init, println, Address, Message, PackageId, Request, + await_next_message_body, call_init, println, Address, Message, PackageId, Request, }; mod api; @@ -8,15 +8,11 @@ use api::*; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); call_init!(init); - fn init(our: Address) { - let Ok(body) = await_next_request_body() else { + let Ok(body) = await_next_message_body() else { println!("uninstall: failed to get args!"); return; }; diff --git a/kinode/packages/chess/chess/Cargo.toml b/kinode/packages/chess/chess/Cargo.toml index 32518597b..1bcc0e4de 100644 --- a/kinode/packages/chess/chess/Cargo.toml +++ b/kinode/packages/chess/chess/Cargo.toml @@ -10,12 +10,12 @@ simulation-mode = [] anyhow = "1.0" base64 = "0.13" bincode = "1.3.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } pleco = "0.5" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" url = "*" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/chess/chess/src/lib.rs b/kinode/packages/chess/chess/src/lib.rs index a4a685a49..a38f0f780 100644 --- a/kinode/packages/chess/chess/src/lib.rs +++ b/kinode/packages/chess/chess/src/lib.rs @@ -100,14 +100,10 @@ fn send_ws_update(our: &Address, game: &Game, open_channels: &HashSet) -> a wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); // After generating bindings, use this macro to define the Component struct // and its init() function, which the kernel will look for on startup. call_init!(initialize); - fn initialize(our: Address) { // A little printout to show in terminal that the process has started. println!("started"); diff --git a/kinode/packages/homepage/homepage/Cargo.toml b/kinode/packages/homepage/homepage/Cargo.toml index 09b77b803..79b66582a 100644 --- a/kinode/packages/homepage/homepage/Cargo.toml +++ b/kinode/packages/homepage/homepage/Cargo.toml @@ -9,10 +9,10 @@ simulation-mode = [] [dependencies] anyhow = "1.0" bincode = "1.3.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/homepage/homepage/src/lib.rs b/kinode/packages/homepage/homepage/src/lib.rs index e0aac50f3..d7810ddae 100644 --- a/kinode/packages/homepage/homepage/src/lib.rs +++ b/kinode/packages/homepage/homepage/src/lib.rs @@ -36,9 +36,6 @@ struct HomepageApp { wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); const HOME_PAGE: &str = include_str!("index.html"); @@ -50,8 +47,6 @@ const APP_TEMPLATE: &str = r#"
${label}
"#; -call_init!(init); - /// bind to root path on http_server (we have special dispensation to do so!) fn bind_index(our: &str, apps: &HashMap) { bind_http_static_path( @@ -161,6 +156,7 @@ fn bind_index(our: &str, apps: &HashMap) { // Ok(()) // } +call_init!(init); fn init(our: Address) { let mut apps: HashMap = HashMap::new(); let mut app_data: HashMap = HashMap::new(); diff --git a/kinode/packages/kns_indexer/get_block/Cargo.toml b/kinode/packages/kns_indexer/get_block/Cargo.toml index a9aca8ae2..f3cb994eb 100644 --- a/kinode/packages/kns_indexer/get_block/Cargo.toml +++ b/kinode/packages/kns_indexer/get_block/Cargo.toml @@ -7,10 +7,10 @@ edition = "2021" simulation-mode = [] [dependencies] -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/kns_indexer/get_block/src/lib.rs b/kinode/packages/kns_indexer/get_block/src/lib.rs index 52c2eee0e..4b9e067f2 100644 --- a/kinode/packages/kns_indexer/get_block/src/lib.rs +++ b/kinode/packages/kns_indexer/get_block/src/lib.rs @@ -1,17 +1,13 @@ -use kinode_process_lib::{await_next_request_body, call_init, eth, println, Address}; +use kinode_process_lib::{await_next_message_body, call_init, eth, println, Address}; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); call_init!(init); - fn init(_our: Address) { - let Ok(args) = await_next_request_body() else { + let Ok(args) = await_next_message_body() else { println!("failed to get args"); return; }; diff --git a/kinode/packages/kns_indexer/kns_indexer/Cargo.toml b/kinode/packages/kns_indexer/kns_indexer/Cargo.toml index 6ff1a0790..84f050b77 100644 --- a/kinode/packages/kns_indexer/kns_indexer/Cargo.toml +++ b/kinode/packages/kns_indexer/kns_indexer/Cargo.toml @@ -12,11 +12,11 @@ alloy-primitives = "0.6.2" alloy-sol-types = "0.6.2" bincode = "1.3.3" hex = "0.4.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } rmp-serde = "1.1.2" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/kns_indexer/kns_indexer/src/lib.rs b/kinode/packages/kns_indexer/kns_indexer/src/lib.rs index 312af8c0f..a476f555c 100644 --- a/kinode/packages/kns_indexer/kns_indexer/src/lib.rs +++ b/kinode/packages/kns_indexer/kns_indexer/src/lib.rs @@ -1,6 +1,6 @@ use alloy_sol_types::{sol, SolEvent}; use kinode_process_lib::{ - await_message, eth, get_typed_state, println, set_state, Address, Message, Request, Response, + await_message, call_init, eth, get_typed_state, println, set_state, Address, Message, Request, Response, }; use serde::{Deserialize, Serialize}; use std::collections::{ @@ -12,9 +12,6 @@ use std::string::FromUtf8Error; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); #[derive(Clone, Debug, Serialize, Deserialize)] @@ -114,62 +111,58 @@ fn subscribe_to_logs(eth_provider: ð::Provider, from_block: u64, filter: eth: println!("subscribed to logs successfully"); } -struct Component; -impl Guest for Component { - fn init(our: String) { - let our: Address = our.parse().unwrap(); - - // first, await a message from the kernel which will contain the - // chain ID and contract address for the KNS version we want to track. - let chain_id: u64; - let contract_address: String; - loop { - let Ok(Message::Request { source, body, .. }) = await_message() else { - continue; - }; - if source.process != "kernel:distro:sys" { - continue; - } - (chain_id, contract_address) = serde_json::from_slice(&body).unwrap(); - break; +call_init!(init); +fn init(our: Address) { + // first, await a message from the kernel which will contain the + // chain ID and contract address for the KNS version we want to track. + let chain_id: u64; + let contract_address: String; + loop { + let Ok(Message::Request { source, body, .. }) = await_message() else { + continue; + }; + if source.process != "kernel:distro:sys" { + continue; } - println!("indexing on contract address {}", contract_address); - - // if we have state, load it in - let state: State = match get_typed_state(|bytes| Ok(bincode::deserialize::(bytes)?)) - { - Some(s) => { - // if chain id or contract address changed from a previous run, reset state - if s.chain_id != chain_id || s.contract_address != contract_address { - println!( - "resetting state because runtime contract address or chain ID changed" - ); - State { - chain_id, - contract_address, - names: HashMap::new(), - nodes: HashMap::new(), - block: 1, - } - } else { - println!("loading in {} persisted PKI entries", s.nodes.len()); - s + (chain_id, contract_address) = serde_json::from_slice(&body).unwrap(); + break; + } + println!("indexing on contract address {}", contract_address); + + // if we have state, load it in + let state: State = match get_typed_state(|bytes| Ok(bincode::deserialize::(bytes)?)) + { + Some(s) => { + // if chain id or contract address changed from a previous run, reset state + if s.chain_id != chain_id || s.contract_address != contract_address { + println!( + "resetting state because runtime contract address or chain ID changed" + ); + State { + chain_id, + contract_address, + names: HashMap::new(), + nodes: HashMap::new(), + block: 1, } + } else { + println!("loading in {} persisted PKI entries", s.nodes.len()); + s } - None => State { - chain_id, - contract_address: contract_address.clone(), - names: HashMap::new(), - nodes: HashMap::new(), - block: 1, - }, - }; + } + None => State { + chain_id, + contract_address: contract_address.clone(), + names: HashMap::new(), + nodes: HashMap::new(), + block: 1, + }, + }; - match main(our, state) { - Ok(_) => {} - Err(e) => { - println!("error: {:?}", e); - } + match main(our, state) { + Ok(_) => {} + Err(e) => { + println!("error: {:?}", e); } } } diff --git a/kinode/packages/kns_indexer/state/Cargo.toml b/kinode/packages/kns_indexer/state/Cargo.toml index 153271865..417298951 100644 --- a/kinode/packages/kns_indexer/state/Cargo.toml +++ b/kinode/packages/kns_indexer/state/Cargo.toml @@ -7,10 +7,10 @@ edition = "2021" simulation-mode = [] [dependencies] -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/kns_indexer/state/src/lib.rs b/kinode/packages/kns_indexer/state/src/lib.rs index 1755b8198..f36fe38e0 100644 --- a/kinode/packages/kns_indexer/state/src/lib.rs +++ b/kinode/packages/kns_indexer/state/src/lib.rs @@ -5,9 +5,6 @@ use std::collections::HashMap; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); /// From main kns_indexer process @@ -37,7 +34,6 @@ pub struct KnsUpdate { } call_init!(init); - fn init(_our: Address) { let Ok(Message::Response { body, .. }) = Request::to(("our", "kns_indexer", "kns_indexer", "sys")) diff --git a/kinode/packages/terminal/alias/Cargo.toml b/kinode/packages/terminal/alias/Cargo.toml index c8f0fa9da..cd01fc6d9 100644 --- a/kinode/packages/terminal/alias/Cargo.toml +++ b/kinode/packages/terminal/alias/Cargo.toml @@ -8,10 +8,10 @@ simulation-mode = [] [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/terminal/alias/src/lib.rs b/kinode/packages/terminal/alias/src/lib.rs index b0d150976..e430f74a2 100644 --- a/kinode/packages/terminal/alias/src/lib.rs +++ b/kinode/packages/terminal/alias/src/lib.rs @@ -1,14 +1,11 @@ use kinode_process_lib::{ - await_next_request_body, call_init, println, Address, ProcessId, Request, + await_next_message_body, call_init, println, Address, ProcessId, Request, }; use serde::{Deserialize, Serialize}; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); #[derive(Debug, Serialize, Deserialize)] @@ -20,9 +17,8 @@ enum TerminalAction { } call_init!(init); - fn init(_our: Address) { - let Ok(args) = await_next_request_body() else { + let Ok(args) = await_next_message_body() else { println!("failed to get args"); return; }; diff --git a/kinode/packages/terminal/cat/Cargo.toml b/kinode/packages/terminal/cat/Cargo.toml index 86ae275e8..10145dca0 100644 --- a/kinode/packages/terminal/cat/Cargo.toml +++ b/kinode/packages/terminal/cat/Cargo.toml @@ -8,10 +8,10 @@ simulation-mode = [] [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/terminal/cat/src/lib.rs b/kinode/packages/terminal/cat/src/lib.rs index cf529e671..e30e9e9c6 100644 --- a/kinode/packages/terminal/cat/src/lib.rs +++ b/kinode/packages/terminal/cat/src/lib.rs @@ -1,19 +1,15 @@ use kinode_process_lib::{ - await_next_request_body, call_init, get_blob, println, vfs, Address, Request, + await_next_message_body, call_init, get_blob, println, vfs, Address, Request, }; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); call_init!(init); - fn init(_our: Address) { - let Ok(args) = await_next_request_body() else { + let Ok(args) = await_next_message_body() else { println!("failed to get args"); return; }; diff --git a/kinode/packages/terminal/echo/Cargo.toml b/kinode/packages/terminal/echo/Cargo.toml index 53040d8a4..b2594c32f 100644 --- a/kinode/packages/terminal/echo/Cargo.toml +++ b/kinode/packages/terminal/echo/Cargo.toml @@ -8,10 +8,10 @@ simulation-mode = [] [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/terminal/echo/src/lib.rs b/kinode/packages/terminal/echo/src/lib.rs index 92609f578..dba293179 100644 --- a/kinode/packages/terminal/echo/src/lib.rs +++ b/kinode/packages/terminal/echo/src/lib.rs @@ -1,17 +1,13 @@ -use kinode_process_lib::{await_next_request_body, call_init, println, Address}; +use kinode_process_lib::{await_next_message_body, call_init, println, Address}; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); call_init!(init); - fn init(_our: Address) { - let Ok(args) = await_next_request_body() else { + let Ok(args) = await_next_message_body() else { println!("failed to get args"); return; }; diff --git a/kinode/packages/terminal/hi/Cargo.toml b/kinode/packages/terminal/hi/Cargo.toml index b2b4269bd..735764bb8 100644 --- a/kinode/packages/terminal/hi/Cargo.toml +++ b/kinode/packages/terminal/hi/Cargo.toml @@ -7,10 +7,10 @@ edition = "2021" simulation-mode = [] [dependencies] -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/terminal/hi/src/lib.rs b/kinode/packages/terminal/hi/src/lib.rs index 9b53a1331..b3e2e871b 100644 --- a/kinode/packages/terminal/hi/src/lib.rs +++ b/kinode/packages/terminal/hi/src/lib.rs @@ -1,19 +1,15 @@ use kinode_process_lib::{ - await_next_request_body, call_init, println, Address, Request, SendError, SendErrorKind, + await_next_message_body, call_init, println, Address, Request, SendError, SendErrorKind, }; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); call_init!(init); - fn init(our: Address) { - let Ok(args) = await_next_request_body() else { + let Ok(args) = await_next_message_body() else { println!("failed to get args"); return; }; diff --git a/kinode/packages/terminal/m/Cargo.toml b/kinode/packages/terminal/m/Cargo.toml index c865e6c3a..bc4f0cb7e 100644 --- a/kinode/packages/terminal/m/Cargo.toml +++ b/kinode/packages/terminal/m/Cargo.toml @@ -9,11 +9,11 @@ simulation-mode = [] [dependencies] anyhow = "1.0" clap = "4.4.18" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } regex = "1.10.3" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/terminal/m/src/lib.rs b/kinode/packages/terminal/m/src/lib.rs index c88a96227..2d538c567 100644 --- a/kinode/packages/terminal/m/src/lib.rs +++ b/kinode/packages/terminal/m/src/lib.rs @@ -1,21 +1,17 @@ use clap::{Arg, Command}; use kinode_process_lib::{ - await_next_request_body, call_init, println, Address, Request, SendErrorKind, + await_next_message_body, call_init, println, Address, Request, SendErrorKind, }; use regex::Regex; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); call_init!(init); - fn init(_our: Address) { - let Ok(body) = await_next_request_body() else { + let Ok(body) = await_next_message_body() else { println!("failed to get args"); return; }; diff --git a/kinode/packages/terminal/namehash_to_name/Cargo.toml b/kinode/packages/terminal/namehash_to_name/Cargo.toml index 2eca8a236..4793261f1 100644 --- a/kinode/packages/terminal/namehash_to_name/Cargo.toml +++ b/kinode/packages/terminal/namehash_to_name/Cargo.toml @@ -7,10 +7,10 @@ edition = "2021" simulation-mode = [] [dependencies] -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } rmp-serde = "1.1.2" serde = { version = "1.0", features = ["derive"] } -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/terminal/namehash_to_name/src/lib.rs b/kinode/packages/terminal/namehash_to_name/src/lib.rs index 77e29bb8d..c868a60d0 100644 --- a/kinode/packages/terminal/namehash_to_name/src/lib.rs +++ b/kinode/packages/terminal/namehash_to_name/src/lib.rs @@ -1,14 +1,11 @@ use kinode_process_lib::{ - await_next_request_body, call_init, println, Address, Message, NodeId, Request, + await_next_message_body, call_init, println, Address, Message, NodeId, Request, }; use serde::{Deserialize, Serialize}; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); // types copied from runtime networking core @@ -52,9 +49,8 @@ pub enum NetResponse { } call_init!(init); - fn init(_our: Address) { - let Ok(args) = await_next_request_body() else { + let Ok(args) = await_next_message_body() else { println!("failed to get args"); return; }; diff --git a/kinode/packages/terminal/net_diagnostics/Cargo.toml b/kinode/packages/terminal/net_diagnostics/Cargo.toml index 604152a5f..e7429b2b8 100644 --- a/kinode/packages/terminal/net_diagnostics/Cargo.toml +++ b/kinode/packages/terminal/net_diagnostics/Cargo.toml @@ -7,10 +7,10 @@ edition = "2021" simulation-mode = [] [dependencies] -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } rmp-serde = "1.1.2" serde = { version = "1.0", features = ["derive"] } -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/terminal/net_diagnostics/src/lib.rs b/kinode/packages/terminal/net_diagnostics/src/lib.rs index 9079fd36b..f4690f6c3 100644 --- a/kinode/packages/terminal/net_diagnostics/src/lib.rs +++ b/kinode/packages/terminal/net_diagnostics/src/lib.rs @@ -4,9 +4,6 @@ use serde::{Deserialize, Serialize}; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); // types copied from runtime networking core @@ -50,7 +47,6 @@ pub enum NetResponse { } call_init!(init); - fn init(_our: Address) { let Ok(Ok(Message::Response { body, .. })) = Request::to(("our", "net", "distro", "sys")) .body(rmp_serde::to_vec(&NetAction::GetDiagnostics).unwrap()) diff --git a/kinode/packages/terminal/peer/Cargo.toml b/kinode/packages/terminal/peer/Cargo.toml index cd6a9f664..4b73ad299 100644 --- a/kinode/packages/terminal/peer/Cargo.toml +++ b/kinode/packages/terminal/peer/Cargo.toml @@ -7,10 +7,10 @@ edition = "2021" simulation-mode = [] [dependencies] -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } rmp-serde = "1.1.2" serde = { version = "1.0", features = ["derive"] } -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/terminal/peer/src/lib.rs b/kinode/packages/terminal/peer/src/lib.rs index 12cb74991..e1277eb7e 100644 --- a/kinode/packages/terminal/peer/src/lib.rs +++ b/kinode/packages/terminal/peer/src/lib.rs @@ -1,14 +1,11 @@ use kinode_process_lib::{ - await_next_request_body, call_init, println, Address, Message, NodeId, Request, + await_next_message_body, call_init, println, Address, Message, NodeId, Request, }; use serde::{Deserialize, Serialize}; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); // types copied from runtime networking core @@ -52,9 +49,8 @@ pub enum NetResponse { } call_init!(init); - fn init(_our: Address) { - let Ok(args) = await_next_request_body() else { + let Ok(args) = await_next_message_body() else { println!("failed to get args"); return; }; diff --git a/kinode/packages/terminal/peers/Cargo.toml b/kinode/packages/terminal/peers/Cargo.toml index b7d7cad34..f589c177f 100644 --- a/kinode/packages/terminal/peers/Cargo.toml +++ b/kinode/packages/terminal/peers/Cargo.toml @@ -7,10 +7,10 @@ edition = "2021" simulation-mode = [] [dependencies] -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } rmp-serde = "1.1.2" serde = { version = "1.0", features = ["derive"] } -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/terminal/peers/src/lib.rs b/kinode/packages/terminal/peers/src/lib.rs index bc324e222..1536d12f0 100644 --- a/kinode/packages/terminal/peers/src/lib.rs +++ b/kinode/packages/terminal/peers/src/lib.rs @@ -4,9 +4,6 @@ use serde::{Deserialize, Serialize}; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); // types copied from runtime networking core @@ -50,7 +47,6 @@ pub enum NetResponse { } call_init!(init); - fn init(_our: Address) { let Ok(Ok(Message::Response { body, .. })) = Request::to(("our", "net", "distro", "sys")) .body(rmp_serde::to_vec(&NetAction::GetPeers).unwrap()) diff --git a/kinode/packages/terminal/terminal/Cargo.toml b/kinode/packages/terminal/terminal/Cargo.toml index d85e70ae0..9eb9483ec 100644 --- a/kinode/packages/terminal/terminal/Cargo.toml +++ b/kinode/packages/terminal/terminal/Cargo.toml @@ -9,12 +9,12 @@ simulation-mode = [] [dependencies] anyhow = "1.0" bincode = "1.3.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } rand = "0.8" regex = "1.10.3" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/terminal/terminal/src/lib.rs b/kinode/packages/terminal/terminal/src/lib.rs index 831eaee1e..5bb1acd87 100644 --- a/kinode/packages/terminal/terminal/src/lib.rs +++ b/kinode/packages/terminal/terminal/src/lib.rs @@ -2,7 +2,7 @@ use anyhow::anyhow; use kinode_process_lib::kernel_types as kt; use kinode_process_lib::kinode::process::standard as wit; use kinode_process_lib::{ - get_blob, get_typed_state, our_capabilities, print_to_terminal, println, set_state, vfs, + call_init, get_blob, get_typed_state, our_capabilities, print_to_terminal, println, set_state, vfs, Address, Capability, ProcessId, Request, }; use serde::{Deserialize, Serialize}; @@ -11,9 +11,6 @@ use std::collections::{HashMap, HashSet}; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); #[derive(Debug, Serialize, Deserialize)] @@ -51,103 +48,101 @@ fn parse_command(state: &mut TerminalState, line: &str) -> anyhow::Result<()> { } } -struct Component; -impl Guest for Component { - fn init(our: String) { - let mut state: TerminalState = - match get_typed_state(|bytes| Ok(bincode::deserialize(bytes)?)) { - Some(s) => s, - None => TerminalState { - our: our.parse::
().unwrap(), - aliases: HashMap::from([ - ( - "alias".to_string(), - ProcessId::new(Some("alias"), "terminal", "sys"), - ), - ( - "cat".to_string(), - ProcessId::new(Some("cat"), "terminal", "sys"), - ), - ( - "echo".to_string(), - ProcessId::new(Some("echo"), "terminal", "sys"), - ), - ( - "hi".to_string(), - ProcessId::new(Some("hi"), "terminal", "sys"), - ), - ( - "m".to_string(), - ProcessId::new(Some("m"), "terminal", "sys"), - ), - ( - "namehash_to_name".to_string(), - ProcessId::new(Some("namehash_to_name"), "terminal", "sys"), - ), - ( - "net_diagnostics".to_string(), - ProcessId::new(Some("net_diagnostics"), "terminal", "sys"), - ), - ( - "peer".to_string(), - ProcessId::new(Some("peer"), "terminal", "sys"), - ), - ( - "peers".to_string(), - ProcessId::new(Some("peers"), "terminal", "sys"), - ), - ( - "top".to_string(), - ProcessId::new(Some("top"), "terminal", "sys"), - ), - ]), - }, - }; +call_init!(init); +fn init(our: Address) { + let mut state: TerminalState = + match get_typed_state(|bytes| Ok(bincode::deserialize(bytes)?)) { + Some(s) => s, + None => TerminalState { + our, + aliases: HashMap::from([ + ( + "alias".to_string(), + ProcessId::new(Some("alias"), "terminal", "sys"), + ), + ( + "cat".to_string(), + ProcessId::new(Some("cat"), "terminal", "sys"), + ), + ( + "echo".to_string(), + ProcessId::new(Some("echo"), "terminal", "sys"), + ), + ( + "hi".to_string(), + ProcessId::new(Some("hi"), "terminal", "sys"), + ), + ( + "m".to_string(), + ProcessId::new(Some("m"), "terminal", "sys"), + ), + ( + "namehash_to_name".to_string(), + ProcessId::new(Some("namehash_to_name"), "terminal", "sys"), + ), + ( + "net_diagnostics".to_string(), + ProcessId::new(Some("net_diagnostics"), "terminal", "sys"), + ), + ( + "peer".to_string(), + ProcessId::new(Some("peer"), "terminal", "sys"), + ), + ( + "peers".to_string(), + ProcessId::new(Some("peers"), "terminal", "sys"), + ), + ( + "top".to_string(), + ProcessId::new(Some("top"), "terminal", "sys"), + ), + ]), + }, + }; - loop { - let (source, message) = match wit::receive() { - Ok((source, message)) => (source, message), - Err((error, _context)) => { - println!("net error: {:?}!", error.kind); - continue; - } - }; - match message { - wit::Message::Request(wit::Request { body, .. }) => { - if state.our == source { - match parse_command( - &mut state, - std::str::from_utf8(&body).unwrap_or_default(), - ) { - Ok(()) => continue, - Err(e) => println!("{e}"), - } - } else if state.our.node == source.node - && state.our.package() == source.package() - { - let Ok(action) = serde_json::from_slice::(&body) else { - println!("failed to parse action from: {}", source); - continue; - }; - match action { - TerminalAction::EditAlias { alias, process } => { - match handle_alias_change(&mut state, alias, process) { - Ok(()) => continue, - Err(e) => println!("{e}"), - }; - } - } - } else { - println!("ignoring message from: {}", source); + loop { + let (source, message) = match wit::receive() { + Ok((source, message)) => (source, message), + Err((error, _context)) => { + println!("net error: {:?}!", error.kind); + continue; + } + }; + match message { + wit::Message::Request(wit::Request { body, .. }) => { + if state.our == source { + match parse_command( + &mut state, + std::str::from_utf8(&body).unwrap_or_default(), + ) { + Ok(()) => continue, + Err(e) => println!("{e}"), + } + } else if state.our.node == source.node + && state.our.package() == source.package() + { + let Ok(action) = serde_json::from_slice::(&body) else { + println!("failed to parse action from: {}", source); continue; + }; + match action { + TerminalAction::EditAlias { alias, process } => { + match handle_alias_change(&mut state, alias, process) { + Ok(()) => continue, + Err(e) => println!("{e}"), + }; + } } + } else { + println!("ignoring message from: {}", source); + continue; } - wit::Message::Response((wit::Response { body, .. }, _)) => { - if let Ok(txt) = std::str::from_utf8(&body) { - println!("{txt}"); - } else { - println!("{body:?}"); - } + } + wit::Message::Response((wit::Response { body, .. }, _)) => { + if let Ok(txt) = std::str::from_utf8(&body) { + println!("{txt}"); + } else { + println!("{body:?}"); } } } diff --git a/kinode/packages/terminal/top/Cargo.toml b/kinode/packages/terminal/top/Cargo.toml index e935df412..0e3af141e 100644 --- a/kinode/packages/terminal/top/Cargo.toml +++ b/kinode/packages/terminal/top/Cargo.toml @@ -8,10 +8,10 @@ simulation-mode = [] [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/terminal/top/src/lib.rs b/kinode/packages/terminal/top/src/lib.rs index 479d83e4e..143a43979 100644 --- a/kinode/packages/terminal/top/src/lib.rs +++ b/kinode/packages/terminal/top/src/lib.rs @@ -1,20 +1,16 @@ use kinode_process_lib::kernel_types::{KernelCommand, KernelPrint}; use kinode_process_lib::{ - await_next_request_body, call_init, println, Address, ProcessId, Request, + await_next_message_body, call_init, println, Address, ProcessId, Request, }; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); call_init!(init); - fn init(_our: Address) { - let Ok(args) = await_next_request_body() else { + let Ok(args) = await_next_message_body() else { println!("failed to get args"); return; }; diff --git a/kinode/packages/tester/test_runner/Cargo.toml b/kinode/packages/tester/test_runner/Cargo.toml index e53ea70ae..e74fcd236 100644 --- a/kinode/packages/tester/test_runner/Cargo.toml +++ b/kinode/packages/tester/test_runner/Cargo.toml @@ -9,11 +9,11 @@ simulation-mode = [] [dependencies] anyhow = "1.0" bincode = "1.3.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" thiserror = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/tester/test_runner/src/lib.rs b/kinode/packages/tester/test_runner/src/lib.rs index e29d502d2..636347e2c 100644 --- a/kinode/packages/tester/test_runner/src/lib.rs +++ b/kinode/packages/tester/test_runner/src/lib.rs @@ -12,9 +12,6 @@ use tester_types as tt; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); fn make_vfs_address(our: &Address) -> anyhow::Result
{ diff --git a/kinode/packages/tester/tester/Cargo.toml b/kinode/packages/tester/tester/Cargo.toml index 154c1b854..6828571c3 100644 --- a/kinode/packages/tester/tester/Cargo.toml +++ b/kinode/packages/tester/tester/Cargo.toml @@ -10,11 +10,11 @@ simulation-mode = [] anyhow = "1.0" bincode = "1.3.3" indexmap = "2.1" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" thiserror = "1.0" -wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" } +wit-bindgen = "0.24.0" [lib] crate-type = ["cdylib"] diff --git a/kinode/packages/tester/tester/src/lib.rs b/kinode/packages/tester/tester/src/lib.rs index a2a7ee2a0..b502988fd 100644 --- a/kinode/packages/tester/tester/src/lib.rs +++ b/kinode/packages/tester/tester/src/lib.rs @@ -12,9 +12,6 @@ use tester_types as tt; wit_bindgen::generate!({ path: "wit", world: "process", - exports: { - world: Component, - }, }); type Messages = IndexMap; diff --git a/kinode/src/kernel/process.rs b/kinode/src/kernel/process.rs index b6a3865f5..982741f65 100644 --- a/kinode/src/kernel/process.rs +++ b/kinode/src/kernel/process.rs @@ -12,10 +12,10 @@ use tokio::task::JoinHandle; use wasmtime::component::ResourceTable as Table; use wasmtime::component::*; use wasmtime::{Engine, Store}; -use wasmtime_wasi::preview2::{ +use wasmtime_wasi::{ pipe::MemoryOutputPipe, DirPerms, FilePerms, WasiCtx, WasiCtxBuilder, WasiView, }; -use wasmtime_wasi::sync::Dir; +use wasi_common::sync::Dir; const STACK_TRACE_SIZE: usize = 5000; @@ -63,16 +63,10 @@ pub struct ProcessWasi { } impl WasiView for ProcessWasi { - fn table(&self) -> &Table { - &self.table - } - fn table_mut(&mut self) -> &mut Table { + fn table(&mut self) -> &mut Table { &mut self.table } - fn ctx(&self) -> &WasiCtx { - &self.wasi - } - fn ctx_mut(&mut self) -> &mut WasiCtx { + fn ctx(&mut self) -> &mut WasiCtx { &mut self.wasi } } @@ -558,7 +552,7 @@ pub async fn make_process_loop( .await { if let Ok(wasi_tempdir) = - Dir::open_ambient_dir(tmp_path.clone(), wasmtime_wasi::sync::ambient_authority()) + Dir::open_ambient_dir(tmp_path.clone(), wasi_common::sync::ambient_authority()) { wasi.preopened_dir( wasi_tempdir, @@ -572,7 +566,7 @@ pub async fn make_process_loop( let wasi = wasi.stderr(wasi_stderr.clone()).build(); - wasmtime_wasi::preview2::command::add_to_linker(&mut linker).unwrap(); + wasmtime_wasi::command::add_to_linker(&mut linker).unwrap(); let mut store = Store::new( &engine, diff --git a/kinode/wasi_snapshot_preview1.wasm b/kinode/wasi_snapshot_preview1.wasm index 4ee5bc1b8b76548afb70ad74b32c288434538bba..e2a3f4dc95e2a2ed70e37fde7a912d12a0b85c00 100644 GIT binary patch delta 17869 zcmd6P37iz=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VauwSOcu)49CnFh!c+>j zN?nPZW)z?M$s9J7Nvfr#jbu(sCX=aTp=gzB=bFpUr6;tss^l#*d$l)lmO(qG zRUEpNhXYk?sHag-^t_$DraFlJaaDIv5)L6A=#^){T$=j=JGO}R0IQHMQJD}Bx55}%;mG!vnvQf zS6M!WEpCFn=L@2&snvULpWY=REx$d8cU=(%(eKKI7*y~i*sszWu4rjbe| zG}W{aS8sw909;#H>0r&#q+Un^q^%pplxh@<*{zI60p1-g-_XG#$K;R~YtXEOZRgV( zM7OB7_tJHX5-Hs@)TEly6G^y+R9Z7{F2CHtHa2NFBVSYtdS0<@GSciVZo8Q?ksc!w zA@f4wFrd~c%W!E$*T1wXu@sjymE@i=+Z!3RQVOKRJfkhII zEMeh@$wCqmRy93aW`FN?uT8Q& zQOrr?;M(ATOeJR)vOC$S#P1QO9fpuKq(g=VI#SqGsD)hi4t7D+5k{lB0R>DWh9;91 z+)N_7ixsNf_2dOfm5`|wO)Ib4ti9Z4u-fu0gGHiw_+b_MjI@$Z>Dc&W?`7vy$IOVr z7D(=(QY{qWjkCMKE)L?G25X9@G!tybF0Yt23M#DSK6V;)Yi-Fs`!e_hBoIZOpumeF z?^3e&v(w!HDY9COfDb~(045|YJE5v}_5nsY+w}4QKWm+#<$L=Fv1wbQlV;~l2rii_ z<}@q&Ao~;tB%7#V4zJ7E0~nFjChF=p;%!FBe!{Q3>gu$on?)(!U# Rbtm`nHh_D!j6>4{{{uKmK}rAs diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 39de367ba..cd2f5971c 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -23,4 +23,4 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" thiserror = "1.0" tokio = { version = "1.28", features = ["sync"] } -wasmtime = { version = "17.0.1", features = ["component-model"] } +wasmtime = { version = "19.0.1", features = ["component-model"] } From 809894e5245f219f3c0d0438a03d0da738078995 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 23:53:39 +0000 Subject: [PATCH 2/5] Format Rust code using rustfmt --- .../kns_indexer/kns_indexer/src/lib.rs | 10 +- kinode/packages/terminal/terminal/src/lib.rs | 111 +++++++++--------- kinode/src/kernel/process.rs | 2 +- 3 files changed, 58 insertions(+), 65 deletions(-) diff --git a/kinode/packages/kns_indexer/kns_indexer/src/lib.rs b/kinode/packages/kns_indexer/kns_indexer/src/lib.rs index a476f555c..d958107f6 100644 --- a/kinode/packages/kns_indexer/kns_indexer/src/lib.rs +++ b/kinode/packages/kns_indexer/kns_indexer/src/lib.rs @@ -1,6 +1,7 @@ use alloy_sol_types::{sol, SolEvent}; use kinode_process_lib::{ - await_message, call_init, eth, get_typed_state, println, set_state, Address, Message, Request, Response, + await_message, call_init, eth, get_typed_state, println, set_state, Address, Message, Request, + Response, }; use serde::{Deserialize, Serialize}; use std::collections::{ @@ -130,14 +131,11 @@ fn init(our: Address) { println!("indexing on contract address {}", contract_address); // if we have state, load it in - let state: State = match get_typed_state(|bytes| Ok(bincode::deserialize::(bytes)?)) - { + let state: State = match get_typed_state(|bytes| Ok(bincode::deserialize::(bytes)?)) { Some(s) => { // if chain id or contract address changed from a previous run, reset state if s.chain_id != chain_id || s.contract_address != contract_address { - println!( - "resetting state because runtime contract address or chain ID changed" - ); + println!("resetting state because runtime contract address or chain ID changed"); State { chain_id, contract_address, diff --git a/kinode/packages/terminal/terminal/src/lib.rs b/kinode/packages/terminal/terminal/src/lib.rs index 5bb1acd87..612b6d47a 100644 --- a/kinode/packages/terminal/terminal/src/lib.rs +++ b/kinode/packages/terminal/terminal/src/lib.rs @@ -2,8 +2,8 @@ use anyhow::anyhow; use kinode_process_lib::kernel_types as kt; use kinode_process_lib::kinode::process::standard as wit; use kinode_process_lib::{ - call_init, get_blob, get_typed_state, our_capabilities, print_to_terminal, println, set_state, vfs, - Address, Capability, ProcessId, Request, + call_init, get_blob, get_typed_state, our_capabilities, print_to_terminal, println, set_state, + vfs, Address, Capability, ProcessId, Request, }; use serde::{Deserialize, Serialize}; use std::collections::{HashMap, HashSet}; @@ -50,55 +50,54 @@ fn parse_command(state: &mut TerminalState, line: &str) -> anyhow::Result<()> { call_init!(init); fn init(our: Address) { - let mut state: TerminalState = - match get_typed_state(|bytes| Ok(bincode::deserialize(bytes)?)) { - Some(s) => s, - None => TerminalState { - our, - aliases: HashMap::from([ - ( - "alias".to_string(), - ProcessId::new(Some("alias"), "terminal", "sys"), - ), - ( - "cat".to_string(), - ProcessId::new(Some("cat"), "terminal", "sys"), - ), - ( - "echo".to_string(), - ProcessId::new(Some("echo"), "terminal", "sys"), - ), - ( - "hi".to_string(), - ProcessId::new(Some("hi"), "terminal", "sys"), - ), - ( - "m".to_string(), - ProcessId::new(Some("m"), "terminal", "sys"), - ), - ( - "namehash_to_name".to_string(), - ProcessId::new(Some("namehash_to_name"), "terminal", "sys"), - ), - ( - "net_diagnostics".to_string(), - ProcessId::new(Some("net_diagnostics"), "terminal", "sys"), - ), - ( - "peer".to_string(), - ProcessId::new(Some("peer"), "terminal", "sys"), - ), - ( - "peers".to_string(), - ProcessId::new(Some("peers"), "terminal", "sys"), - ), - ( - "top".to_string(), - ProcessId::new(Some("top"), "terminal", "sys"), - ), - ]), - }, - }; + let mut state: TerminalState = match get_typed_state(|bytes| Ok(bincode::deserialize(bytes)?)) { + Some(s) => s, + None => TerminalState { + our, + aliases: HashMap::from([ + ( + "alias".to_string(), + ProcessId::new(Some("alias"), "terminal", "sys"), + ), + ( + "cat".to_string(), + ProcessId::new(Some("cat"), "terminal", "sys"), + ), + ( + "echo".to_string(), + ProcessId::new(Some("echo"), "terminal", "sys"), + ), + ( + "hi".to_string(), + ProcessId::new(Some("hi"), "terminal", "sys"), + ), + ( + "m".to_string(), + ProcessId::new(Some("m"), "terminal", "sys"), + ), + ( + "namehash_to_name".to_string(), + ProcessId::new(Some("namehash_to_name"), "terminal", "sys"), + ), + ( + "net_diagnostics".to_string(), + ProcessId::new(Some("net_diagnostics"), "terminal", "sys"), + ), + ( + "peer".to_string(), + ProcessId::new(Some("peer"), "terminal", "sys"), + ), + ( + "peers".to_string(), + ProcessId::new(Some("peers"), "terminal", "sys"), + ), + ( + "top".to_string(), + ProcessId::new(Some("top"), "terminal", "sys"), + ), + ]), + }, + }; loop { let (source, message) = match wit::receive() { @@ -111,16 +110,12 @@ fn init(our: Address) { match message { wit::Message::Request(wit::Request { body, .. }) => { if state.our == source { - match parse_command( - &mut state, - std::str::from_utf8(&body).unwrap_or_default(), - ) { + match parse_command(&mut state, std::str::from_utf8(&body).unwrap_or_default()) + { Ok(()) => continue, Err(e) => println!("{e}"), } - } else if state.our.node == source.node - && state.our.package() == source.package() - { + } else if state.our.node == source.node && state.our.package() == source.package() { let Ok(action) = serde_json::from_slice::(&body) else { println!("failed to parse action from: {}", source); continue; diff --git a/kinode/src/kernel/process.rs b/kinode/src/kernel/process.rs index 982741f65..31828ba00 100644 --- a/kinode/src/kernel/process.rs +++ b/kinode/src/kernel/process.rs @@ -9,13 +9,13 @@ use std::collections::{HashMap, VecDeque}; use std::sync::Arc; use tokio::fs; use tokio::task::JoinHandle; +use wasi_common::sync::Dir; use wasmtime::component::ResourceTable as Table; use wasmtime::component::*; use wasmtime::{Engine, Store}; use wasmtime_wasi::{ pipe::MemoryOutputPipe, DirPerms, FilePerms, WasiCtx, WasiCtxBuilder, WasiView, }; -use wasi_common::sync::Dir; const STACK_TRACE_SIZE: usize = 5000; From 5e18f44782e53ddbdbc9e17db358cc1d2b5bbdbe Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Wed, 3 Apr 2024 17:53:54 -0700 Subject: [PATCH 3/5] use latest `kit` --- kinode/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kinode/Cargo.toml b/kinode/Cargo.toml index 703fb9944..225b72246 100644 --- a/kinode/Cargo.toml +++ b/kinode/Cargo.toml @@ -14,7 +14,7 @@ path = "src/main.rs" [build-dependencies] anyhow = "1.0.71" -kit = { git = "https://github.com/kinode-dao/kit", rev = "95cfc41" } +kit = { git = "https://github.com/kinode-dao/kit", rev = "79732ec" } rayon = "1.8.1" sha2 = "0.10" tokio = "1.28" From 92d06ddf8593f79a6fb72f94df3ff9ada6b97527 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Wed, 3 Apr 2024 18:43:15 -0700 Subject: [PATCH 4/5] update kit dep & use kit for lib build --- Cargo.lock | 73 ++++++++++++++++++----------------------------- kinode/Cargo.toml | 2 +- lib/Cargo.toml | 3 ++ lib/build.rs | 32 ++++++++++----------- 4 files changed, 47 insertions(+), 63 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba287ca6d..30ee7424c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,7 +78,7 @@ name = "alias" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "serde", "serde_json", "wit-bindgen", @@ -423,7 +423,7 @@ dependencies = [ "alloy-sol-types", "anyhow", "bincode", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "rand 0.8.5", "serde", "serde_json", @@ -929,7 +929,7 @@ name = "cat" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "serde", "serde_json", "wit-bindgen", @@ -991,7 +991,7 @@ dependencies = [ "anyhow", "base64 0.13.1", "bincode", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "pleco", "serde", "serde_json", @@ -1662,7 +1662,7 @@ name = "download" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "serde", "serde_json", "wit-bindgen", @@ -1693,7 +1693,7 @@ name = "echo" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "serde", "serde_json", "wit-bindgen", @@ -1912,7 +1912,7 @@ version = "0.2.0" dependencies = [ "anyhow", "bincode", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "rand 0.8.5", "serde", "serde_json", @@ -2057,7 +2057,7 @@ dependencies = [ name = "get_block" version = "0.1.0" dependencies = [ - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "serde", "serde_json", "wit-bindgen", @@ -2232,7 +2232,7 @@ checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" name = "hi" version = "0.1.0" dependencies = [ - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "serde", "serde_json", "wit-bindgen", @@ -2262,7 +2262,7 @@ version = "0.1.0" dependencies = [ "anyhow", "bincode", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "serde", "serde_json", "wit-bindgen", @@ -2494,7 +2494,7 @@ name = "install" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "serde", "serde_json", "wit-bindgen", @@ -2732,27 +2732,6 @@ dependencies = [ "lib", ] -[[package]] -name = "kinode_process_lib" -version = "0.6.0" -source = "git+https://github.com/kinode-dao/process_lib?rev=820b35c#820b35c6dd897101df9844fda4a40aed3abd5dcf" -dependencies = [ - "alloy-json-rpc", - "alloy-primitives", - "alloy-rpc-types", - "alloy-transport", - "anyhow", - "bincode", - "http 1.0.0", - "mime_guess", - "rand 0.8.5", - "serde", - "serde_json", - "thiserror", - "url", - "wit-bindgen", -] - [[package]] name = "kinode_process_lib" version = "0.6.0" @@ -2777,7 +2756,7 @@ dependencies = [ [[package]] name = "kit" version = "0.3.1" -source = "git+https://github.com/kinode-dao/kit?rev=95cfc41#95cfc41e5dd1c6a2c800eb9d08731bcf26c75973" +source = "git+https://github.com/kinode-dao/kit?rev=659f59e#659f59ec9b8a503e4998e1bbe4b991429fa7ff33" dependencies = [ "anyhow", "base64 0.21.7", @@ -2788,7 +2767,7 @@ dependencies = [ "futures-util", "git2", "hex", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=820b35c)", + "kinode_process_lib", "nix", "regex", "reqwest", @@ -2817,7 +2796,7 @@ dependencies = [ "anyhow", "bincode", "hex", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "rmp-serde", "serde", "serde_json", @@ -2847,6 +2826,8 @@ name = "lib" version = "0.6.3" dependencies = [ "alloy-rpc-types", + "anyhow", + "kit", "lazy_static", "rand 0.8.5", "reqwest", @@ -2997,7 +2978,7 @@ version = "0.1.0" dependencies = [ "anyhow", "clap", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "regex", "serde", "serde_json", @@ -3129,7 +3110,7 @@ dependencies = [ name = "namehash_to_name" version = "0.1.0" dependencies = [ - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "rmp-serde", "serde", "wit-bindgen", @@ -3157,7 +3138,7 @@ dependencies = [ name = "net_diagnostics" version = "0.1.0" dependencies = [ - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "rmp-serde", "serde", "wit-bindgen", @@ -3446,7 +3427,7 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" name = "peer" version = "0.1.0" dependencies = [ - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "rmp-serde", "serde", "wit-bindgen", @@ -3456,7 +3437,7 @@ dependencies = [ name = "peers" version = "0.1.0" dependencies = [ - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "rmp-serde", "serde", "wit-bindgen", @@ -4634,7 +4615,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" name = "state" version = "0.1.0" dependencies = [ - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "serde", "serde_json", "wit-bindgen", @@ -4788,7 +4769,7 @@ version = "0.1.0" dependencies = [ "anyhow", "bincode", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "rand 0.8.5", "regex", "serde", @@ -4802,7 +4783,7 @@ version = "0.1.0" dependencies = [ "anyhow", "bincode", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "serde", "serde_json", "thiserror", @@ -4816,7 +4797,7 @@ dependencies = [ "anyhow", "bincode", "indexmap", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "serde", "serde_json", "thiserror", @@ -5047,7 +5028,7 @@ name = "top" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "serde", "serde_json", "wit-bindgen", @@ -5343,7 +5324,7 @@ name = "uninstall" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib 0.6.0 (git+https://github.com/kinode-dao/process_lib?rev=84b3d84)", + "kinode_process_lib", "serde", "serde_json", "wit-bindgen", diff --git a/kinode/Cargo.toml b/kinode/Cargo.toml index 225b72246..1ff51905a 100644 --- a/kinode/Cargo.toml +++ b/kinode/Cargo.toml @@ -14,7 +14,7 @@ path = "src/main.rs" [build-dependencies] anyhow = "1.0.71" -kit = { git = "https://github.com/kinode-dao/kit", rev = "79732ec" } +kit = { git = "https://github.com/kinode-dao/kit", rev = "659f59e" } rayon = "1.8.1" sha2 = "0.10" tokio = "1.28" diff --git a/lib/Cargo.toml b/lib/Cargo.toml index cd2f5971c..f5408f8ae 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -11,7 +11,10 @@ license = "Apache-2.0" [lib] [build-dependencies] +anyhow = "1.0.71" +kit = { git = "https://github.com/kinode-dao/kit", rev = "659f59e" } reqwest = { version = "0.11.22", features = ["blocking"] } +tokio = "1.28" [dependencies] alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "6f8ebb4" } diff --git a/lib/build.rs b/lib/build.rs index ff2d7beee..5bab53c59 100644 --- a/lib/build.rs +++ b/lib/build.rs @@ -1,23 +1,23 @@ -use std::{fs, io::copy}; +const KINODE_WIT_URL: &str = + "https://raw.githubusercontent.com/kinode-dao/kinode-wit/aa2c8b11c9171b949d1991c32f58591c0e881f85/kinode.wit"; -fn main() { +fn main() -> anyhow::Result<()> { if std::env::var("SKIP_BUILD_SCRIPT").is_ok() { println!("Skipping build script"); - return; + return Ok(()); } - let pwd = std::env::current_dir().unwrap(); + let pwd = std::env::current_dir()?; - // Pull wit from git repo - let wit_dir = pwd.join("wit"); - fs::create_dir_all(&wit_dir).unwrap(); - let wit_file = wit_dir.join("kinode.wit"); - if !wit_file.exists() { - // TODO: cache in better way - let mut wit_file = fs::File::create(&wit_file).unwrap(); - let kinode_wit_url = - "https://raw.githubusercontent.com/kinode-dao/kinode-wit/master/kinode.wit"; - let mut response = reqwest::blocking::get(kinode_wit_url).unwrap(); - copy(&mut response, &mut wit_file).unwrap(); - } + let wit_file = pwd + .join("wit") + .join("kinode.wit"); + + let rt = tokio::runtime::Runtime::new().unwrap(); + rt.block_on(async { + kit::build::download_file(KINODE_WIT_URL, &wit_file) + .await + .map_err(|e| anyhow::anyhow!("{:?}", e))?; + Ok(()) + }) } From 97739754ddb96e572487eaa6a437ed2325f55370 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 01:43:42 +0000 Subject: [PATCH 5/5] Format Rust code using rustfmt --- lib/build.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/build.rs b/lib/build.rs index 5bab53c59..c06a8f774 100644 --- a/lib/build.rs +++ b/lib/build.rs @@ -9,9 +9,7 @@ fn main() -> anyhow::Result<()> { let pwd = std::env::current_dir()?; - let wit_file = pwd - .join("wit") - .join("kinode.wit"); + let wit_file = pwd.join("wit").join("kinode.wit"); let rt = tokio::runtime::Runtime::new().unwrap(); rt.block_on(async {