diff --git a/.github/workflows/mdbook.yml b/.github/workflows/mdbook.yml index 43d546a6..3e107e13 100644 --- a/.github/workflows/mdbook.yml +++ b/.github/workflows/mdbook.yml @@ -105,27 +105,26 @@ jobs: - name: Unzip the release run: unzip kit.zip - #- name: Get latest release from kinode-dao/kit - # id: get-latest-kit-release - # uses: actions/github-script@v6 - # with: - # script: | - # const repo = { - # owner: 'kinode-dao', - # repo: 'kinode', - # }; - # const release = await github.rest.repos.getLatestRelease(repo); - # const asset = release.data.assets.find(asset => asset.name.match(/kinode-x86_64-unknown-linux-gnu\.zip/)); - # if (!asset) { - # throw new Error('Asset not found'); - # } - # return asset.browser_download_url; - # result-encoding: string + - name: Get latest release from kinode-dao/kit + id: get-latest-kit-release + uses: actions/github-script@v6 + with: + script: | + const repo = { + owner: 'kinode-dao', + repo: 'kinode', + }; + const release = await github.rest.repos.getLatestRelease(repo); + const asset = release.data.assets.find(asset => asset.name.match(/kinode-x86_64-unknown-linux-gnu\.zip/)); + if (!asset) { + throw new Error('Asset not found'); + } + return asset.browser_download_url; + result-encoding: string - name: Download the Kinode release - run: wget -q https://files.yael.solutions/240906/kinode-x86_64-unknown-linux-gnu-simulation-mode.zip -O kinode.zip - #run: wget -q ${DOWNLOAD_URL} -O kinode.zip - #env: - # DOWNLOAD_URL: ${{ steps.get-latest-kit-release.outputs.result }} + run: wget -q ${DOWNLOAD_URL} -O kinode.zip + env: + DOWNLOAD_URL: ${{ steps.get-latest-kit-release.outputs.result }} - name: Unzip the Kinode release run: unzip kinode.zip diff --git a/book.toml b/book.toml index 2ba38b99..c36a3c08 100644 --- a/book.toml +++ b/book.toml @@ -1,5 +1,5 @@ [book] -authors = ["dr-frmr", "jtneev", "nick1udwig", "bitful-pannul", "willbach", "0x70b1a5", "habsul-rignyr", "commercium-sys", "tadad"] +authors = ["Sybil Technologies AG"] language = "en" multilingual = false src = "src" diff --git a/code/capabilities/pkg/manifest.json b/code/capabilities/pkg/manifest.json index 46afa1c6..49b3ae49 100644 --- a/code/capabilities/pkg/manifest.json +++ b/code/capabilities/pkg/manifest.json @@ -7,12 +7,12 @@ "request_capabilities": [ "eth:distro:sys", "homepage:homepage:sys", - "http_server:distro:sys", + "http-server:distro:sys", "vfs:distro:sys" ], "grant_capabilities": [ "eth:distro:sys", - "http_server:distro:sys", + "http-server:distro:sys", "vfs:distro:sys" ], "public": false diff --git a/code/chat-with-file-transfer/api/chat-with-file-transfer:template.os-v0.wit b/code/chat-with-file-transfer/api/chat-with-file-transfer:template.os-v0.wit index 08903ca4..4f17cbdb 100644 --- a/code/chat-with-file-transfer/api/chat-with-file-transfer:template.os-v0.wit +++ b/code/chat-with-file-transfer/api/chat-with-file-transfer:template.os-v0.wit @@ -24,5 +24,5 @@ interface chat-with-file-transfer { world chat-with-file-transfer-template-dot-os-v0 { import chat-with-file-transfer; import file-transfer-worker; - include process-v0; + include process-v1; } diff --git a/code/chat-with-file-transfer/chat-with-file-transfer/Cargo.toml b/code/chat-with-file-transfer/chat-with-file-transfer/Cargo.toml index df0f1d0c..a97b5e9a 100644 --- a/code/chat-with-file-transfer/chat-with-file-transfer/Cargo.toml +++ b/code/chat-with-file-transfer/chat-with-file-transfer/Cargo.toml @@ -8,11 +8,11 @@ test = [] [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.3" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/chat-with-file-transfer/download/Cargo.toml b/code/chat-with-file-transfer/download/Cargo.toml index 32567295..a77aaa33 100644 --- a/code/chat-with-file-transfer/download/Cargo.toml +++ b/code/chat-with-file-transfer/download/Cargo.toml @@ -5,11 +5,11 @@ edition = "2021" [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.3" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/chat-with-file-transfer/metadata.json b/code/chat-with-file-transfer/metadata.json index cde3b402..f2905c94 100644 --- a/code/chat-with-file-transfer/metadata.json +++ b/code/chat-with-file-transfer/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [ "file-transfer:template.os" ] diff --git a/code/chat-with-file-transfer/pkg/manifest.json b/code/chat-with-file-transfer/pkg/manifest.json index be2fc345..5dbc640a 100644 --- a/code/chat-with-file-transfer/pkg/manifest.json +++ b/code/chat-with-file-transfer/pkg/manifest.json @@ -5,7 +5,7 @@ "on_exit": "Restart", "request_networking": true, "request_capabilities": [ - "http_server:distro:sys", + "http-server:distro:sys", "vfs:distro:sys" ], "grant_capabilities": [], diff --git a/code/chat-with-file-transfer/send/Cargo.toml b/code/chat-with-file-transfer/send/Cargo.toml index c208c510..c67d02b7 100644 --- a/code/chat-with-file-transfer/send/Cargo.toml +++ b/code/chat-with-file-transfer/send/Cargo.toml @@ -5,10 +5,10 @@ edition = "2021" [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.3" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/chat-with-file-transfer/test/chat-with-file-transfer-test/api/chat-with-file-transfer_test:template.os-v0.wit b/code/chat-with-file-transfer/test/chat-with-file-transfer-test/api/chat-with-file-transfer_test:template.os-v0.wit index 9103397e..bb65a41c 100644 --- a/code/chat-with-file-transfer/test/chat-with-file-transfer-test/api/chat-with-file-transfer_test:template.os-v0.wit +++ b/code/chat-with-file-transfer/test/chat-with-file-transfer-test/api/chat-with-file-transfer_test:template.os-v0.wit @@ -2,5 +2,5 @@ world chat-with-file-transfer-test-template-dot-os-v0 { import chat-with-file-transfer; import file-transfer-worker; import tester; - include process-v0; + include process-v1; } diff --git a/code/chat-with-file-transfer/test/chat-with-file-transfer-test/chat-with-file-transfer-test/Cargo.toml b/code/chat-with-file-transfer/test/chat-with-file-transfer-test/chat-with-file-transfer-test/Cargo.toml index 0de92e14..cc1159d7 100644 --- a/code/chat-with-file-transfer/test/chat-with-file-transfer-test/chat-with-file-transfer-test/Cargo.toml +++ b/code/chat-with-file-transfer/test/chat-with-file-transfer-test/chat-with-file-transfer-test/Cargo.toml @@ -6,13 +6,13 @@ edition = "2021" [dependencies] anyhow = "1.0" bincode = "1.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.3" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } rmp-serde = "1.1" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" thiserror = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/chat-with-file-transfer/test/chat-with-file-transfer-test/metadata.json b/code/chat-with-file-transfer/test/chat-with-file-transfer-test/metadata.json index 68e89ddd..1b7a1a48 100644 --- a/code/chat-with-file-transfer/test/chat-with-file-transfer-test/metadata.json +++ b/code/chat-with-file-transfer/test/chat-with-file-transfer-test/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [ "chat-with-file-transfer:template.os", "file-transfer:template.os", diff --git a/code/file-transfer/api/file-transfer:template.os-v0.wit b/code/file-transfer/api/file-transfer:template.os-v0.wit index 3f5a3ed2..bcacddfc 100644 --- a/code/file-transfer/api/file-transfer:template.os-v0.wit +++ b/code/file-transfer/api/file-transfer:template.os-v0.wit @@ -75,5 +75,5 @@ world file-transfer-worker-api-v0 { world file-transfer-template-dot-os-v0 { import file-transfer; import file-transfer-worker; - include process-v0; + include process-v1; } diff --git a/code/file-transfer/download/Cargo.toml b/code/file-transfer/download/Cargo.toml index 5c6e012c..caaa3ae3 100644 --- a/code/file-transfer/download/Cargo.toml +++ b/code/file-transfer/download/Cargo.toml @@ -6,11 +6,11 @@ publish = false [dependencies] anyhow = "1.0" -kinode_process_lib = "0.9.2" +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/file-transfer/file-transfer-worker-api/Cargo.toml b/code/file-transfer/file-transfer-worker-api/Cargo.toml index aeff93b4..327268f7 100644 --- a/code/file-transfer/file-transfer-worker-api/Cargo.toml +++ b/code/file-transfer/file-transfer-worker-api/Cargo.toml @@ -6,11 +6,11 @@ publish = false [dependencies] anyhow = "1.0" -kinode_process_lib = "0.9.2" +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/file-transfer/file-transfer-worker/Cargo.toml b/code/file-transfer/file-transfer-worker/Cargo.toml index e749d17f..b7c96870 100644 --- a/code/file-transfer/file-transfer-worker/Cargo.toml +++ b/code/file-transfer/file-transfer-worker/Cargo.toml @@ -7,11 +7,11 @@ publish = false [dependencies] anyhow = "1.0" bincode = "1.3.3" -kinode_process_lib = { version = "0.9.2", features = ["logging"] } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c", features = ["logging"] } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/file-transfer/file-transfer/Cargo.toml b/code/file-transfer/file-transfer/Cargo.toml index c04468d3..b2e08aa0 100644 --- a/code/file-transfer/file-transfer/Cargo.toml +++ b/code/file-transfer/file-transfer/Cargo.toml @@ -6,11 +6,11 @@ publish = false [dependencies] anyhow = "1.0" -kinode_process_lib = { version = "0.9.2", features = ["logging"] } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c", features = ["logging"] } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/file-transfer/list-files/Cargo.toml b/code/file-transfer/list-files/Cargo.toml index 5de95b30..53ade1b2 100644 --- a/code/file-transfer/list-files/Cargo.toml +++ b/code/file-transfer/list-files/Cargo.toml @@ -6,11 +6,11 @@ publish = false [dependencies] anyhow = "1.0" -kinode_process_lib = "0.9.2" +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/file-transfer/metadata.json b/code/file-transfer/metadata.json index 359b738c..44e7295f 100644 --- a/code/file-transfer/metadata.json +++ b/code/file-transfer/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [ "file-transfer:template.os" ] diff --git a/code/file-transfer/pkg/manifest.json b/code/file-transfer/pkg/manifest.json index f5385b24..68d17308 100644 --- a/code/file-transfer/pkg/manifest.json +++ b/code/file-transfer/pkg/manifest.json @@ -5,7 +5,7 @@ "on_exit": "Restart", "request_networking": true, "request_capabilities": [ - "http_server:distro:sys", + "http-server:distro:sys", "vfs:distro:sys" ], "grant_capabilities": [], diff --git a/code/http-client/http-client/Cargo.toml b/code/http-client/http-client/Cargo.toml index 1c8ed506..b9dcb194 100644 --- a/code/http-client/http-client/Cargo.toml +++ b/code/http-client/http-client/Cargo.toml @@ -4,11 +4,11 @@ version = "0.1.0" edition = "2021" [dependencies] -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.9.6" } -url = "2" +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +url = "2" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/http-client/http-client/src/lib.rs b/code/http-client/http-client/src/lib.rs index 07318deb..5f7101ac 100644 --- a/code/http-client/http-client/src/lib.rs +++ b/code/http-client/http-client/src/lib.rs @@ -11,7 +11,7 @@ use kinode_process_lib::{call_init, http, println, Address}; wit_bindgen::generate!({ path: "target/wit", - world: "process-v0", + world: "process-v1", }); const URL: &str = "https://raw.githubusercontent.com/kinode-dao/kinode-wit/master/kinode.wit"; diff --git a/code/http-client/metadata.json b/code/http-client/metadata.json index 237ba9c1..9669dcba 100644 --- a/code/http-client/metadata.json +++ b/code/http-client/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [] }, "external_url": "", diff --git a/code/http-client/pkg/manifest.json b/code/http-client/pkg/manifest.json index afe9ad46..6cb86189 100644 --- a/code/http-client/pkg/manifest.json +++ b/code/http-client/pkg/manifest.json @@ -5,10 +5,10 @@ "on_exit": "None", "request_networking": false, "request_capabilities": [ - "http_client:distro:sys" + "http-client:distro:sys" ], "grant_capabilities": [ - "http_client:distro:sys" + "http-client:distro:sys" ], "public": false } diff --git a/code/http-server/http-server/Cargo.toml b/code/http-server/http-server/Cargo.toml index 635e8913..bb6c48ba 100644 --- a/code/http-server/http-server/Cargo.toml +++ b/code/http-server/http-server/Cargo.toml @@ -5,10 +5,10 @@ edition = "2021" [dependencies] anyhow = "1" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.9.6" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/http-server/http-server/src/lib.rs b/code/http-server/http-server/src/lib.rs index a2d5a8e0..9c124935 100644 --- a/code/http-server/http-server/src/lib.rs +++ b/code/http-server/http-server/src/lib.rs @@ -16,7 +16,7 @@ use kinode_process_lib::{await_message, call_init, get_blob, http, println, Addr wit_bindgen::generate!({ path: "target/wit", - world: "process-v0", + world: "process-v1", }); /// Handle a message from the HTTP server. @@ -58,7 +58,7 @@ fn init(_our: Address) { loop { match await_message() { Ok(message) => { - if message.source().process == "http_server:distro:sys" { + if message.source().process == "http-server:distro:sys" { if let Err(e) = handle_http_message(&message) { println!("{e}"); } diff --git a/code/http-server/metadata.json b/code/http-server/metadata.json index 8080a941..a2d92ecb 100644 --- a/code/http-server/metadata.json +++ b/code/http-server/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [] }, "external_url": "", diff --git a/code/http-server/pkg/manifest.json b/code/http-server/pkg/manifest.json index 8516e1cc..5a743d89 100644 --- a/code/http-server/pkg/manifest.json +++ b/code/http-server/pkg/manifest.json @@ -5,10 +5,10 @@ "on_exit": "Restart", "request_networking": false, "request_capabilities": [ - "http_server:distro:sys" + "http-server:distro:sys" ], "grant_capabilities": [ - "http_server:distro:sys" + "http-server:distro:sys" ], "public": false } diff --git a/code/mfa-data-demo/Cargo.lock b/code/mfa-data-demo/Cargo.lock index 9e825481..46fd218a 100644 --- a/code/mfa-data-demo/Cargo.lock +++ b/code/mfa-data-demo/Cargo.lock @@ -250,7 +250,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -338,7 +338,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -354,7 +354,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] @@ -370,7 +370,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", ] @@ -585,7 +585,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -596,7 +596,7 @@ checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -607,7 +607,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -887,7 +887,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1103,7 +1103,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1448,8 +1448,8 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.9.0" -source = "git+https://github.com/kinode-dao/process_lib?tag=v0.9.0#284f202376b3cd3ce0c03aa660a006fc6187f236" +version = "0.10.0" +source = "git+https://github.com/kinode-dao/process_lib?rev=0666d2c#0666d2c1883583370122c118e1a9ddecba1dbbbe" dependencies = [ "alloy", "alloy-primitives", @@ -1465,7 +1465,7 @@ dependencies = [ "serde_json", "thiserror", "url", - "wit-bindgen", + "wit-bindgen 0.24.0", ] [[package]] @@ -1538,7 +1538,7 @@ dependencies = [ "process_macros", "serde", "serde_json", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -1651,7 +1651,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1692,7 +1692,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1792,7 +1792,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1832,6 +1832,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.90", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -1878,9 +1888,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -1891,7 +1901,7 @@ version = "0.1.0" source = "git+https://github.com/kinode-dao/process_macros?rev=626e501#626e501d351e3365480ec6f770d474ed4ae339bf" dependencies = [ "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2276,7 +2286,7 @@ checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2403,7 +2413,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2425,9 +2435,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2443,7 +2453,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2491,7 +2501,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2551,7 +2561,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2654,7 +2664,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2818,7 +2828,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -2852,7 +2862,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2872,6 +2882,16 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasm-encoder" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf48234b389415b226a4daef6562933d38c7b28a8b8f64c5c4130dad1561ab7" +dependencies = [ + "leb128", + "wasmparser 0.220.0", +] + [[package]] name = "wasm-metadata" version = "0.202.0" @@ -2884,8 +2904,24 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.202.0", + "wasmparser 0.202.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3e5f5920c5abfc45573c89b07b38efdaae1515ef86f83dad12d60e50ecd62b" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.220.0", + "wasmparser 0.220.0", ] [[package]] @@ -2899,6 +2935,19 @@ dependencies = [ "semver 1.0.23", ] +[[package]] +name = "wasmparser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e246c2772ce3ebc83f89a2d4487ac5794cad6c309b2071818a88c7db7c36d87b" +dependencies = [ + "ahash", + "bitflags", + "hashbrown", + "indexmap", + "semver 1.0.23", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -3045,8 +3094,18 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" dependencies = [ - "wit-bindgen-rt", - "wit-bindgen-rust-macro", + "wit-bindgen-rt 0.24.0", + "wit-bindgen-rust-macro 0.24.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" +dependencies = [ + "wit-bindgen-rt 0.36.0", + "wit-bindgen-rust-macro 0.36.0", ] [[package]] @@ -3056,7 +3115,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" dependencies = [ "anyhow", - "wit-parser", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser 0.220.0", ] [[package]] @@ -3068,6 +3138,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7947d0131c7c9da3f01dfde0ab8bd4c4cf3c5bd49b6dba0ae640f1fa752572ea" +dependencies = [ + "bitflags", +] + [[package]] name = "wit-bindgen-rust" version = "0.24.0" @@ -3077,9 +3156,25 @@ dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "wasm-metadata 0.202.0", + "wit-bindgen-core 0.24.0", + "wit-component 0.202.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4329de4186ee30e2ef30a0533f9b3c123c019a237a7c82d692807bf1b3ee2697" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.90", + "wasm-metadata 0.220.0", + "wit-bindgen-core 0.36.0", + "wit-component 0.220.0", ] [[package]] @@ -3091,9 +3186,24 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.74", - "wit-bindgen-core", - "wit-bindgen-rust", + "syn 2.0.90", + "wit-bindgen-core 0.24.0", + "wit-bindgen-rust 0.24.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177fb7ee1484d113b4792cc480b1ba57664bbc951b42a4beebe573502135b1fc" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.90", + "wit-bindgen-core 0.36.0", + "wit-bindgen-rust 0.36.0", ] [[package]] @@ -3109,10 +3219,29 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-encoder 0.202.0", + "wasm-metadata 0.202.0", + "wasmparser 0.202.0", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-component" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ccedf54cc65f287da268d64d2bf4f7530d2cfb2296ffbe3ad5f65567e4cf53" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.220.0", + "wasm-metadata 0.220.0", + "wasmparser 0.220.0", + "wit-parser 0.220.0", ] [[package]] @@ -3130,7 +3259,25 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.202.0", +] + +[[package]] +name = "wit-parser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7117ce3adc0b4354b46dc1cf3190b00b333e65243d244c613ffcc58bdec84d" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.23", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.220.0", ] [[package]] @@ -3160,7 +3307,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -3180,5 +3327,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] diff --git a/code/mfa-data-demo/api/mfa-data-demo:template.os-v0.wit b/code/mfa-data-demo/api/mfa-data-demo:template.os-v0.wit index 838e4d9f..a3b8307d 100644 --- a/code/mfa-data-demo/api/mfa-data-demo:template.os-v0.wit +++ b/code/mfa-data-demo/api/mfa-data-demo:template.os-v0.wit @@ -12,5 +12,5 @@ interface mfa-data-demo { world mfa-data-demo-template-dot-os-v0 { import mfa-data-demo; - include process-v0; + include process-v1; } diff --git a/code/mfa-data-demo/metadata.json b/code/mfa-data-demo/metadata.json index 9d316823..9b63fd8a 100644 --- a/code/mfa-data-demo/metadata.json +++ b/code/mfa-data-demo/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [] }, "external_url": "", diff --git a/code/mfa-data-demo/mfa-data-demo/Cargo.toml b/code/mfa-data-demo/mfa-data-demo/Cargo.toml index 8aece6f4..564fda5c 100644 --- a/code/mfa-data-demo/mfa-data-demo/Cargo.toml +++ b/code/mfa-data-demo/mfa-data-demo/Cargo.toml @@ -5,11 +5,11 @@ edition = "2021" [dependencies] anyhow = "1" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.9.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/mfa-data-demo/pkg/manifest.json b/code/mfa-data-demo/pkg/manifest.json index 3d1b9f20..634d433e 100644 --- a/code/mfa-data-demo/pkg/manifest.json +++ b/code/mfa-data-demo/pkg/manifest.json @@ -5,7 +5,7 @@ "on_exit": "None", "request_networking": false, "request_capabilities": [ - "http_server:distro:sys" + "http-server:distro:sys" ], "grant_capabilities": [ "terminal:terminal:sys", diff --git a/code/mfa-data-demo/test/mfa-data-demo-test/Cargo.lock b/code/mfa-data-demo/test/mfa-data-demo-test/Cargo.lock index 68678ee7..1c6bd266 100644 --- a/code/mfa-data-demo/test/mfa-data-demo-test/Cargo.lock +++ b/code/mfa-data-demo/test/mfa-data-demo-test/Cargo.lock @@ -250,7 +250,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -338,7 +338,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -354,7 +354,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] @@ -370,7 +370,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", ] @@ -585,7 +585,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -596,7 +596,7 @@ checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -607,7 +607,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -887,7 +887,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1103,7 +1103,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1448,8 +1448,8 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.9.0" -source = "git+https://github.com/kinode-dao/process_lib?tag=v0.9.0#284f202376b3cd3ce0c03aa660a006fc6187f236" +version = "0.10.0" +source = "git+https://github.com/kinode-dao/process_lib?rev=0666d2c#0666d2c1883583370122c118e1a9ddecba1dbbbe" dependencies = [ "alloy", "alloy-primitives", @@ -1465,7 +1465,7 @@ dependencies = [ "serde_json", "thiserror", "url", - "wit-bindgen", + "wit-bindgen 0.24.0", ] [[package]] @@ -1538,7 +1538,7 @@ dependencies = [ "process_macros", "serde", "serde_json", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -1651,7 +1651,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1692,7 +1692,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1792,7 +1792,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1832,6 +1832,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.90", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -1878,9 +1888,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -1891,7 +1901,7 @@ version = "0.1.0" source = "git+https://github.com/kinode-dao/process_macros?rev=626e501#626e501d351e3365480ec6f770d474ed4ae339bf" dependencies = [ "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2276,7 +2286,7 @@ checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2403,7 +2413,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2425,9 +2435,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2443,7 +2453,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2491,7 +2501,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2551,7 +2561,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2654,7 +2664,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2818,7 +2828,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -2852,7 +2862,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2872,6 +2882,16 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasm-encoder" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf48234b389415b226a4daef6562933d38c7b28a8b8f64c5c4130dad1561ab7" +dependencies = [ + "leb128", + "wasmparser 0.220.0", +] + [[package]] name = "wasm-metadata" version = "0.202.0" @@ -2884,8 +2904,24 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.202.0", + "wasmparser 0.202.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3e5f5920c5abfc45573c89b07b38efdaae1515ef86f83dad12d60e50ecd62b" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.220.0", + "wasmparser 0.220.0", ] [[package]] @@ -2899,6 +2935,19 @@ dependencies = [ "semver 1.0.23", ] +[[package]] +name = "wasmparser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e246c2772ce3ebc83f89a2d4487ac5794cad6c309b2071818a88c7db7c36d87b" +dependencies = [ + "ahash", + "bitflags", + "hashbrown", + "indexmap", + "semver 1.0.23", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -3045,8 +3094,18 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" dependencies = [ - "wit-bindgen-rt", - "wit-bindgen-rust-macro", + "wit-bindgen-rt 0.24.0", + "wit-bindgen-rust-macro 0.24.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" +dependencies = [ + "wit-bindgen-rt 0.36.0", + "wit-bindgen-rust-macro 0.36.0", ] [[package]] @@ -3056,7 +3115,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" dependencies = [ "anyhow", - "wit-parser", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser 0.220.0", ] [[package]] @@ -3068,6 +3138,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7947d0131c7c9da3f01dfde0ab8bd4c4cf3c5bd49b6dba0ae640f1fa752572ea" +dependencies = [ + "bitflags", +] + [[package]] name = "wit-bindgen-rust" version = "0.24.0" @@ -3077,9 +3156,25 @@ dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "wasm-metadata 0.202.0", + "wit-bindgen-core 0.24.0", + "wit-component 0.202.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4329de4186ee30e2ef30a0533f9b3c123c019a237a7c82d692807bf1b3ee2697" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.90", + "wasm-metadata 0.220.0", + "wit-bindgen-core 0.36.0", + "wit-component 0.220.0", ] [[package]] @@ -3091,9 +3186,24 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.74", - "wit-bindgen-core", - "wit-bindgen-rust", + "syn 2.0.90", + "wit-bindgen-core 0.24.0", + "wit-bindgen-rust 0.24.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177fb7ee1484d113b4792cc480b1ba57664bbc951b42a4beebe573502135b1fc" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.90", + "wit-bindgen-core 0.36.0", + "wit-bindgen-rust 0.36.0", ] [[package]] @@ -3109,10 +3219,29 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-encoder 0.202.0", + "wasm-metadata 0.202.0", + "wasmparser 0.202.0", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-component" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ccedf54cc65f287da268d64d2bf4f7530d2cfb2296ffbe3ad5f65567e4cf53" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.220.0", + "wasm-metadata 0.220.0", + "wasmparser 0.220.0", + "wit-parser 0.220.0", ] [[package]] @@ -3130,7 +3259,25 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.202.0", +] + +[[package]] +name = "wit-parser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7117ce3adc0b4354b46dc1cf3190b00b333e65243d244c613ffcc58bdec84d" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.23", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.220.0", ] [[package]] @@ -3160,7 +3307,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -3180,5 +3327,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] diff --git a/code/mfa-data-demo/test/mfa-data-demo-test/api/mfa_data_demo_test:template.os-v0.wit b/code/mfa-data-demo/test/mfa-data-demo-test/api/mfa_data_demo_test:template.os-v0.wit index 6e45e07a..c8216916 100644 --- a/code/mfa-data-demo/test/mfa-data-demo-test/api/mfa_data_demo_test:template.os-v0.wit +++ b/code/mfa-data-demo/test/mfa-data-demo-test/api/mfa_data_demo_test:template.os-v0.wit @@ -1,5 +1,5 @@ world mfa-data-demo-test-template-dot-os-v0 { import mfa-data-demo; import tester; - include process-v0; + include process-v1; } diff --git a/code/mfa-data-demo/test/mfa-data-demo-test/metadata.json b/code/mfa-data-demo/test/mfa-data-demo-test/metadata.json index 59c78fa5..93202893 100644 --- a/code/mfa-data-demo/test/mfa-data-demo-test/metadata.json +++ b/code/mfa-data-demo/test/mfa-data-demo-test/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [ "mfa-data-demo:template.os", "tester:sys" diff --git a/code/mfa-data-demo/test/mfa-data-demo-test/mfa-data-demo-test/Cargo.toml b/code/mfa-data-demo/test/mfa-data-demo-test/mfa-data-demo-test/Cargo.toml index f311026e..b3583c89 100644 --- a/code/mfa-data-demo/test/mfa-data-demo-test/mfa-data-demo-test/Cargo.toml +++ b/code/mfa-data-demo/test/mfa-data-demo-test/mfa-data-demo-test/Cargo.toml @@ -5,11 +5,11 @@ edition = "2021" [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.9.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/mfa-fe-demo/Cargo.lock b/code/mfa-fe-demo/Cargo.lock index f588d1ed..31de3e9e 100644 --- a/code/mfa-fe-demo/Cargo.lock +++ b/code/mfa-fe-demo/Cargo.lock @@ -250,7 +250,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -338,7 +338,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -354,7 +354,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] @@ -370,7 +370,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", ] @@ -585,7 +585,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -596,7 +596,7 @@ checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -607,7 +607,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -887,7 +887,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1103,7 +1103,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1448,8 +1448,8 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.9.6" -source = "git+https://github.com/kinode-dao/process_lib?tag=v0.9.6#11daa549c367175614d9275a89fbdab30361e70c" +version = "0.10.0" +source = "git+https://github.com/kinode-dao/process_lib?rev=0666d2c#0666d2c1883583370122c118e1a9ddecba1dbbbe" dependencies = [ "alloy", "alloy-primitives", @@ -1465,7 +1465,7 @@ dependencies = [ "serde_json", "thiserror", "url", - "wit-bindgen", + "wit-bindgen 0.24.0", ] [[package]] @@ -1538,7 +1538,7 @@ dependencies = [ "process_macros", "serde", "serde_json", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -1651,7 +1651,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1692,7 +1692,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1792,7 +1792,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1832,6 +1832,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.90", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -1878,9 +1888,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -1891,7 +1901,7 @@ version = "0.1.0" source = "git+https://github.com/kinode-dao/process_macros?rev=626e501#626e501d351e3365480ec6f770d474ed4ae339bf" dependencies = [ "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2276,7 +2286,7 @@ checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2403,7 +2413,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2425,9 +2435,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2443,7 +2453,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2491,7 +2501,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2551,7 +2561,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2654,7 +2664,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2818,7 +2828,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -2852,7 +2862,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2872,6 +2882,16 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasm-encoder" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf48234b389415b226a4daef6562933d38c7b28a8b8f64c5c4130dad1561ab7" +dependencies = [ + "leb128", + "wasmparser 0.220.0", +] + [[package]] name = "wasm-metadata" version = "0.202.0" @@ -2884,8 +2904,24 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.202.0", + "wasmparser 0.202.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3e5f5920c5abfc45573c89b07b38efdaae1515ef86f83dad12d60e50ecd62b" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.220.0", + "wasmparser 0.220.0", ] [[package]] @@ -2899,6 +2935,19 @@ dependencies = [ "semver 1.0.23", ] +[[package]] +name = "wasmparser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e246c2772ce3ebc83f89a2d4487ac5794cad6c309b2071818a88c7db7c36d87b" +dependencies = [ + "ahash", + "bitflags", + "hashbrown", + "indexmap", + "semver 1.0.23", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -3045,8 +3094,18 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" dependencies = [ - "wit-bindgen-rt", - "wit-bindgen-rust-macro", + "wit-bindgen-rt 0.24.0", + "wit-bindgen-rust-macro 0.24.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" +dependencies = [ + "wit-bindgen-rt 0.36.0", + "wit-bindgen-rust-macro 0.36.0", ] [[package]] @@ -3056,7 +3115,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" dependencies = [ "anyhow", - "wit-parser", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser 0.220.0", ] [[package]] @@ -3068,6 +3138,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7947d0131c7c9da3f01dfde0ab8bd4c4cf3c5bd49b6dba0ae640f1fa752572ea" +dependencies = [ + "bitflags", +] + [[package]] name = "wit-bindgen-rust" version = "0.24.0" @@ -3077,9 +3156,25 @@ dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "wasm-metadata 0.202.0", + "wit-bindgen-core 0.24.0", + "wit-component 0.202.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4329de4186ee30e2ef30a0533f9b3c123c019a237a7c82d692807bf1b3ee2697" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.90", + "wasm-metadata 0.220.0", + "wit-bindgen-core 0.36.0", + "wit-component 0.220.0", ] [[package]] @@ -3091,9 +3186,24 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.74", - "wit-bindgen-core", - "wit-bindgen-rust", + "syn 2.0.90", + "wit-bindgen-core 0.24.0", + "wit-bindgen-rust 0.24.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177fb7ee1484d113b4792cc480b1ba57664bbc951b42a4beebe573502135b1fc" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.90", + "wit-bindgen-core 0.36.0", + "wit-bindgen-rust 0.36.0", ] [[package]] @@ -3109,10 +3219,29 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-encoder 0.202.0", + "wasm-metadata 0.202.0", + "wasmparser 0.202.0", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-component" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ccedf54cc65f287da268d64d2bf4f7530d2cfb2296ffbe3ad5f65567e4cf53" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.220.0", + "wasm-metadata 0.220.0", + "wasmparser 0.220.0", + "wit-parser 0.220.0", ] [[package]] @@ -3130,7 +3259,25 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.202.0", +] + +[[package]] +name = "wit-parser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7117ce3adc0b4354b46dc1cf3190b00b333e65243d244c613ffcc58bdec84d" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.23", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.220.0", ] [[package]] @@ -3160,7 +3307,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -3180,5 +3327,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] diff --git a/code/mfa-fe-demo/api/mfa-data-demo:template.os-v0.wit b/code/mfa-fe-demo/api/mfa-data-demo:template.os-v0.wit index 838e4d9f..a3b8307d 100644 --- a/code/mfa-fe-demo/api/mfa-data-demo:template.os-v0.wit +++ b/code/mfa-fe-demo/api/mfa-data-demo:template.os-v0.wit @@ -12,5 +12,5 @@ interface mfa-data-demo { world mfa-data-demo-template-dot-os-v0 { import mfa-data-demo; - include process-v0; + include process-v1; } diff --git a/code/mfa-fe-demo/metadata.json b/code/mfa-fe-demo/metadata.json index 762b7bc8..cc5b0ea7 100644 --- a/code/mfa-fe-demo/metadata.json +++ b/code/mfa-fe-demo/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [] }, "external_url": "", diff --git a/code/mfa-fe-demo/mfa-fe-demo/Cargo.toml b/code/mfa-fe-demo/mfa-fe-demo/Cargo.toml index 14e7ac96..682754f6 100644 --- a/code/mfa-fe-demo/mfa-fe-demo/Cargo.toml +++ b/code/mfa-fe-demo/mfa-fe-demo/Cargo.toml @@ -5,11 +5,11 @@ edition = "2021" [dependencies] anyhow = "1" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.9.6" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/mfa-fe-demo/pkg/manifest.json b/code/mfa-fe-demo/pkg/manifest.json index 51b0e706..deddcea4 100644 --- a/code/mfa-fe-demo/pkg/manifest.json +++ b/code/mfa-fe-demo/pkg/manifest.json @@ -6,11 +6,11 @@ "request_networking": false, "request_capabilities": [ "homepage:homepage:sys", - "http_server:distro:sys", + "http-server:distro:sys", "vfs:distro:sys" ], "grant_capabilities": [ - "http_server:distro:sys", + "http-server:distro:sys", "terminal:terminal:sys", "tester:tester:sys", "vfs:distro:sys" diff --git a/code/mfa-fe-demo/test/mfa-fe-demo-test/Cargo.lock b/code/mfa-fe-demo/test/mfa-fe-demo-test/Cargo.lock index 5cde4023..2080670e 100644 --- a/code/mfa-fe-demo/test/mfa-fe-demo-test/Cargo.lock +++ b/code/mfa-fe-demo/test/mfa-fe-demo-test/Cargo.lock @@ -250,7 +250,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -338,7 +338,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -354,7 +354,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] @@ -370,7 +370,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", ] @@ -585,7 +585,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -596,7 +596,7 @@ checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -607,7 +607,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -887,7 +887,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1103,7 +1103,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1448,8 +1448,8 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.9.0" -source = "git+https://github.com/kinode-dao/process_lib?tag=v0.9.0#284f202376b3cd3ce0c03aa660a006fc6187f236" +version = "0.10.0" +source = "git+https://github.com/kinode-dao/process_lib?rev=0666d2c#0666d2c1883583370122c118e1a9ddecba1dbbbe" dependencies = [ "alloy", "alloy-primitives", @@ -1465,7 +1465,7 @@ dependencies = [ "serde_json", "thiserror", "url", - "wit-bindgen", + "wit-bindgen 0.24.0", ] [[package]] @@ -1538,7 +1538,7 @@ dependencies = [ "process_macros", "serde", "serde_json", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -1651,7 +1651,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1692,7 +1692,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1792,7 +1792,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1832,6 +1832,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.90", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -1878,9 +1888,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -1891,7 +1901,7 @@ version = "0.1.0" source = "git+https://github.com/kinode-dao/process_macros?rev=626e501#626e501d351e3365480ec6f770d474ed4ae339bf" dependencies = [ "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2276,7 +2286,7 @@ checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2403,7 +2413,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2425,9 +2435,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2443,7 +2453,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2491,7 +2501,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2551,7 +2561,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2654,7 +2664,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2818,7 +2828,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -2852,7 +2862,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2872,6 +2882,16 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasm-encoder" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf48234b389415b226a4daef6562933d38c7b28a8b8f64c5c4130dad1561ab7" +dependencies = [ + "leb128", + "wasmparser 0.220.0", +] + [[package]] name = "wasm-metadata" version = "0.202.0" @@ -2884,8 +2904,24 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.202.0", + "wasmparser 0.202.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3e5f5920c5abfc45573c89b07b38efdaae1515ef86f83dad12d60e50ecd62b" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.220.0", + "wasmparser 0.220.0", ] [[package]] @@ -2899,6 +2935,19 @@ dependencies = [ "semver 1.0.23", ] +[[package]] +name = "wasmparser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e246c2772ce3ebc83f89a2d4487ac5794cad6c309b2071818a88c7db7c36d87b" +dependencies = [ + "ahash", + "bitflags", + "hashbrown", + "indexmap", + "semver 1.0.23", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -3045,8 +3094,18 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" dependencies = [ - "wit-bindgen-rt", - "wit-bindgen-rust-macro", + "wit-bindgen-rt 0.24.0", + "wit-bindgen-rust-macro 0.24.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" +dependencies = [ + "wit-bindgen-rt 0.36.0", + "wit-bindgen-rust-macro 0.36.0", ] [[package]] @@ -3056,7 +3115,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" dependencies = [ "anyhow", - "wit-parser", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser 0.220.0", ] [[package]] @@ -3068,6 +3138,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7947d0131c7c9da3f01dfde0ab8bd4c4cf3c5bd49b6dba0ae640f1fa752572ea" +dependencies = [ + "bitflags", +] + [[package]] name = "wit-bindgen-rust" version = "0.24.0" @@ -3077,9 +3156,25 @@ dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "wasm-metadata 0.202.0", + "wit-bindgen-core 0.24.0", + "wit-component 0.202.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4329de4186ee30e2ef30a0533f9b3c123c019a237a7c82d692807bf1b3ee2697" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.90", + "wasm-metadata 0.220.0", + "wit-bindgen-core 0.36.0", + "wit-component 0.220.0", ] [[package]] @@ -3091,9 +3186,24 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.74", - "wit-bindgen-core", - "wit-bindgen-rust", + "syn 2.0.90", + "wit-bindgen-core 0.24.0", + "wit-bindgen-rust 0.24.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177fb7ee1484d113b4792cc480b1ba57664bbc951b42a4beebe573502135b1fc" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.90", + "wit-bindgen-core 0.36.0", + "wit-bindgen-rust 0.36.0", ] [[package]] @@ -3109,10 +3219,29 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-encoder 0.202.0", + "wasm-metadata 0.202.0", + "wasmparser 0.202.0", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-component" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ccedf54cc65f287da268d64d2bf4f7530d2cfb2296ffbe3ad5f65567e4cf53" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.220.0", + "wasm-metadata 0.220.0", + "wasmparser 0.220.0", + "wit-parser 0.220.0", ] [[package]] @@ -3130,7 +3259,25 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.202.0", +] + +[[package]] +name = "wit-parser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7117ce3adc0b4354b46dc1cf3190b00b333e65243d244c613ffcc58bdec84d" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.23", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.220.0", ] [[package]] @@ -3160,7 +3307,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -3180,5 +3327,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] diff --git a/code/mfa-fe-demo/test/mfa-fe-demo-test/api/mfa-data-demo-test:template.os-v0.wit b/code/mfa-fe-demo/test/mfa-fe-demo-test/api/mfa-data-demo-test:template.os-v0.wit index 6e45e07a..c8216916 100644 --- a/code/mfa-fe-demo/test/mfa-fe-demo-test/api/mfa-data-demo-test:template.os-v0.wit +++ b/code/mfa-fe-demo/test/mfa-fe-demo-test/api/mfa-data-demo-test:template.os-v0.wit @@ -1,5 +1,5 @@ world mfa-data-demo-test-template-dot-os-v0 { import mfa-data-demo; import tester; - include process-v0; + include process-v1; } diff --git a/code/mfa-fe-demo/test/mfa-fe-demo-test/metadata.json b/code/mfa-fe-demo/test/mfa-fe-demo-test/metadata.json index e1a03b40..e91ac58a 100644 --- a/code/mfa-fe-demo/test/mfa-fe-demo-test/metadata.json +++ b/code/mfa-fe-demo/test/mfa-fe-demo-test/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [ "mfa-fe-demo:template.os", "tester:sys" diff --git a/code/mfa-fe-demo/test/mfa-fe-demo-test/mfa-fe-demo-test/Cargo.toml b/code/mfa-fe-demo/test/mfa-fe-demo-test/mfa-fe-demo-test/Cargo.toml index 8ae77f0e..35eb08aa 100644 --- a/code/mfa-fe-demo/test/mfa-fe-demo-test/mfa-fe-demo-test/Cargo.toml +++ b/code/mfa-fe-demo/test/mfa-fe-demo-test/mfa-fe-demo-test/Cargo.toml @@ -5,11 +5,11 @@ edition = "2021" [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.9.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/mfa-message-demo/Cargo.lock b/code/mfa-message-demo/Cargo.lock index 457b094f..3fadbac1 100644 --- a/code/mfa-message-demo/Cargo.lock +++ b/code/mfa-message-demo/Cargo.lock @@ -250,7 +250,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -338,7 +338,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -354,7 +354,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] @@ -370,7 +370,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", ] @@ -585,7 +585,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -596,7 +596,7 @@ checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -607,7 +607,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -887,7 +887,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1103,7 +1103,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1448,8 +1448,8 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.9.0" -source = "git+https://github.com/kinode-dao/process_lib?tag=v0.9.0#284f202376b3cd3ce0c03aa660a006fc6187f236" +version = "0.10.0" +source = "git+https://github.com/kinode-dao/process_lib?rev=0666d2c#0666d2c1883583370122c118e1a9ddecba1dbbbe" dependencies = [ "alloy", "alloy-primitives", @@ -1465,7 +1465,7 @@ dependencies = [ "serde_json", "thiserror", "url", - "wit-bindgen", + "wit-bindgen 0.24.0", ] [[package]] @@ -1534,7 +1534,7 @@ name = "mfa-message-demo" version = "0.1.0" dependencies = [ "kinode_process_lib", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -1647,7 +1647,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1688,7 +1688,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1788,7 +1788,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1828,6 +1828,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.90", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -1874,9 +1884,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -2263,7 +2273,7 @@ checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2390,7 +2400,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2412,9 +2422,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2430,7 +2440,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2478,7 +2488,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2538,7 +2548,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2641,7 +2651,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2805,7 +2815,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -2839,7 +2849,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2859,6 +2869,16 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasm-encoder" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf48234b389415b226a4daef6562933d38c7b28a8b8f64c5c4130dad1561ab7" +dependencies = [ + "leb128", + "wasmparser 0.220.0", +] + [[package]] name = "wasm-metadata" version = "0.202.0" @@ -2871,8 +2891,24 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.202.0", + "wasmparser 0.202.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3e5f5920c5abfc45573c89b07b38efdaae1515ef86f83dad12d60e50ecd62b" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.220.0", + "wasmparser 0.220.0", ] [[package]] @@ -2886,6 +2922,19 @@ dependencies = [ "semver 1.0.23", ] +[[package]] +name = "wasmparser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e246c2772ce3ebc83f89a2d4487ac5794cad6c309b2071818a88c7db7c36d87b" +dependencies = [ + "ahash", + "bitflags", + "hashbrown", + "indexmap", + "semver 1.0.23", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -3032,8 +3081,18 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" dependencies = [ - "wit-bindgen-rt", - "wit-bindgen-rust-macro", + "wit-bindgen-rt 0.24.0", + "wit-bindgen-rust-macro 0.24.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" +dependencies = [ + "wit-bindgen-rt 0.36.0", + "wit-bindgen-rust-macro 0.36.0", ] [[package]] @@ -3043,7 +3102,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" dependencies = [ "anyhow", - "wit-parser", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser 0.220.0", ] [[package]] @@ -3055,6 +3125,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7947d0131c7c9da3f01dfde0ab8bd4c4cf3c5bd49b6dba0ae640f1fa752572ea" +dependencies = [ + "bitflags", +] + [[package]] name = "wit-bindgen-rust" version = "0.24.0" @@ -3064,9 +3143,25 @@ dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "wasm-metadata 0.202.0", + "wit-bindgen-core 0.24.0", + "wit-component 0.202.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4329de4186ee30e2ef30a0533f9b3c123c019a237a7c82d692807bf1b3ee2697" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.90", + "wasm-metadata 0.220.0", + "wit-bindgen-core 0.36.0", + "wit-component 0.220.0", ] [[package]] @@ -3078,9 +3173,24 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.74", - "wit-bindgen-core", - "wit-bindgen-rust", + "syn 2.0.90", + "wit-bindgen-core 0.24.0", + "wit-bindgen-rust 0.24.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177fb7ee1484d113b4792cc480b1ba57664bbc951b42a4beebe573502135b1fc" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.90", + "wit-bindgen-core 0.36.0", + "wit-bindgen-rust 0.36.0", ] [[package]] @@ -3096,10 +3206,29 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-encoder 0.202.0", + "wasm-metadata 0.202.0", + "wasmparser 0.202.0", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-component" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ccedf54cc65f287da268d64d2bf4f7530d2cfb2296ffbe3ad5f65567e4cf53" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.220.0", + "wasm-metadata 0.220.0", + "wasmparser 0.220.0", + "wit-parser 0.220.0", ] [[package]] @@ -3117,7 +3246,25 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.202.0", +] + +[[package]] +name = "wit-parser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7117ce3adc0b4354b46dc1cf3190b00b333e65243d244c613ffcc58bdec84d" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.23", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.220.0", ] [[package]] @@ -3147,7 +3294,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -3167,5 +3314,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] diff --git a/code/mfa-message-demo/metadata.json b/code/mfa-message-demo/metadata.json index 7a3a2b65..432b57c7 100644 --- a/code/mfa-message-demo/metadata.json +++ b/code/mfa-message-demo/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [] }, "external_url": "", diff --git a/code/mfa-message-demo/mfa-message-demo/Cargo.toml b/code/mfa-message-demo/mfa-message-demo/Cargo.toml index 46be4065..ac679cd7 100644 --- a/code/mfa-message-demo/mfa-message-demo/Cargo.toml +++ b/code/mfa-message-demo/mfa-message-demo/Cargo.toml @@ -4,8 +4,8 @@ version = "0.1.0" edition = "2021" [dependencies] -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.9.0" } -wit-bindgen = "0.24.0" +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/mfa-message-demo/mfa-message-demo/src/lib.rs b/code/mfa-message-demo/mfa-message-demo/src/lib.rs index 8c0ec549..dd8f7700 100644 --- a/code/mfa-message-demo/mfa-message-demo/src/lib.rs +++ b/code/mfa-message-demo/mfa-message-demo/src/lib.rs @@ -2,7 +2,7 @@ use kinode_process_lib::{await_message, call_init, println, Address, Request, Re wit_bindgen::generate!({ path: "target/wit", - world: "process-v0", + world: "process-v1", }); call_init!(init); diff --git a/code/mfa-message-demo/pkg/manifest.json b/code/mfa-message-demo/pkg/manifest.json index c9c08da8..35e809b9 100644 --- a/code/mfa-message-demo/pkg/manifest.json +++ b/code/mfa-message-demo/pkg/manifest.json @@ -5,7 +5,7 @@ "on_exit": "Restart", "request_networking": false, "request_capabilities": [ - "http_server:distro:sys" + "http-server:distro:sys" ], "grant_capabilities": [ "tester:tester:sys" diff --git a/code/mfa-message-demo/test/mfa-message-demo-test/Cargo.lock b/code/mfa-message-demo/test/mfa-message-demo-test/Cargo.lock index 48b8dd58..22be3275 100644 --- a/code/mfa-message-demo/test/mfa-message-demo-test/Cargo.lock +++ b/code/mfa-message-demo/test/mfa-message-demo-test/Cargo.lock @@ -17,6 +17,18 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "allocator-api2" version = "0.2.20" @@ -256,7 +268,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -344,7 +356,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -360,7 +372,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] @@ -376,7 +388,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", ] @@ -591,7 +603,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -602,7 +614,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -613,7 +625,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -893,7 +905,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -913,7 +925,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "unicode-xid", ] @@ -1136,7 +1148,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1225,6 +1237,9 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" @@ -1487,8 +1502,8 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.9.0" -source = "git+https://github.com/kinode-dao/process_lib?tag=v0.9.0#284f202376b3cd3ce0c03aa660a006fc6187f236" +version = "0.10.0" +source = "git+https://github.com/kinode-dao/process_lib?rev=0666d2c#0666d2c1883583370122c118e1a9ddecba1dbbbe" dependencies = [ "alloy", "alloy-primitives 0.7.7", @@ -1504,7 +1519,7 @@ dependencies = [ "serde_json", "thiserror", "url", - "wit-bindgen", + "wit-bindgen 0.24.0", ] [[package]] @@ -1577,7 +1592,7 @@ dependencies = [ "process_macros", "serde", "serde_json", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -1690,7 +1705,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1731,7 +1746,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1831,7 +1846,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1871,6 +1886,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.90", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -1917,9 +1942,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -1930,7 +1955,7 @@ version = "0.1.0" source = "git+https://github.com/kinode-dao/process_macros?rev=626e501#626e501d351e3365480ec6f770d474ed4ae339bf" dependencies = [ "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2314,7 +2339,7 @@ checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2441,7 +2466,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2463,9 +2488,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2481,7 +2506,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2529,7 +2554,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2589,7 +2614,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2691,7 +2716,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2855,7 +2880,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -2889,7 +2914,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2909,6 +2934,16 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasm-encoder" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf48234b389415b226a4daef6562933d38c7b28a8b8f64c5c4130dad1561ab7" +dependencies = [ + "leb128", + "wasmparser 0.220.0", +] + [[package]] name = "wasm-metadata" version = "0.202.0" @@ -2921,8 +2956,24 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.202.0", + "wasmparser 0.202.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3e5f5920c5abfc45573c89b07b38efdaae1515ef86f83dad12d60e50ecd62b" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.220.0", + "wasmparser 0.220.0", ] [[package]] @@ -2936,6 +2987,19 @@ dependencies = [ "semver 1.0.23", ] +[[package]] +name = "wasmparser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e246c2772ce3ebc83f89a2d4487ac5794cad6c309b2071818a88c7db7c36d87b" +dependencies = [ + "ahash", + "bitflags", + "hashbrown 0.14.5", + "indexmap", + "semver 1.0.23", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -3082,8 +3146,18 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" dependencies = [ - "wit-bindgen-rt", - "wit-bindgen-rust-macro", + "wit-bindgen-rt 0.24.0", + "wit-bindgen-rust-macro 0.24.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" +dependencies = [ + "wit-bindgen-rt 0.36.0", + "wit-bindgen-rust-macro 0.36.0", ] [[package]] @@ -3093,7 +3167,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" dependencies = [ "anyhow", - "wit-parser", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser 0.220.0", ] [[package]] @@ -3105,6 +3190,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7947d0131c7c9da3f01dfde0ab8bd4c4cf3c5bd49b6dba0ae640f1fa752572ea" +dependencies = [ + "bitflags", +] + [[package]] name = "wit-bindgen-rust" version = "0.24.0" @@ -3114,9 +3208,25 @@ dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "wasm-metadata 0.202.0", + "wit-bindgen-core 0.24.0", + "wit-component 0.202.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4329de4186ee30e2ef30a0533f9b3c123c019a237a7c82d692807bf1b3ee2697" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.90", + "wasm-metadata 0.220.0", + "wit-bindgen-core 0.36.0", + "wit-component 0.220.0", ] [[package]] @@ -3128,9 +3238,24 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.74", - "wit-bindgen-core", - "wit-bindgen-rust", + "syn 2.0.90", + "wit-bindgen-core 0.24.0", + "wit-bindgen-rust 0.24.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177fb7ee1484d113b4792cc480b1ba57664bbc951b42a4beebe573502135b1fc" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.90", + "wit-bindgen-core 0.36.0", + "wit-bindgen-rust 0.36.0", ] [[package]] @@ -3146,10 +3271,29 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-encoder 0.202.0", + "wasm-metadata 0.202.0", + "wasmparser 0.202.0", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-component" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ccedf54cc65f287da268d64d2bf4f7530d2cfb2296ffbe3ad5f65567e4cf53" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.220.0", + "wasm-metadata 0.220.0", + "wasmparser 0.220.0", + "wit-parser 0.220.0", ] [[package]] @@ -3167,7 +3311,25 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.202.0", +] + +[[package]] +name = "wit-parser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7117ce3adc0b4354b46dc1cf3190b00b333e65243d244c613ffcc58bdec84d" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.23", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.220.0", ] [[package]] @@ -3197,7 +3359,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -3217,5 +3379,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] diff --git a/code/mfa-message-demo/test/mfa-message-demo-test/api/mfa-message-demo-test:template.os-v0.wit b/code/mfa-message-demo/test/mfa-message-demo-test/api/mfa-message-demo-test:template.os-v0.wit index 8ee8723a..960f1c0d 100644 --- a/code/mfa-message-demo/test/mfa-message-demo-test/api/mfa-message-demo-test:template.os-v0.wit +++ b/code/mfa-message-demo/test/mfa-message-demo-test/api/mfa-message-demo-test:template.os-v0.wit @@ -1,4 +1,4 @@ world mfa-message-demo-test-template-dot-os-v0 { import tester; - include process-v0; + include process-v1; } diff --git a/code/mfa-message-demo/test/mfa-message-demo-test/metadata.json b/code/mfa-message-demo/test/mfa-message-demo-test/metadata.json index 03f41f3a..3ccc2906 100644 --- a/code/mfa-message-demo/test/mfa-message-demo-test/metadata.json +++ b/code/mfa-message-demo/test/mfa-message-demo-test/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [ "tester:sys" ] diff --git a/code/mfa-message-demo/test/mfa-message-demo-test/mfa-message-demo-test/Cargo.toml b/code/mfa-message-demo/test/mfa-message-demo-test/mfa-message-demo-test/Cargo.toml index 227be26a..81a9fd91 100644 --- a/code/mfa-message-demo/test/mfa-message-demo-test/mfa-message-demo-test/Cargo.toml +++ b/code/mfa-message-demo/test/mfa-message-demo-test/mfa-message-demo-test/Cargo.toml @@ -5,11 +5,11 @@ edition = "2021" [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.9.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/remote-file-storage/client/api/client:template.os-v0.wit b/code/remote-file-storage/client/api/client:template.os-v0.wit index 847d6a32..cac582e1 100644 --- a/code/remote-file-storage/client/api/client:template.os-v0.wit +++ b/code/remote-file-storage/client/api/client:template.os-v0.wit @@ -1,4 +1,4 @@ world client-template-dot-os-v0 { import server; - include process-v0; + include process-v1; } diff --git a/code/remote-file-storage/client/client/Cargo.toml b/code/remote-file-storage/client/client/Cargo.toml index d2400fa4..70246f92 100644 --- a/code/remote-file-storage/client/client/Cargo.toml +++ b/code/remote-file-storage/client/client/Cargo.toml @@ -6,11 +6,11 @@ edition = "2021" [dependencies] anyhow = "1" clap = { version = "4.5", features = ["derive"] } -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.9.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/remote-file-storage/client/metadata.json b/code/remote-file-storage/client/metadata.json index 9a89e16c..4d4ce751 100644 --- a/code/remote-file-storage/client/metadata.json +++ b/code/remote-file-storage/client/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [ "server:template.os" ] diff --git a/code/remote-file-storage/server/Cargo.lock b/code/remote-file-storage/server/Cargo.lock index 06e8bc4d..a30ac91f 100644 --- a/code/remote-file-storage/server/Cargo.lock +++ b/code/remote-file-storage/server/Cargo.lock @@ -17,6 +17,18 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "allocator-api2" version = "0.2.20" @@ -256,7 +268,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -344,7 +356,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -360,7 +372,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] @@ -376,7 +388,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", ] @@ -591,7 +603,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -602,7 +614,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -613,7 +625,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -893,7 +905,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -913,7 +925,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "unicode-xid", ] @@ -1136,7 +1148,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1225,6 +1237,9 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" @@ -1487,8 +1502,8 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.9.0" -source = "git+https://github.com/kinode-dao/process_lib?tag=v0.9.0#284f202376b3cd3ce0c03aa660a006fc6187f236" +version = "0.10.0" +source = "git+https://github.com/kinode-dao/process_lib?rev=0666d2c#0666d2c1883583370122c118e1a9ddecba1dbbbe" dependencies = [ "alloy", "alloy-primitives 0.7.7", @@ -1504,7 +1519,7 @@ dependencies = [ "serde_json", "thiserror", "url", - "wit-bindgen", + "wit-bindgen 0.24.0", ] [[package]] @@ -1678,7 +1693,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1719,7 +1734,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1819,7 +1834,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1859,6 +1874,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.90", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -1905,9 +1930,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -1918,7 +1943,7 @@ version = "0.1.0" source = "git+https://github.com/kinode-dao/process_macros?rev=626e501#626e501d351e3365480ec6f770d474ed4ae339bf" dependencies = [ "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2302,7 +2327,7 @@ checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2338,7 +2363,7 @@ dependencies = [ "process_macros", "serde", "serde_json", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -2350,7 +2375,7 @@ dependencies = [ "process_macros", "serde", "serde_json", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -2453,7 +2478,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2475,9 +2500,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2493,7 +2518,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2541,7 +2566,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2601,7 +2626,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2703,7 +2728,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2867,7 +2892,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -2901,7 +2926,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2921,6 +2946,16 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasm-encoder" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf48234b389415b226a4daef6562933d38c7b28a8b8f64c5c4130dad1561ab7" +dependencies = [ + "leb128", + "wasmparser 0.220.0", +] + [[package]] name = "wasm-metadata" version = "0.202.0" @@ -2933,8 +2968,24 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.202.0", + "wasmparser 0.202.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3e5f5920c5abfc45573c89b07b38efdaae1515ef86f83dad12d60e50ecd62b" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.220.0", + "wasmparser 0.220.0", ] [[package]] @@ -2948,6 +2999,19 @@ dependencies = [ "semver 1.0.23", ] +[[package]] +name = "wasmparser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e246c2772ce3ebc83f89a2d4487ac5794cad6c309b2071818a88c7db7c36d87b" +dependencies = [ + "ahash", + "bitflags", + "hashbrown 0.14.5", + "indexmap", + "semver 1.0.23", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -3094,8 +3158,18 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" dependencies = [ - "wit-bindgen-rt", - "wit-bindgen-rust-macro", + "wit-bindgen-rt 0.24.0", + "wit-bindgen-rust-macro 0.24.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" +dependencies = [ + "wit-bindgen-rt 0.36.0", + "wit-bindgen-rust-macro 0.36.0", ] [[package]] @@ -3105,7 +3179,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" dependencies = [ "anyhow", - "wit-parser", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser 0.220.0", ] [[package]] @@ -3117,6 +3202,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7947d0131c7c9da3f01dfde0ab8bd4c4cf3c5bd49b6dba0ae640f1fa752572ea" +dependencies = [ + "bitflags", +] + [[package]] name = "wit-bindgen-rust" version = "0.24.0" @@ -3126,9 +3220,25 @@ dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "wasm-metadata 0.202.0", + "wit-bindgen-core 0.24.0", + "wit-component 0.202.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4329de4186ee30e2ef30a0533f9b3c123c019a237a7c82d692807bf1b3ee2697" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.90", + "wasm-metadata 0.220.0", + "wit-bindgen-core 0.36.0", + "wit-component 0.220.0", ] [[package]] @@ -3140,9 +3250,24 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.74", - "wit-bindgen-core", - "wit-bindgen-rust", + "syn 2.0.90", + "wit-bindgen-core 0.24.0", + "wit-bindgen-rust 0.24.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177fb7ee1484d113b4792cc480b1ba57664bbc951b42a4beebe573502135b1fc" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.90", + "wit-bindgen-core 0.36.0", + "wit-bindgen-rust 0.36.0", ] [[package]] @@ -3158,10 +3283,29 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-encoder 0.202.0", + "wasm-metadata 0.202.0", + "wasmparser 0.202.0", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-component" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ccedf54cc65f287da268d64d2bf4f7530d2cfb2296ffbe3ad5f65567e4cf53" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.220.0", + "wasm-metadata 0.220.0", + "wasmparser 0.220.0", + "wit-parser 0.220.0", ] [[package]] @@ -3179,7 +3323,25 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.202.0", +] + +[[package]] +name = "wit-parser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7117ce3adc0b4354b46dc1cf3190b00b333e65243d244c613ffcc58bdec84d" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.23", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.220.0", ] [[package]] @@ -3209,7 +3371,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -3229,5 +3391,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] diff --git a/code/remote-file-storage/server/api/server:template.os-v0.wit b/code/remote-file-storage/server/api/server:template.os-v0.wit index d6c03f02..cbf37b14 100644 --- a/code/remote-file-storage/server/api/server:template.os-v0.wit +++ b/code/remote-file-storage/server/api/server:template.os-v0.wit @@ -29,5 +29,5 @@ world server-template-dot-os-api-v0 { world server-template-dot-os-v0 { import server; - include process-v0; + include process-v1; } diff --git a/code/remote-file-storage/server/metadata.json b/code/remote-file-storage/server/metadata.json index 588f3bf7..d3c2ca24 100644 --- a/code/remote-file-storage/server/metadata.json +++ b/code/remote-file-storage/server/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [] }, "external_url": "", diff --git a/code/remote-file-storage/server/pkg/manifest.json b/code/remote-file-storage/server/pkg/manifest.json index ffd4bccc..2d6d2858 100644 --- a/code/remote-file-storage/server/pkg/manifest.json +++ b/code/remote-file-storage/server/pkg/manifest.json @@ -5,7 +5,7 @@ "on_exit": "None", "request_networking": true, "request_capabilities": [ - "http_server:distro:sys", + "http-server:distro:sys", "vfs:distro:sys" ], "grant_capabilities": [ diff --git a/code/remote-file-storage/server/server-api/Cargo.toml b/code/remote-file-storage/server/server-api/Cargo.toml index 7ea3d5b5..0473747f 100644 --- a/code/remote-file-storage/server/server-api/Cargo.toml +++ b/code/remote-file-storage/server/server-api/Cargo.toml @@ -5,11 +5,11 @@ edition = "2021" [dependencies] anyhow = "1" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.9.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/remote-file-storage/server/server/Cargo.toml b/code/remote-file-storage/server/server/Cargo.toml index 679f1a28..ceec41cb 100644 --- a/code/remote-file-storage/server/server/Cargo.toml +++ b/code/remote-file-storage/server/server/Cargo.toml @@ -8,11 +8,11 @@ test = [] [dependencies] anyhow = "1" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.9.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/remote-file-storage/test/remote-file-storage-test/Cargo.lock b/code/remote-file-storage/test/remote-file-storage-test/Cargo.lock index e7f2469e..92604ec1 100644 --- a/code/remote-file-storage/test/remote-file-storage-test/Cargo.lock +++ b/code/remote-file-storage/test/remote-file-storage-test/Cargo.lock @@ -250,7 +250,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -338,7 +338,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -354,7 +354,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] @@ -370,7 +370,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", ] @@ -585,7 +585,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -596,7 +596,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -607,7 +607,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -887,7 +887,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1103,7 +1103,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1448,8 +1448,8 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.9.0" -source = "git+https://github.com/kinode-dao/process_lib?tag=v0.9.0#284f202376b3cd3ce0c03aa660a006fc6187f236" +version = "0.10.0" +source = "git+https://github.com/kinode-dao/process_lib?rev=0666d2c#0666d2c1883583370122c118e1a9ddecba1dbbbe" dependencies = [ "alloy", "alloy-primitives", @@ -1465,7 +1465,7 @@ dependencies = [ "serde_json", "thiserror", "url", - "wit-bindgen", + "wit-bindgen 0.24.0", ] [[package]] @@ -1639,7 +1639,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1680,7 +1680,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1780,7 +1780,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1820,6 +1820,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.90", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -1866,9 +1876,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -1879,7 +1889,7 @@ version = "0.1.0" source = "git+https://github.com/kinode-dao/process_macros?rev=626e501#626e501d351e3365480ec6f770d474ed4ae339bf" dependencies = [ "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1986,7 +1996,7 @@ dependencies = [ "process_macros", "serde", "serde_json", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -2276,7 +2286,7 @@ checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2403,7 +2413,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2425,9 +2435,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2443,7 +2453,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2488,7 +2498,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2548,7 +2558,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2651,7 +2661,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2815,7 +2825,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -2849,7 +2859,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2869,6 +2879,16 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasm-encoder" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf48234b389415b226a4daef6562933d38c7b28a8b8f64c5c4130dad1561ab7" +dependencies = [ + "leb128", + "wasmparser 0.220.0", +] + [[package]] name = "wasm-metadata" version = "0.202.0" @@ -2881,8 +2901,24 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.202.0", + "wasmparser 0.202.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3e5f5920c5abfc45573c89b07b38efdaae1515ef86f83dad12d60e50ecd62b" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.220.0", + "wasmparser 0.220.0", ] [[package]] @@ -2896,6 +2932,19 @@ dependencies = [ "semver 1.0.23", ] +[[package]] +name = "wasmparser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e246c2772ce3ebc83f89a2d4487ac5794cad6c309b2071818a88c7db7c36d87b" +dependencies = [ + "ahash", + "bitflags", + "hashbrown", + "indexmap", + "semver 1.0.23", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -3088,8 +3137,18 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" dependencies = [ - "wit-bindgen-rt", - "wit-bindgen-rust-macro", + "wit-bindgen-rt 0.24.0", + "wit-bindgen-rust-macro 0.24.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" +dependencies = [ + "wit-bindgen-rt 0.36.0", + "wit-bindgen-rust-macro 0.36.0", ] [[package]] @@ -3099,7 +3158,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" dependencies = [ "anyhow", - "wit-parser", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser 0.220.0", ] [[package]] @@ -3111,6 +3181,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7947d0131c7c9da3f01dfde0ab8bd4c4cf3c5bd49b6dba0ae640f1fa752572ea" +dependencies = [ + "bitflags", +] + [[package]] name = "wit-bindgen-rust" version = "0.24.0" @@ -3120,9 +3199,25 @@ dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "wasm-metadata 0.202.0", + "wit-bindgen-core 0.24.0", + "wit-component 0.202.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4329de4186ee30e2ef30a0533f9b3c123c019a237a7c82d692807bf1b3ee2697" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.90", + "wasm-metadata 0.220.0", + "wit-bindgen-core 0.36.0", + "wit-component 0.220.0", ] [[package]] @@ -3134,9 +3229,24 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.74", - "wit-bindgen-core", - "wit-bindgen-rust", + "syn 2.0.90", + "wit-bindgen-core 0.24.0", + "wit-bindgen-rust 0.24.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177fb7ee1484d113b4792cc480b1ba57664bbc951b42a4beebe573502135b1fc" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.90", + "wit-bindgen-core 0.36.0", + "wit-bindgen-rust 0.36.0", ] [[package]] @@ -3152,10 +3262,29 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-encoder 0.202.0", + "wasm-metadata 0.202.0", + "wasmparser 0.202.0", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-component" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ccedf54cc65f287da268d64d2bf4f7530d2cfb2296ffbe3ad5f65567e4cf53" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.220.0", + "wasm-metadata 0.220.0", + "wasmparser 0.220.0", + "wit-parser 0.220.0", ] [[package]] @@ -3173,7 +3302,25 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.202.0", +] + +[[package]] +name = "wit-parser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7117ce3adc0b4354b46dc1cf3190b00b333e65243d244c613ffcc58bdec84d" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.23", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.220.0", ] [[package]] @@ -3203,7 +3350,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -3223,5 +3370,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] diff --git a/code/remote-file-storage/test/remote-file-storage-test/api/remote-file-storage-test:template.os-v0.wit b/code/remote-file-storage/test/remote-file-storage-test/api/remote-file-storage-test:template.os-v0.wit index 31135a74..72cbbf22 100644 --- a/code/remote-file-storage/test/remote-file-storage-test/api/remote-file-storage-test:template.os-v0.wit +++ b/code/remote-file-storage/test/remote-file-storage-test/api/remote-file-storage-test:template.os-v0.wit @@ -1,5 +1,5 @@ world remote-file-storage-test-template-dot-os-v0 { import server; import tester; - include process-v0; + include process-v1; } diff --git a/code/remote-file-storage/test/remote-file-storage-test/metadata.json b/code/remote-file-storage/test/remote-file-storage-test/metadata.json index ebd2ab37..acb9be64 100644 --- a/code/remote-file-storage/test/remote-file-storage-test/metadata.json +++ b/code/remote-file-storage/test/remote-file-storage-test/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [ "server:template.os", "tester:sys" diff --git a/code/remote-file-storage/test/remote-file-storage-test/remote-file-storage-test/Cargo.toml b/code/remote-file-storage/test/remote-file-storage-test/remote-file-storage-test/Cargo.toml index 7a223794..01162e34 100644 --- a/code/remote-file-storage/test/remote-file-storage-test/remote-file-storage-test/Cargo.toml +++ b/code/remote-file-storage/test/remote-file-storage-test/remote-file-storage-test/Cargo.toml @@ -5,11 +5,11 @@ edition = "2021" [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.9.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/save-state/metadata.json b/code/save-state/metadata.json index c7f95352..27e613ac 100644 --- a/code/save-state/metadata.json +++ b/code/save-state/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [] }, "external_url": "", diff --git a/code/save-state/save-state/Cargo.toml b/code/save-state/save-state/Cargo.toml index 3d343ea3..af55cd07 100644 --- a/code/save-state/save-state/Cargo.toml +++ b/code/save-state/save-state/Cargo.toml @@ -4,8 +4,8 @@ version = "0.1.0" edition = "2021" [dependencies] -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.0" } -wit-bindgen = "0.24.0" +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/save-state/save-state/src/lib.rs b/code/save-state/save-state/src/lib.rs index c3e730ba..aabc445c 100644 --- a/code/save-state/save-state/src/lib.rs +++ b/code/save-state/save-state/src/lib.rs @@ -13,7 +13,7 @@ use kinode_process_lib::{call_init, get_state, println, set_state, Address}; wit_bindgen::generate!({ path: "target/wit", - world: "process-v0", + world: "process-v1", }); call_init!(init); diff --git a/code/spawn/Cargo.lock b/code/spawn/Cargo.lock index 15d30611..997594a3 100644 --- a/code/spawn/Cargo.lock +++ b/code/spawn/Cargo.lock @@ -250,7 +250,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -338,7 +338,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -354,7 +354,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] @@ -370,7 +370,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", ] @@ -585,7 +585,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -596,7 +596,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -607,7 +607,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -774,7 +774,7 @@ dependencies = [ "process_macros", "serde", "serde_json", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -899,7 +899,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1115,7 +1115,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1460,11 +1460,13 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.8.3" -source = "git+https://github.com/kinode-dao/process_lib?tag=v0.8.3#f9fc2460b22e7d63bb74385d3adbaefebc71b333" +version = "0.10.0" +source = "git+https://github.com/kinode-dao/process_lib?rev=0666d2c#0666d2c1883583370122c118e1a9ddecba1dbbbe" dependencies = [ "alloy", "alloy-primitives", + "alloy-sol-macro", + "alloy-sol-types", "anyhow", "bincode", "http", @@ -1475,7 +1477,7 @@ dependencies = [ "serde_json", "thiserror", "url", - "wit-bindgen", + "wit-bindgen 0.24.0", ] [[package]] @@ -1649,7 +1651,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1690,7 +1692,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1720,7 +1722,7 @@ dependencies = [ "process_macros", "serde", "serde_json", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -1802,7 +1804,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1842,6 +1844,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.90", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -1888,9 +1900,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -1901,7 +1913,7 @@ version = "0.1.0" source = "git+https://github.com/kinode-dao/process_macros?rev=626e501#626e501d351e3365480ec6f770d474ed4ae339bf" dependencies = [ "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2286,7 +2298,7 @@ checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2413,7 +2425,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2435,9 +2447,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2453,7 +2465,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2498,7 +2510,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2558,7 +2570,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2661,7 +2673,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2825,7 +2837,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -2859,7 +2871,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2879,6 +2891,16 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasm-encoder" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf48234b389415b226a4daef6562933d38c7b28a8b8f64c5c4130dad1561ab7" +dependencies = [ + "leb128", + "wasmparser 0.220.0", +] + [[package]] name = "wasm-metadata" version = "0.202.0" @@ -2891,8 +2913,24 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.202.0", + "wasmparser 0.202.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3e5f5920c5abfc45573c89b07b38efdaae1515ef86f83dad12d60e50ecd62b" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.220.0", + "wasmparser 0.220.0", ] [[package]] @@ -2906,6 +2944,19 @@ dependencies = [ "semver 1.0.23", ] +[[package]] +name = "wasmparser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e246c2772ce3ebc83f89a2d4487ac5794cad6c309b2071818a88c7db7c36d87b" +dependencies = [ + "ahash", + "bitflags", + "hashbrown", + "indexmap", + "semver 1.0.23", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -3098,8 +3149,18 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" dependencies = [ - "wit-bindgen-rt", - "wit-bindgen-rust-macro", + "wit-bindgen-rt 0.24.0", + "wit-bindgen-rust-macro 0.24.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" +dependencies = [ + "wit-bindgen-rt 0.36.0", + "wit-bindgen-rust-macro 0.36.0", ] [[package]] @@ -3109,7 +3170,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" dependencies = [ "anyhow", - "wit-parser", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser 0.220.0", ] [[package]] @@ -3121,6 +3193,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7947d0131c7c9da3f01dfde0ab8bd4c4cf3c5bd49b6dba0ae640f1fa752572ea" +dependencies = [ + "bitflags", +] + [[package]] name = "wit-bindgen-rust" version = "0.24.0" @@ -3130,9 +3211,25 @@ dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "wasm-metadata 0.202.0", + "wit-bindgen-core 0.24.0", + "wit-component 0.202.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4329de4186ee30e2ef30a0533f9b3c123c019a237a7c82d692807bf1b3ee2697" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.90", + "wasm-metadata 0.220.0", + "wit-bindgen-core 0.36.0", + "wit-component 0.220.0", ] [[package]] @@ -3144,9 +3241,24 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.74", - "wit-bindgen-core", - "wit-bindgen-rust", + "syn 2.0.90", + "wit-bindgen-core 0.24.0", + "wit-bindgen-rust 0.24.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177fb7ee1484d113b4792cc480b1ba57664bbc951b42a4beebe573502135b1fc" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.90", + "wit-bindgen-core 0.36.0", + "wit-bindgen-rust 0.36.0", ] [[package]] @@ -3162,10 +3274,29 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-encoder 0.202.0", + "wasm-metadata 0.202.0", + "wasmparser 0.202.0", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-component" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ccedf54cc65f287da268d64d2bf4f7530d2cfb2296ffbe3ad5f65567e4cf53" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.220.0", + "wasm-metadata 0.220.0", + "wasmparser 0.220.0", + "wit-parser 0.220.0", ] [[package]] @@ -3183,7 +3314,25 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.202.0", +] + +[[package]] +name = "wit-parser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7117ce3adc0b4354b46dc1cf3190b00b333e65243d244c613ffcc58bdec84d" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.23", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.220.0", ] [[package]] @@ -3213,7 +3362,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -3233,5 +3382,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] diff --git a/code/spawn/child/Cargo.toml b/code/spawn/child/Cargo.toml index e1d61993..fe383f8c 100644 --- a/code/spawn/child/Cargo.toml +++ b/code/spawn/child/Cargo.toml @@ -8,11 +8,11 @@ test = [] [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.3" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/spawn/child/src/lib.rs b/code/spawn/child/src/lib.rs index a33ac039..1e33a583 100644 --- a/code/spawn/child/src/lib.rs +++ b/code/spawn/child/src/lib.rs @@ -5,7 +5,7 @@ use kinode_process_lib::{call_init, println, Address}; wit_bindgen::generate!({ path: "target/wit", - world: "process-v0", + world: "process-v1", }); call_init!(init); diff --git a/code/spawn/metadata.json b/code/spawn/metadata.json index 582085d5..cd0bdd1c 100644 --- a/code/spawn/metadata.json +++ b/code/spawn/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [] }, "external_url": "", diff --git a/code/spawn/parent/Cargo.toml b/code/spawn/parent/Cargo.toml index 6512aba0..d5dc7f2e 100644 --- a/code/spawn/parent/Cargo.toml +++ b/code/spawn/parent/Cargo.toml @@ -5,11 +5,11 @@ edition = "2021" [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.3" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/spawn/parent/src/lib.rs b/code/spawn/parent/src/lib.rs index 12601ea6..fbff60f0 100644 --- a/code/spawn/parent/src/lib.rs +++ b/code/spawn/parent/src/lib.rs @@ -4,7 +4,7 @@ use kinode_process_lib::{call_init, println, spawn, Address, Capability, OnExit, // boilerplate to generate types wit_bindgen::generate!({ path: "target/wit", - world: "process-v0", + world: "process-v1", }); // parent app component boilerplate @@ -23,17 +23,20 @@ fn init(our: Address) { // capabilities to pass onto the child vec![ // the parent process already has the capability to message - // http_client here so we are just passing it onto the child + // http-client here so we are just passing it onto the child Capability { issuer: Address::new( &our.node, - "http_client:distro:sys".parse::().unwrap(), + "http-client:distro:sys".parse::().unwrap(), ), params: "\"messaging\"".into(), }, ], // allow tester to message child in case this is being run as a test - vec!["tester:tester:sys".parse::().unwrap()], + vec![( + "tester:tester:sys".parse::().unwrap(), + "\"messaging\"".to_string(), + )], // this process will not be public: only processes with proper caps can message it false, ) { diff --git a/code/spawn/pkg/manifest.json b/code/spawn/pkg/manifest.json index 09fe8372..febe42de 100644 --- a/code/spawn/pkg/manifest.json +++ b/code/spawn/pkg/manifest.json @@ -5,8 +5,8 @@ "on_exit": "None", "request_networking": false, "request_capabilities": [ - "http_client:distro:sys", - "http_server:distro:sys", + "http-client:distro:sys", + "http-server:distro:sys", "vfs:distro:sys" ], "grant_capabilities": [], diff --git a/code/spawn/test/spawn-test/Cargo.lock b/code/spawn/test/spawn-test/Cargo.lock index 059d36d5..6687f9de 100644 --- a/code/spawn/test/spawn-test/Cargo.lock +++ b/code/spawn/test/spawn-test/Cargo.lock @@ -250,7 +250,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -338,7 +338,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -354,7 +354,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] @@ -370,7 +370,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", ] @@ -585,7 +585,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -596,7 +596,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -607,7 +607,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -887,7 +887,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1103,7 +1103,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1448,11 +1448,13 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.8.3" -source = "git+https://github.com/kinode-dao/process_lib?tag=v0.8.3#f9fc2460b22e7d63bb74385d3adbaefebc71b333" +version = "0.10.0" +source = "git+https://github.com/kinode-dao/process_lib?rev=0666d2c#0666d2c1883583370122c118e1a9ddecba1dbbbe" dependencies = [ "alloy", "alloy-primitives", + "alloy-sol-macro", + "alloy-sol-types", "anyhow", "bincode", "http", @@ -1463,7 +1465,7 @@ dependencies = [ "serde_json", "thiserror", "url", - "wit-bindgen", + "wit-bindgen 0.24.0", ] [[package]] @@ -1637,7 +1639,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1678,7 +1680,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1778,7 +1780,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1818,6 +1820,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.90", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -1864,9 +1876,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -1877,7 +1889,7 @@ version = "0.1.0" source = "git+https://github.com/kinode-dao/process_macros?rev=626e501#626e501d351e3365480ec6f770d474ed4ae339bf" dependencies = [ "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2262,7 +2274,7 @@ checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2356,7 +2368,7 @@ dependencies = [ "serde", "serde_json", "thiserror", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -2403,7 +2415,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2425,9 +2437,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2443,7 +2455,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2488,7 +2500,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2548,7 +2560,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2651,7 +2663,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2815,7 +2827,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -2849,7 +2861,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2869,6 +2881,16 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasm-encoder" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf48234b389415b226a4daef6562933d38c7b28a8b8f64c5c4130dad1561ab7" +dependencies = [ + "leb128", + "wasmparser 0.220.0", +] + [[package]] name = "wasm-metadata" version = "0.202.0" @@ -2881,8 +2903,24 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.202.0", + "wasmparser 0.202.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3e5f5920c5abfc45573c89b07b38efdaae1515ef86f83dad12d60e50ecd62b" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.220.0", + "wasmparser 0.220.0", ] [[package]] @@ -2896,6 +2934,19 @@ dependencies = [ "semver 1.0.23", ] +[[package]] +name = "wasmparser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e246c2772ce3ebc83f89a2d4487ac5794cad6c309b2071818a88c7db7c36d87b" +dependencies = [ + "ahash", + "bitflags", + "hashbrown", + "indexmap", + "semver 1.0.23", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -3088,8 +3139,18 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" dependencies = [ - "wit-bindgen-rt", - "wit-bindgen-rust-macro", + "wit-bindgen-rt 0.24.0", + "wit-bindgen-rust-macro 0.24.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" +dependencies = [ + "wit-bindgen-rt 0.36.0", + "wit-bindgen-rust-macro 0.36.0", ] [[package]] @@ -3099,7 +3160,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" dependencies = [ "anyhow", - "wit-parser", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser 0.220.0", ] [[package]] @@ -3111,6 +3183,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7947d0131c7c9da3f01dfde0ab8bd4c4cf3c5bd49b6dba0ae640f1fa752572ea" +dependencies = [ + "bitflags", +] + [[package]] name = "wit-bindgen-rust" version = "0.24.0" @@ -3120,9 +3201,25 @@ dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "wasm-metadata 0.202.0", + "wit-bindgen-core 0.24.0", + "wit-component 0.202.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4329de4186ee30e2ef30a0533f9b3c123c019a237a7c82d692807bf1b3ee2697" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.90", + "wasm-metadata 0.220.0", + "wit-bindgen-core 0.36.0", + "wit-component 0.220.0", ] [[package]] @@ -3134,9 +3231,24 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.74", - "wit-bindgen-core", - "wit-bindgen-rust", + "syn 2.0.90", + "wit-bindgen-core 0.24.0", + "wit-bindgen-rust 0.24.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177fb7ee1484d113b4792cc480b1ba57664bbc951b42a4beebe573502135b1fc" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.90", + "wit-bindgen-core 0.36.0", + "wit-bindgen-rust 0.36.0", ] [[package]] @@ -3152,10 +3264,29 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-encoder 0.202.0", + "wasm-metadata 0.202.0", + "wasmparser 0.202.0", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-component" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ccedf54cc65f287da268d64d2bf4f7530d2cfb2296ffbe3ad5f65567e4cf53" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.220.0", + "wasm-metadata 0.220.0", + "wasmparser 0.220.0", + "wit-parser 0.220.0", ] [[package]] @@ -3173,7 +3304,25 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.202.0", +] + +[[package]] +name = "wit-parser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7117ce3adc0b4354b46dc1cf3190b00b333e65243d244c613ffcc58bdec84d" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.23", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.220.0", ] [[package]] @@ -3203,7 +3352,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -3223,5 +3372,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] diff --git a/code/spawn/test/spawn-test/api/spawn-test:template.os-v0.wit b/code/spawn/test/spawn-test/api/spawn-test:template.os-v0.wit index 4b0a4e06..ec6b807d 100644 --- a/code/spawn/test/spawn-test/api/spawn-test:template.os-v0.wit +++ b/code/spawn/test/spawn-test/api/spawn-test:template.os-v0.wit @@ -1,4 +1,4 @@ world spawn-test-template-dot-os-v0 { import tester; - include process-v0; + include process-v1; } diff --git a/code/spawn/test/spawn-test/metadata.json b/code/spawn/test/spawn-test/metadata.json index 579b79d8..ac400df1 100644 --- a/code/spawn/test/spawn-test/metadata.json +++ b/code/spawn/test/spawn-test/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [ "tester:sys" ] diff --git a/code/spawn/test/spawn-test/spawn-test/Cargo.toml b/code/spawn/test/spawn-test/spawn-test/Cargo.toml index b402e813..67f0df07 100644 --- a/code/spawn/test/spawn-test/spawn-test/Cargo.toml +++ b/code/spawn/test/spawn-test/spawn-test/Cargo.toml @@ -5,13 +5,13 @@ edition = "2021" [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.3" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } rmp-serde = "1.1" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" thiserror = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/ws-client/Cargo.lock b/code/ws-client/Cargo.lock index 2ccd1fa2..e292dcfa 100644 --- a/code/ws-client/Cargo.lock +++ b/code/ws-client/Cargo.lock @@ -250,7 +250,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -338,7 +338,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -354,7 +354,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] @@ -370,7 +370,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", ] @@ -585,7 +585,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -596,7 +596,7 @@ checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -607,7 +607,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -887,7 +887,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1103,7 +1103,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1448,8 +1448,8 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.9.6" -source = "git+https://github.com/kinode-dao/process_lib?tag=v0.9.6#11daa549c367175614d9275a89fbdab30361e70c" +version = "0.10.0" +source = "git+https://github.com/kinode-dao/process_lib?rev=0666d2c#0666d2c1883583370122c118e1a9ddecba1dbbbe" dependencies = [ "alloy", "alloy-primitives", @@ -1465,7 +1465,7 @@ dependencies = [ "serde_json", "thiserror", "url", - "wit-bindgen", + "wit-bindgen 0.24.0", ] [[package]] @@ -1639,7 +1639,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1680,7 +1680,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1780,7 +1780,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1820,6 +1820,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.90", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -1866,9 +1876,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -2255,7 +2265,7 @@ checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2382,7 +2392,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2404,9 +2414,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2422,7 +2432,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2470,7 +2480,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2530,7 +2540,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2633,7 +2643,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2797,7 +2807,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -2831,7 +2841,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2851,6 +2861,16 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasm-encoder" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf48234b389415b226a4daef6562933d38c7b28a8b8f64c5c4130dad1561ab7" +dependencies = [ + "leb128", + "wasmparser 0.220.0", +] + [[package]] name = "wasm-metadata" version = "0.202.0" @@ -2863,8 +2883,24 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.202.0", + "wasmparser 0.202.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3e5f5920c5abfc45573c89b07b38efdaae1515ef86f83dad12d60e50ecd62b" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.220.0", + "wasmparser 0.220.0", ] [[package]] @@ -2878,6 +2914,19 @@ dependencies = [ "semver 1.0.23", ] +[[package]] +name = "wasmparser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e246c2772ce3ebc83f89a2d4487ac5794cad6c309b2071818a88c7db7c36d87b" +dependencies = [ + "ahash", + "bitflags", + "hashbrown", + "indexmap", + "semver 1.0.23", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -3024,8 +3073,18 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" dependencies = [ - "wit-bindgen-rt", - "wit-bindgen-rust-macro", + "wit-bindgen-rt 0.24.0", + "wit-bindgen-rust-macro 0.24.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" +dependencies = [ + "wit-bindgen-rt 0.36.0", + "wit-bindgen-rust-macro 0.36.0", ] [[package]] @@ -3035,7 +3094,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" dependencies = [ "anyhow", - "wit-parser", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser 0.220.0", ] [[package]] @@ -3047,6 +3117,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7947d0131c7c9da3f01dfde0ab8bd4c4cf3c5bd49b6dba0ae640f1fa752572ea" +dependencies = [ + "bitflags", +] + [[package]] name = "wit-bindgen-rust" version = "0.24.0" @@ -3056,9 +3135,25 @@ dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "wasm-metadata 0.202.0", + "wit-bindgen-core 0.24.0", + "wit-component 0.202.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4329de4186ee30e2ef30a0533f9b3c123c019a237a7c82d692807bf1b3ee2697" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.90", + "wasm-metadata 0.220.0", + "wit-bindgen-core 0.36.0", + "wit-component 0.220.0", ] [[package]] @@ -3070,9 +3165,24 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.74", - "wit-bindgen-core", - "wit-bindgen-rust", + "syn 2.0.90", + "wit-bindgen-core 0.24.0", + "wit-bindgen-rust 0.24.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177fb7ee1484d113b4792cc480b1ba57664bbc951b42a4beebe573502135b1fc" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.90", + "wit-bindgen-core 0.36.0", + "wit-bindgen-rust 0.36.0", ] [[package]] @@ -3088,10 +3198,29 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-encoder 0.202.0", + "wasm-metadata 0.202.0", + "wasmparser 0.202.0", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-component" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ccedf54cc65f287da268d64d2bf4f7530d2cfb2296ffbe3ad5f65567e4cf53" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.220.0", + "wasm-metadata 0.220.0", + "wasmparser 0.220.0", + "wit-parser 0.220.0", ] [[package]] @@ -3109,7 +3238,25 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.202.0", +] + +[[package]] +name = "wit-parser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7117ce3adc0b4354b46dc1cf3190b00b333e65243d244c613ffcc58bdec84d" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.23", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.220.0", ] [[package]] @@ -3121,7 +3268,7 @@ dependencies = [ "serde", "serde_json", "url", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -3151,7 +3298,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -3171,5 +3318,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] diff --git a/code/ws-client/metadata.json b/code/ws-client/metadata.json index 3744ad33..e7a644e6 100644 --- a/code/ws-client/metadata.json +++ b/code/ws-client/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [] }, "external_url": "", diff --git a/code/ws-client/pkg/manifest.json b/code/ws-client/pkg/manifest.json index 9ee9ed83..0dfd69f7 100644 --- a/code/ws-client/pkg/manifest.json +++ b/code/ws-client/pkg/manifest.json @@ -5,10 +5,10 @@ "on_exit": "None", "request_networking": false, "request_capabilities": [ - "http_client:distro:sys" + "http-client:distro:sys" ], "grant_capabilities": [ - "http_client:distro:sys" + "http-client:distro:sys" ], "public": false } diff --git a/code/ws-client/test/ws-client-test/Cargo.lock b/code/ws-client/test/ws-client-test/Cargo.lock index 433fde1e..92e7bf79 100644 --- a/code/ws-client/test/ws-client-test/Cargo.lock +++ b/code/ws-client/test/ws-client-test/Cargo.lock @@ -17,6 +17,18 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "allocator-api2" version = "0.2.20" @@ -256,7 +268,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -344,7 +356,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -360,7 +372,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] @@ -376,7 +388,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", ] @@ -591,7 +603,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -602,7 +614,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -613,7 +625,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -893,7 +905,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -913,7 +925,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "unicode-xid", ] @@ -1136,7 +1148,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1225,6 +1237,9 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" @@ -1487,8 +1502,8 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.9.0" -source = "git+https://github.com/kinode-dao/process_lib?tag=v0.9.0#284f202376b3cd3ce0c03aa660a006fc6187f236" +version = "0.10.0" +source = "git+https://github.com/kinode-dao/process_lib?rev=0666d2c#0666d2c1883583370122c118e1a9ddecba1dbbbe" dependencies = [ "alloy", "alloy-primitives 0.7.7", @@ -1504,7 +1519,7 @@ dependencies = [ "serde_json", "thiserror", "url", - "wit-bindgen", + "wit-bindgen 0.24.0", ] [[package]] @@ -1678,7 +1693,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1719,7 +1734,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1819,7 +1834,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1859,6 +1874,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.90", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -1905,9 +1930,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -1918,7 +1943,7 @@ version = "0.1.0" source = "git+https://github.com/kinode-dao/process_macros?rev=626e501#626e501d351e3365480ec6f770d474ed4ae339bf" dependencies = [ "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2302,7 +2327,7 @@ checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2429,7 +2454,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2451,9 +2476,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2469,7 +2494,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2517,7 +2542,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2577,7 +2602,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2679,7 +2704,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2843,7 +2868,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -2877,7 +2902,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2897,6 +2922,16 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasm-encoder" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf48234b389415b226a4daef6562933d38c7b28a8b8f64c5c4130dad1561ab7" +dependencies = [ + "leb128", + "wasmparser 0.220.0", +] + [[package]] name = "wasm-metadata" version = "0.202.0" @@ -2909,8 +2944,24 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.202.0", + "wasmparser 0.202.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3e5f5920c5abfc45573c89b07b38efdaae1515ef86f83dad12d60e50ecd62b" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.220.0", + "wasmparser 0.220.0", ] [[package]] @@ -2924,6 +2975,19 @@ dependencies = [ "semver 1.0.23", ] +[[package]] +name = "wasmparser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e246c2772ce3ebc83f89a2d4487ac5794cad6c309b2071818a88c7db7c36d87b" +dependencies = [ + "ahash", + "bitflags", + "hashbrown 0.14.5", + "indexmap", + "semver 1.0.23", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -3070,8 +3134,18 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" dependencies = [ - "wit-bindgen-rt", - "wit-bindgen-rust-macro", + "wit-bindgen-rt 0.24.0", + "wit-bindgen-rust-macro 0.24.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" +dependencies = [ + "wit-bindgen-rt 0.36.0", + "wit-bindgen-rust-macro 0.36.0", ] [[package]] @@ -3081,7 +3155,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" dependencies = [ "anyhow", - "wit-parser", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser 0.220.0", ] [[package]] @@ -3093,6 +3178,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7947d0131c7c9da3f01dfde0ab8bd4c4cf3c5bd49b6dba0ae640f1fa752572ea" +dependencies = [ + "bitflags", +] + [[package]] name = "wit-bindgen-rust" version = "0.24.0" @@ -3102,9 +3196,25 @@ dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "wasm-metadata 0.202.0", + "wit-bindgen-core 0.24.0", + "wit-component 0.202.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4329de4186ee30e2ef30a0533f9b3c123c019a237a7c82d692807bf1b3ee2697" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.90", + "wasm-metadata 0.220.0", + "wit-bindgen-core 0.36.0", + "wit-component 0.220.0", ] [[package]] @@ -3116,9 +3226,24 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.74", - "wit-bindgen-core", - "wit-bindgen-rust", + "syn 2.0.90", + "wit-bindgen-core 0.24.0", + "wit-bindgen-rust 0.24.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177fb7ee1484d113b4792cc480b1ba57664bbc951b42a4beebe573502135b1fc" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.90", + "wit-bindgen-core 0.36.0", + "wit-bindgen-rust 0.36.0", ] [[package]] @@ -3134,10 +3259,29 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-encoder 0.202.0", + "wasm-metadata 0.202.0", + "wasmparser 0.202.0", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-component" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ccedf54cc65f287da268d64d2bf4f7530d2cfb2296ffbe3ad5f65567e4cf53" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.220.0", + "wasm-metadata 0.220.0", + "wasmparser 0.220.0", + "wit-parser 0.220.0", ] [[package]] @@ -3155,7 +3299,25 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.202.0", +] + +[[package]] +name = "wit-parser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7117ce3adc0b4354b46dc1cf3190b00b333e65243d244c613ffcc58bdec84d" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.23", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.220.0", ] [[package]] @@ -3169,7 +3331,7 @@ dependencies = [ "serde", "serde_json", "thiserror", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -3199,7 +3361,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -3219,5 +3381,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] diff --git a/code/ws-client/test/ws-client-test/api/ws-client-test:template.os-v0.wit b/code/ws-client/test/ws-client-test/api/ws-client-test:template.os-v0.wit index 60fe5d97..22c9f436 100644 --- a/code/ws-client/test/ws-client-test/api/ws-client-test:template.os-v0.wit +++ b/code/ws-client/test/ws-client-test/api/ws-client-test:template.os-v0.wit @@ -1,4 +1,4 @@ world ws-client-test-template-dot-os-v0 { import tester; - include process-v0; + include process-v1; } diff --git a/code/ws-client/test/ws-client-test/metadata.json b/code/ws-client/test/ws-client-test/metadata.json index 4a81c256..dc87bfc2 100644 --- a/code/ws-client/test/ws-client-test/metadata.json +++ b/code/ws-client/test/ws-client-test/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [ "tester:sys" ] diff --git a/code/ws-client/test/ws-client-test/pkg/manifest.json b/code/ws-client/test/ws-client-test/pkg/manifest.json index bbecba85..80ad4fae 100644 --- a/code/ws-client/test/ws-client-test/pkg/manifest.json +++ b/code/ws-client/test/ws-client-test/pkg/manifest.json @@ -5,11 +5,11 @@ "on_exit": "Restart", "request_networking": false, "request_capabilities": [ - "http_client:distro:sys", + "http-client:distro:sys", "ws-client:ws-client:template.os" ], "grant_capabilities": [ - "http_client:distro:sys", + "http-client:distro:sys", "ws-client:ws-client:template.os" ], "public": true diff --git a/code/ws-client/test/ws-client-test/ws-client-test/Cargo.toml b/code/ws-client/test/ws-client-test/ws-client-test/Cargo.toml index d0d08897..fb156629 100644 --- a/code/ws-client/test/ws-client-test/ws-client-test/Cargo.toml +++ b/code/ws-client/test/ws-client-test/ws-client-test/Cargo.toml @@ -5,13 +5,13 @@ edition = "2021" [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.9.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } rmp-serde = "1.1" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" thiserror = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/ws-client/test/ws-client-test/ws-client-test/src/lib.rs b/code/ws-client/test/ws-client-test/ws-client-test/src/lib.rs index f2e1a722..3fe20c37 100644 --- a/code/ws-client/test/ws-client-test/ws-client-test/src/lib.rs +++ b/code/ws-client/test/ws-client-test/ws-client-test/src/lib.rs @@ -40,7 +40,10 @@ fn init(our: Address) { Request::to(&our).body(serde_json::to_vec(&Err::<(), ()>(())).unwrap()) ]), our_capabilities(), - vec!["http_client:distro:sys".parse().unwrap()], + vec![( + "http-client:distro:sys".parse().unwrap(), + "\"messaging\"".to_string(), + )], false, ); if child.is_err() { diff --git a/code/ws-client/ws-client/Cargo.toml b/code/ws-client/ws-client/Cargo.toml index 7e813eb0..74cfeae6 100644 --- a/code/ws-client/ws-client/Cargo.toml +++ b/code/ws-client/ws-client/Cargo.toml @@ -8,11 +8,11 @@ test = [] [dependencies] anyhow = "1" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.9.6" } -url = "2" +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +url = "2" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/ws-client/ws-client/src/lib.rs b/code/ws-client/ws-client/src/lib.rs index 208fdd9e..8ae3393c 100644 --- a/code/ws-client/ws-client/src/lib.rs +++ b/code/ws-client/ws-client/src/lib.rs @@ -20,7 +20,7 @@ use kinode_process_lib::{OnExit, Request}; wit_bindgen::generate!({ path: "target/wit", - world: "process-v0", + world: "process-v1", }); const WS_URL: &str = "ws://localhost:8765"; @@ -67,7 +67,7 @@ fn talk_to_ws() -> Result<()> { match await_message() { Ok(message) => { - if message.source().process == "http_client:distro:sys" { + if message.source().process == "http-client:distro:sys" { if let Err(e) = handle_http_message(&message, &connection) { println!("{e}"); } diff --git a/code/ws-server-with-reply/Cargo.lock b/code/ws-server-with-reply/Cargo.lock index e842f931..412bc7b1 100644 --- a/code/ws-server-with-reply/Cargo.lock +++ b/code/ws-server-with-reply/Cargo.lock @@ -17,6 +17,18 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "allocator-api2" version = "0.2.20" @@ -256,7 +268,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -344,7 +356,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -360,7 +372,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] @@ -376,7 +388,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", ] @@ -591,7 +603,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -602,7 +614,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -613,7 +625,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -893,7 +905,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -913,7 +925,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "unicode-xid", ] @@ -1136,7 +1148,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1225,6 +1237,9 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" @@ -1487,8 +1502,8 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.9.6" -source = "git+https://github.com/kinode-dao/process_lib?tag=v0.9.6#11daa549c367175614d9275a89fbdab30361e70c" +version = "0.10.0" +source = "git+https://github.com/kinode-dao/process_lib?rev=0666d2c#0666d2c1883583370122c118e1a9ddecba1dbbbe" dependencies = [ "alloy", "alloy-primitives 0.7.7", @@ -1504,7 +1519,7 @@ dependencies = [ "serde_json", "thiserror", "url", - "wit-bindgen", + "wit-bindgen 0.24.0", ] [[package]] @@ -1678,7 +1693,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1719,7 +1734,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1819,7 +1834,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1859,6 +1874,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.90", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -1905,9 +1930,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -2293,7 +2318,7 @@ checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2420,7 +2445,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2442,9 +2467,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2460,7 +2485,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2508,7 +2533,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2568,7 +2593,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2670,7 +2695,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2834,7 +2859,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -2868,7 +2893,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2888,6 +2913,16 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasm-encoder" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf48234b389415b226a4daef6562933d38c7b28a8b8f64c5c4130dad1561ab7" +dependencies = [ + "leb128", + "wasmparser 0.220.0", +] + [[package]] name = "wasm-metadata" version = "0.202.0" @@ -2900,8 +2935,24 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.202.0", + "wasmparser 0.202.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3e5f5920c5abfc45573c89b07b38efdaae1515ef86f83dad12d60e50ecd62b" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.220.0", + "wasmparser 0.220.0", ] [[package]] @@ -2915,6 +2966,19 @@ dependencies = [ "semver 1.0.23", ] +[[package]] +name = "wasmparser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e246c2772ce3ebc83f89a2d4487ac5794cad6c309b2071818a88c7db7c36d87b" +dependencies = [ + "ahash", + "bitflags", + "hashbrown 0.14.5", + "indexmap", + "semver 1.0.23", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -3061,8 +3125,18 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" dependencies = [ - "wit-bindgen-rt", - "wit-bindgen-rust-macro", + "wit-bindgen-rt 0.24.0", + "wit-bindgen-rust-macro 0.24.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" +dependencies = [ + "wit-bindgen-rt 0.36.0", + "wit-bindgen-rust-macro 0.36.0", ] [[package]] @@ -3072,7 +3146,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" dependencies = [ "anyhow", - "wit-parser", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser 0.220.0", ] [[package]] @@ -3084,6 +3169,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7947d0131c7c9da3f01dfde0ab8bd4c4cf3c5bd49b6dba0ae640f1fa752572ea" +dependencies = [ + "bitflags", +] + [[package]] name = "wit-bindgen-rust" version = "0.24.0" @@ -3093,9 +3187,25 @@ dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "wasm-metadata 0.202.0", + "wit-bindgen-core 0.24.0", + "wit-component 0.202.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4329de4186ee30e2ef30a0533f9b3c123c019a237a7c82d692807bf1b3ee2697" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.90", + "wasm-metadata 0.220.0", + "wit-bindgen-core 0.36.0", + "wit-component 0.220.0", ] [[package]] @@ -3107,9 +3217,24 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.74", - "wit-bindgen-core", - "wit-bindgen-rust", + "syn 2.0.90", + "wit-bindgen-core 0.24.0", + "wit-bindgen-rust 0.24.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177fb7ee1484d113b4792cc480b1ba57664bbc951b42a4beebe573502135b1fc" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.90", + "wit-bindgen-core 0.36.0", + "wit-bindgen-rust 0.36.0", ] [[package]] @@ -3125,10 +3250,29 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-encoder 0.202.0", + "wasm-metadata 0.202.0", + "wasmparser 0.202.0", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-component" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ccedf54cc65f287da268d64d2bf4f7530d2cfb2296ffbe3ad5f65567e4cf53" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.220.0", + "wasm-metadata 0.220.0", + "wasmparser 0.220.0", + "wit-parser 0.220.0", ] [[package]] @@ -3146,7 +3290,25 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.202.0", +] + +[[package]] +name = "wit-parser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7117ce3adc0b4354b46dc1cf3190b00b333e65243d244c613ffcc58bdec84d" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.23", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.220.0", ] [[package]] @@ -3159,7 +3321,7 @@ dependencies = [ "serde", "serde_json", "url", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -3189,7 +3351,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -3209,5 +3371,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] diff --git a/code/ws-server-with-reply/metadata.json b/code/ws-server-with-reply/metadata.json index 76beb861..3e517a04 100644 --- a/code/ws-server-with-reply/metadata.json +++ b/code/ws-server-with-reply/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [] }, "external_url": "", diff --git a/code/ws-server-with-reply/pkg/manifest.json b/code/ws-server-with-reply/pkg/manifest.json index 666b3bdf..7bc9fd03 100644 --- a/code/ws-server-with-reply/pkg/manifest.json +++ b/code/ws-server-with-reply/pkg/manifest.json @@ -5,10 +5,10 @@ "on_exit": "None", "request_networking": false, "request_capabilities": [ - "http_server:distro:sys" + "http-server:distro:sys" ], "grant_capabilities": [ - "http_server:distro:sys" + "http-server:distro:sys" ], "public": false } diff --git a/code/ws-server-with-reply/ws-server-with-reply/Cargo.toml b/code/ws-server-with-reply/ws-server-with-reply/Cargo.toml index 75ca6c05..da84f20a 100644 --- a/code/ws-server-with-reply/ws-server-with-reply/Cargo.toml +++ b/code/ws-server-with-reply/ws-server-with-reply/Cargo.toml @@ -5,12 +5,12 @@ edition = "2021" [dependencies] anyhow = "1" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.9.6" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } url = "2" rmp-serde = "1.3" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/ws-server-with-reply/ws-server-with-reply/src/lib.rs b/code/ws-server-with-reply/ws-server-with-reply/src/lib.rs index 7c622111..e0ea396c 100644 --- a/code/ws-server-with-reply/ws-server-with-reply/src/lib.rs +++ b/code/ws-server-with-reply/ws-server-with-reply/src/lib.rs @@ -18,7 +18,7 @@ use kinode_process_lib::{ wit_bindgen::generate!({ path: "target/wit", - world: "process-v0", + world: "process-v1", }); const WS_PATH: &str = "/"; @@ -38,7 +38,7 @@ fn handle_http_message( *connection = Some(channel_id.clone()); - Request::to("our@http_server:distro:sys".parse::
()?) + Request::to("our@http-server:distro:sys".parse::
()?) .body(serde_json::to_vec( &http::server::HttpServerAction::WebSocketExtPushOutgoing { channel_id, @@ -91,14 +91,14 @@ fn init(our: Address) { server .bind_ws_path( WS_PATH, - http::server::WsBindingConfig::new(false, false, false, false), + http::server::WsBindingConfig::new(false, false, false), ) .unwrap(); loop { match await_message() { Ok(message) => { - if message.source().process == "http_server:distro:sys" { + if message.source().process == "http-server:distro:sys" { if let Err(e) = handle_http_message(&our, &message, &mut connection) { println!("{e}"); } diff --git a/code/ws-server/Cargo.lock b/code/ws-server/Cargo.lock index 3fdfdc1a..5397b80c 100644 --- a/code/ws-server/Cargo.lock +++ b/code/ws-server/Cargo.lock @@ -17,6 +17,18 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "allocator-api2" version = "0.2.20" @@ -256,7 +268,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -344,7 +356,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -360,7 +372,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", "tiny-keccak", ] @@ -376,7 +388,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "syn-solidity", ] @@ -591,7 +603,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -602,7 +614,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -613,7 +625,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -893,7 +905,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -913,7 +925,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "unicode-xid", ] @@ -1136,7 +1148,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1225,6 +1237,9 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] [[package]] name = "hashbrown" @@ -1487,8 +1502,8 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.9.6" -source = "git+https://github.com/kinode-dao/process_lib?tag=v0.9.6#11daa549c367175614d9275a89fbdab30361e70c" +version = "0.10.0" +source = "git+https://github.com/kinode-dao/process_lib?rev=0666d2c#0666d2c1883583370122c118e1a9ddecba1dbbbe" dependencies = [ "alloy", "alloy-primitives 0.7.7", @@ -1504,7 +1519,7 @@ dependencies = [ "serde_json", "thiserror", "url", - "wit-bindgen", + "wit-bindgen 0.24.0", ] [[package]] @@ -1678,7 +1693,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1719,7 +1734,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1819,7 +1834,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1859,6 +1874,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.90", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -1905,9 +1930,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -2293,7 +2318,7 @@ checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2420,7 +2445,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2442,9 +2467,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2460,7 +2485,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2508,7 +2533,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2568,7 +2593,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2670,7 +2695,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2834,7 +2859,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -2868,7 +2893,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2888,6 +2913,16 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasm-encoder" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf48234b389415b226a4daef6562933d38c7b28a8b8f64c5c4130dad1561ab7" +dependencies = [ + "leb128", + "wasmparser 0.220.0", +] + [[package]] name = "wasm-metadata" version = "0.202.0" @@ -2900,8 +2935,24 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.202.0", + "wasmparser 0.202.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3e5f5920c5abfc45573c89b07b38efdaae1515ef86f83dad12d60e50ecd62b" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.220.0", + "wasmparser 0.220.0", ] [[package]] @@ -2915,6 +2966,19 @@ dependencies = [ "semver 1.0.23", ] +[[package]] +name = "wasmparser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e246c2772ce3ebc83f89a2d4487ac5794cad6c309b2071818a88c7db7c36d87b" +dependencies = [ + "ahash", + "bitflags", + "hashbrown 0.14.5", + "indexmap", + "semver 1.0.23", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -3061,8 +3125,18 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" dependencies = [ - "wit-bindgen-rt", - "wit-bindgen-rust-macro", + "wit-bindgen-rt 0.24.0", + "wit-bindgen-rust-macro 0.24.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" +dependencies = [ + "wit-bindgen-rt 0.36.0", + "wit-bindgen-rust-macro 0.36.0", ] [[package]] @@ -3072,7 +3146,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" dependencies = [ "anyhow", - "wit-parser", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser 0.220.0", ] [[package]] @@ -3084,6 +3169,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7947d0131c7c9da3f01dfde0ab8bd4c4cf3c5bd49b6dba0ae640f1fa752572ea" +dependencies = [ + "bitflags", +] + [[package]] name = "wit-bindgen-rust" version = "0.24.0" @@ -3093,9 +3187,25 @@ dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "wasm-metadata 0.202.0", + "wit-bindgen-core 0.24.0", + "wit-component 0.202.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4329de4186ee30e2ef30a0533f9b3c123c019a237a7c82d692807bf1b3ee2697" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.90", + "wasm-metadata 0.220.0", + "wit-bindgen-core 0.36.0", + "wit-component 0.220.0", ] [[package]] @@ -3107,9 +3217,24 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.74", - "wit-bindgen-core", - "wit-bindgen-rust", + "syn 2.0.90", + "wit-bindgen-core 0.24.0", + "wit-bindgen-rust 0.24.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177fb7ee1484d113b4792cc480b1ba57664bbc951b42a4beebe573502135b1fc" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.90", + "wit-bindgen-core 0.36.0", + "wit-bindgen-rust 0.36.0", ] [[package]] @@ -3125,10 +3250,29 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-encoder 0.202.0", + "wasm-metadata 0.202.0", + "wasmparser 0.202.0", + "wit-parser 0.202.0", +] + +[[package]] +name = "wit-component" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ccedf54cc65f287da268d64d2bf4f7530d2cfb2296ffbe3ad5f65567e4cf53" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.220.0", + "wasm-metadata 0.220.0", + "wasmparser 0.220.0", + "wit-parser 0.220.0", ] [[package]] @@ -3146,7 +3290,25 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.202.0", +] + +[[package]] +name = "wit-parser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7117ce3adc0b4354b46dc1cf3190b00b333e65243d244c613ffcc58bdec84d" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.23", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.220.0", ] [[package]] @@ -3158,7 +3320,7 @@ dependencies = [ "serde", "serde_json", "url", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -3188,7 +3350,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -3208,5 +3370,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] diff --git a/code/ws-server/metadata.json b/code/ws-server/metadata.json index fd4a22c3..3c8fe1a9 100644 --- a/code/ws-server/metadata.json +++ b/code/ws-server/metadata.json @@ -10,7 +10,7 @@ "code_hashes": { "0.1.0": "" }, - "wit_version": 0, + "wit_version": 1, "dependencies": [] }, "external_url": "", diff --git a/code/ws-server/pkg/manifest.json b/code/ws-server/pkg/manifest.json index 35d95aae..47f51129 100644 --- a/code/ws-server/pkg/manifest.json +++ b/code/ws-server/pkg/manifest.json @@ -5,10 +5,10 @@ "on_exit": "None", "request_networking": false, "request_capabilities": [ - "http_server:distro:sys" + "http-server:distro:sys" ], "grant_capabilities": [ - "http_server:distro:sys" + "http-server:distro:sys" ], "public": false } diff --git a/code/ws-server/ws-server/Cargo.toml b/code/ws-server/ws-server/Cargo.toml index 50374997..bdea71e7 100644 --- a/code/ws-server/ws-server/Cargo.toml +++ b/code/ws-server/ws-server/Cargo.toml @@ -5,11 +5,11 @@ edition = "2021" [dependencies] anyhow = "1" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.9.6" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "0666d2c" } url = "2" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.24.0" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/code/ws-server/ws-server/src/lib.rs b/code/ws-server/ws-server/src/lib.rs index ca0477ba..b3f9a2ad 100644 --- a/code/ws-server/ws-server/src/lib.rs +++ b/code/ws-server/ws-server/src/lib.rs @@ -18,7 +18,7 @@ use kinode_process_lib::{ wit_bindgen::generate!({ path: "target/wit", - world: "process-v0", + world: "process-v1", }); const WS_PATH: &str = "/"; @@ -82,14 +82,14 @@ fn init(our: Address) { server .bind_ws_path( WS_PATH, - http::server::WsBindingConfig::new(false, false, false, false), + http::server::WsBindingConfig::new(false, false, false), ) .unwrap(); loop { match await_message() { Ok(message) => { - if message.source().process == "http_server:distro:sys" { + if message.source().process == "http-server:distro:sys" { if let Err(e) = handle_http_message(&our, &message, &mut connection) { println!("{e}"); } diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 8c59e745..f0c3aa0e 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -15,7 +15,7 @@ - [Extensions](./system/process/extensions.md) - [WIT APIs](./system/process/wit_apis.md) - [Networking Protocol](./system/networking_protocol.md) - - [HTTP Server & Client](./system/http_server_and_client.md) + - [HTTP Server & Client](./system/http-server_and_client.md) - [Read+Write to Chain](./system/read_and_write_to_chain.md) - [Files](./system/files.md) - [Databases](./system/databases.md) @@ -81,3 +81,4 @@ - [VFS API](./apis/vfs.md) - [WebSocket API](./apis/websocket.md) - [Hosted Nodes User Guide](./hosted-nodes.md) +- [Audits and Security](./audits-and-security.md) diff --git a/src/apis/eth_provider.md b/src/apis/eth_provider.md index ad7fb034..a0ee3ee7 100644 --- a/src/apis/eth_provider.md +++ b/src/apis/eth_provider.md @@ -11,16 +11,16 @@ Most processes will only need to send `EthAction` requests. /// The Action and Request type that can be made to eth:distro:sys. Any process with messaging /// capabilities can send this action to the eth provider. /// -/// Will be serialized and deserialized using `serde_json::to_vec` and `serde_json::from_slice`. +/// Will be serialized and deserialized using [`serde_json::to_vec`] and [`serde_json::from_slice`]. #[derive(Clone, Debug, Serialize, Deserialize)] pub enum EthAction { /// Subscribe to logs with a custom filter. ID is to be used to unsubscribe. - /// Logs come in as alloy_rpc_types::pubsub::SubscriptionResults + /// Logs come in as JSON value which can be parsed to [`alloy::rpc::types::eth::pubsub::SubscriptionResult`] SubscribeLogs { sub_id: u64, chain_id: u64, kind: SubscriptionKind, - params: Params, + params: serde_json::Value, }, /// Kill a SubscribeLogs subscription of a given ID, to stop getting updates. UnsubscribeLogs(u64), @@ -31,29 +31,68 @@ pub enum EthAction { params: serde_json::Value, }, } + +/// Subscription kind. Pulled directly from alloy (https://github.com/alloy-rs/alloy). +/// Why? Because alloy is not yet 1.0 and the types in this interface must be stable. +/// If alloy SubscriptionKind changes, we can implement a transition function in runtime +/// for this type. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +#[serde(rename_all = "camelCase")] +pub enum SubscriptionKind { + /// New block headers subscription. + /// + /// Fires a notification each time a new header is appended to the chain, including chain + /// reorganizations. In case of a chain reorganization the subscription will emit all new + /// headers for the new chain. Therefore the subscription can emit multiple headers on the same + /// height. + NewHeads, + /// Logs subscription. + /// + /// Returns logs that are included in new imported blocks and match the given filter criteria. + /// In case of a chain reorganization previous sent logs that are on the old chain will be + /// resent with the removed property set to true. Logs from transactions that ended up in the + /// new chain are emitted. Therefore, a subscription can emit logs for the same transaction + /// multiple times. + Logs, + /// New Pending Transactions subscription. + /// + /// Returns the hash or full tx for all transactions that are added to the pending state and + /// are signed with a key that is available in the node. When a transaction that was + /// previously part of the canonical chain isn't part of the new canonical chain after a + /// reorganization its again emitted. + NewPendingTransactions, + /// Node syncing status subscription. + /// + /// Indicates when the node starts or stops synchronizing. The result can either be a boolean + /// indicating that the synchronization has started (true), finished (false) or an object with + /// various progress indicators. + Syncing, +} ``` The `Request` containing this action should always expect a response, since every action variant triggers one and relies on it to be useful. The ETH provider will respond with the following type: ```rust -/// The Response type which a process will get from requesting with an [`EthAction`] will be -/// of this type, serialized and deserialized using `serde_json::to_vec` -/// and `serde_json::from_slice`. +/// The Response body type which a process will get from requesting +/// with an [`EthAction`] will be of this type, serialized and deserialized +/// using [`serde_json::to_vec`] and [`serde_json::from_slice`]. /// /// In the case of an [`EthAction::SubscribeLogs`] request, the response will indicate if /// the subscription was successfully created or not. -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize, Clone)] pub enum EthResponse { Ok, - Response { value: serde_json::Value }, + Response(serde_json::Value), Err(EthError), } -#[derive(Debug, Serialize, Deserialize)] +#[derive(Clone, Debug, Serialize, Deserialize)] pub enum EthError { - /// RPC provider returned an error - RpcError(ErrorPayload), + /// RPC provider returned an error. + /// Can be parsed to [`alloy::rpc::json_rpc::ErrorPayload`] + RpcError(serde_json::Value), /// provider module cannot parse message MalformedRequest, /// No RPC provider for the chain @@ -85,14 +124,15 @@ That request will look like this: pub type EthSubResult = Result; /// Incoming type for successful subscription updates. -#[derive(Debug, Serialize, Deserialize)] +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct EthSub { pub id: u64, - pub result: SubscriptionResult, + /// can be parsed to [`alloy::rpc::types::eth::pubsub::SubscriptionResult`] + pub result: serde_json::Value, } /// If your subscription is closed unexpectedly, you will receive this. -#[derive(Debug, Serialize, Deserialize)] +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct EthSubError { pub id: u64, pub error: String, diff --git a/src/apis/http_authentication.md b/src/apis/http_authentication.md index 95413799..1ec48650 100644 --- a/src/apis/http_authentication.md +++ b/src/apis/http_authentication.md @@ -1,15 +1,15 @@ # HTTP API -Incoming HTTP requests are handled by a Rust `warp` server in the core `http_server:distro:sys` process. +Incoming HTTP requests are handled by a Rust `warp` server in the core `http-server:distro:sys` process. This process handles binding (registering) routes, simple JWT-based authentication, and serving a `/login` page if auth is missing. ## Binding (Registering) HTTP Paths -Any process that you build can bind (register) any number of HTTP paths with `http_server`. +Any process that you build can bind (register) any number of HTTP paths with `http-server`. Every path that you bind will be automatically prepended with the current process' ID. For example, bind the route `/messages` within a process called `main:my-package:myname.os` like so: -```rs +```rust use kinode_process_lib::{http::bind_http_path}; bind_http_path("/messages", true, false).unwrap(); @@ -18,25 +18,30 @@ bind_http_path("/messages", true, false).unwrap(); Now, any HTTP requests to your node at `/main:my-package:myname.os/messages` will be routed to your process. The other two parameters to `bind_http_path` are `authenticated: bool` and `local_only: bool`. -`authenticated` means that `http_server` will check for an auth cookie (set at login/registration), and `local_only` means that `http_server` will only allow requests that come from `localhost`. +`authenticated` means that `http-server` will check for an auth cookie (set at login/registration), and `local_only` means that `http-server` will only allow requests that come from `localhost`. -Incoming HTTP requests will come via `http_server` and have both a `body` and a `lazy_load_blob`. -The `lazy_load_blob` is the HTTP request body, and the `body` is an `IncomingHttpRequest`: +Incoming HTTP requests will come via `http-server` and have both a `body` and a `lazy_load_blob`. +The `lazy_load_blob` is the HTTP request body itself, and the `body` is an `IncomingHttpRequest`: -```rs +```rust pub struct IncomingHttpRequest { - pub source_socket_addr: Option, // will parse to SocketAddr - pub method: String, // will parse to http::Method - pub url: String, // will parse to url::Url - pub bound_path: String, // the path that was originally bound + /// will parse to SocketAddr + pub source_socket_addr: Option, + /// will parse to http::Method + pub method: String, + /// will parse to url::Url + pub url: String, + /// the matching path that was bound + pub bound_path: String, + /// will parse to http::HeaderMap pub headers: HashMap, - pub url_params: HashMap, // comes from route-recognizer + pub url_params: HashMap, pub query_params: HashMap, } ``` Note that `url` is the host and full path of the original HTTP request that came in. -`bound_path` is the matching path that was originally bound in `http_server`. +`bound_path` is the matching path that was originally bound in `http-server`. ## Handling HTTP Requests @@ -47,8 +52,8 @@ Usually, you will want to: Here is an example from the `kit` UI-enabled chat app template that handles both `POST` and `GET` requests to the `/messages` path: -```rs -fn handle_http_server_request( +```rust +fn handle_http-server_request( our: &Address, message_archive: &mut MessageArchive, source: &Address, @@ -119,7 +124,7 @@ fn handle_http_server_request( `send_response` is a `process_lib` function that sends an HTTP response. The function signature is as follows: -```rs +```rust pub fn send_response( status: StatusCode, headers: Option>, diff --git a/src/apis/http_client.md b/src/apis/http_client.md index 3c9eec4c..8aa1582f 100644 --- a/src/apis/http_client.md +++ b/src/apis/http_client.md @@ -6,14 +6,15 @@ See also: [docs.rs for HTTP Client part of `process_lib`](https://docs.rs/kinode The HTTP client is used for sending and receiving HTTP requests and responses. It is also used for connecting to a websocket endpoint as a client. -From a process, you may send an `HttpClientAction` to the `http_client:distro:sys` process. +From a process, you may send an `HttpClientAction` to the `http-client:distro:sys` process. The action must be serialized to JSON and sent in the `body` of a request. `HttpClientAction` is an `enum` type that includes both HTTP and websocket actions. ```rust -/// Request type that can be shared over Wasm boundary to apps. -/// This is the one you send to the `http_client:distro:sys` service. -#[derive(Debug, Serialize, Deserialize)] +/// Request type sent to the `http-client:distro:sys` service. +/// +/// Always serialized/deserialized as JSON. +#[derive(Clone, Debug, Serialize, Deserialize)] pub enum HttpClientAction { Http(OutgoingHttpRequest), WebSocketOpen { @@ -38,26 +39,31 @@ Two or more connections can have the same `channel_id` if they are from differen ```rust /// HTTP Request type that can be shared over Wasm boundary to apps. -/// This is the one you send to the `http_client:distro:sys` service. -#[derive(Debug, Serialize, Deserialize)] +/// This is the one you send to the `http-client:distro:sys` service. +/// +/// BODY is stored in the lazy_load_blob, as bytes +/// +/// TIMEOUT is stored in the message expect_response value +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct OutgoingHttpRequest { - pub method: String, // must parse to http::Method - pub version: Option, // must parse to http::Version - pub url: String, // must parse to url::Url + /// must parse to [`http::Method`] + pub method: String, + /// must parse to [`http::Version`] + pub version: Option, + /// must parse to [`url::Url`] + pub url: String, pub headers: HashMap, - // BODY is stored in the lazy_load_blob, as bytes - // TIMEOUT is stored in the message expect_response } ``` All requests to the HTTP client will receive a response of `Result` serialized to JSON. The process can await or ignore this response, although the desired information will be in the `HttpClientResponse` if the request was successful. -An HTTP request will have an `HttpResponse` defined in the [`http_server`](./http_server.md) module. +An HTTP request will have an `HttpResponse` defined in the [`http-server`](./http_server.md) module. A websocket request (open, push, close) will simply respond with a `HttpClientResponse::WebSocketAck`. ```rust -/// HTTP Client Response type that can be shared over Wasm boundary to apps. -/// This is the one you receive from the `http_client:distro:sys` service. +/// Response type received from the `http-client:distro:sys` service after +/// sending a successful [`HttpClientAction`] to it. #[derive(Debug, Serialize, Deserialize)] pub enum HttpClientResponse { Http(HttpResponse), @@ -68,24 +74,24 @@ pub enum HttpClientResponse { ```rust #[derive(Error, Debug, Serialize, Deserialize)] pub enum HttpClientError { - // HTTP errors, may also be applicable to OutgoingWebSocketClientRequest::Open - #[error("http_client: request is not valid HttpClientRequest: {}.", req)] + // HTTP errors + #[error("http-client: request is not valid HttpClientRequest: {req}.")] BadRequest { req: String }, - #[error("http_client: http method not supported: {}", method)] + #[error("http-client: http method not supported: {method}.")] BadMethod { method: String }, - #[error("http_client: url could not be parsed: {}", url)] + #[error("http-client: url could not be parsed: {url}.")] BadUrl { url: String }, - #[error("http_client: http version not supported: {}", version)] + #[error("http-client: http version not supported: {version}.")] BadVersion { version: String }, - #[error("http_client: failed to execute request {}", error)] + #[error("http-client: failed to execute request {error}.")] RequestFailed { error: String }, // WebSocket errors - #[error("websocket_client: failed to open connection {}", url)] + #[error("http-client: failed to open connection {url}.")] WsOpenFailed { url: String }, - #[error("websocket_client: failed to send message {}", req)] + #[error("http-client: failed to send message {req}.")] WsPushFailed { req: String }, - #[error("websocket_client: failed to close connection {}", channel_id)] + #[error("http-client: failed to close connection {channel_id}.")] WsCloseFailed { channel_id: u32 }, } ``` @@ -95,9 +101,10 @@ These incoming websocket messages are processed and sent as `HttpClientRequest` The message itself is accessible with `get_blob()`. ```rust -/// WebSocket Client Request type that can be shared over Wasm boundary to apps. -/// This comes from an open websocket client connection in the `http_client:distro:sys` service. -#[derive(Debug, Serialize, Deserialize)] +/// Request that comes from an open WebSocket client connection in the +/// `http-client:distro:sys` service. Be prepared to receive these after +/// using a [`HttpClientAction::WebSocketOpen`] to open a connection. +#[derive(Clone, Copy, Debug, Serialize, Deserialize)] pub enum HttpClientRequest { WebSocketPush { channel_id: u32, diff --git a/src/apis/http_server.md b/src/apis/http_server.md index 2d056c9c..4b3402fb 100644 --- a/src/apis/http_server.md +++ b/src/apis/http_server.md @@ -5,16 +5,14 @@ See also: [docs.rs for HTTP Server part of `process_lib`](https://docs.rs/kinode **Note: Most processes will not use this API directly. Instead, they will use the [`process_lib`](../process_stdlib/overview.md) library, which papers over this API and provides a set of types and functions which are much easier to natively use. This is mostly useful for re-implementing this module in a different client or performing niche actions unsupported by the library.** The HTTP server is used by sending and receiving requests and responses. -From a process, you may send an `HttpServerAction` to the `http_server:distro:sys` process. +From a process, you may send an `HttpServerAction` to the `http-server:distro:sys` process. ```rust -/// Request type sent to `http_server:distro:sys` in order to configure it. -/// You can also send [`type@HttpServerAction::WebSocketPush`], which -/// allows you to push messages across an existing open WebSocket connection. +/// Request type sent to `http-server:distro:sys` in order to configure it. /// -/// If a response is expected, all HttpServerActions will return a Response -/// with the shape Result<(), HttpServerActionError> serialized to JSON. -#[derive(Debug, Serialize, Deserialize)] +/// If a response is expected, all actions will return a Response +/// with the shape `Result<(), HttpServerActionError>` serialized to JSON. +#[derive(Clone, Debug, Serialize, Deserialize)] pub enum HttpServerAction { /// Bind expects a lazy_load_blob if and only if `cache` is TRUE. The lazy_load_blob should /// be the static file to serve at this path. @@ -51,23 +49,18 @@ pub enum HttpServerAction { WebSocketBind { path: String, authenticated: bool, - encrypted: bool, extension: bool, }, /// SecureBind is the same as Bind, except that it forces new connections to be made /// from the unique subdomain of the process that bound the path. These are *always* /// authenticated. Since the subdomain is unique, it will require the user to be /// logged in separately to the general domain authentication. - WebSocketSecureBind { - path: String, - encrypted: bool, - extension: bool, - }, + WebSocketSecureBind { path: String, extension: bool }, /// Unbind a previously-bound WebSocket path WebSocketUnbind { path: String }, /// Processes will RECEIVE this kind of request when a client connects to them. /// If a process does not want this websocket open, they should issue a *request* - /// containing a [`type@HttpServerAction::WebSocketClose`] message and this channel ID. + /// containing a [`HttpServerAction::WebSocketClose`] message and this channel ID. WebSocketOpen { path: String, channel_id: u32 }, /// When sent, expects a lazy_load_blob containing the WebSocket message bytes to send. WebSocketPush { @@ -83,8 +76,8 @@ pub enum HttpServerAction { desired_reply_type: MessageType, }, /// For communicating with the ext. - /// Kinode's http_server sends this to the ext after receiving `WebSocketExtPushOutgoing`. - /// Upon receiving reply with this type from ext, http_server parses, setting: + /// Kinode's http-server sends this to the ext after receiving `WebSocketExtPushOutgoing`. + /// Upon receiving reply with this type from ext, http-server parses, setting: /// * id as given, /// * message type as given (Request or Response), /// * body as HttpServerRequest::WebSocketPush, @@ -98,11 +91,12 @@ pub enum HttpServerAction { WebSocketClose(u32), } -/// The possible message types for WebSocketPush. Ping and Pong are limited to 125 bytes -/// by the WebSockets protocol. Text will be sent as a Text frame, with the lazy_load_blob bytes -/// being the UTF-8 encoding of the string. Binary will be sent as a Binary frame containing -/// the unmodified lazy_load_blob bytes. -#[derive(Debug, PartialEq, Serialize, Deserialize)] +/// The possible message types for [`HttpServerRequest::WebSocketPush`]. +/// Ping and Pong are limited to 125 bytes by the WebSockets protocol. +/// Text will be sent as a Text frame, with the lazy_load_blob bytes +/// being the UTF-8 encoding of the string. Binary will be sent as a +/// Binary frame containing the unmodified lazy_load_blob bytes. +#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] pub enum WsMessageType { Text, Binary, @@ -112,25 +106,22 @@ pub enum WsMessageType { } ``` -This struct must be serialized to JSON and placed in the `body` of a requests to `http_server:distro:sys`. +This struct must be serialized to JSON and placed in the `body` of a requests to `http-server:distro:sys`. For actions that take additional data, such as `Bind` and `WebSocketPush`, it is placed in the `lazy_load_blob` of that request. After handling such a request, the HTTP server will always give a response of the shape `Result<(), HttpServerError>`, also serialized to JSON. This can be ignored, or awaited and handled. ```rust -/// Part of the Response type issued by http_server +/// Part of the Response type issued by `http-server:distro:sys` #[derive(Error, Debug, Serialize, Deserialize)] pub enum HttpServerError { - #[error( - "http_server: request could not be parsed to HttpServerAction: {}.", - req - )] + #[error("request could not be parsed to HttpServerAction: {req}.")] BadRequest { req: String }, - #[error("http_server: action expected blob")] + #[error("action expected blob")] NoBlob, - #[error("http_server: path binding error: {:?}", error)] + #[error("path binding error: {error}")] PathBindError { error: String }, - #[error("http_server: WebSocket error: {:?}", error)] + #[error("WebSocket error: {error}")] WebSocketPushError { error: String }, } ``` @@ -149,20 +140,20 @@ Note that the HTTP server module will persist bindings until the node itself is The incoming request, whether the binding is for HTTP or WebSocket, will look like this: ```rust -/// HTTP Request type that can be shared over Wasm boundary to apps. -/// This is the one you receive from the `http_server:distro:sys` service. -#[derive(Debug, Serialize, Deserialize)] +/// HTTP Request received from the `http-server:distro:sys` service as a +/// result of either an HTTP or WebSocket binding, created via [`HttpServerAction`]. +#[derive(Clone, Debug, Serialize, Deserialize)] pub enum HttpServerRequest { Http(IncomingHttpRequest), /// Processes will receive this kind of request when a client connects to them. /// If a process does not want this websocket open, they should issue a *request* - /// containing a [`type@HttpServerAction::WebSocketClose`] message and this channel ID. + /// containing a [`HttpServerAction::WebSocketClose`] message and this channel ID. WebSocketOpen { path: String, channel_id: u32, }, /// Processes can both SEND and RECEIVE this kind of request - /// (send as [`type@HttpServerAction::WebSocketPush`]). + /// (send as [`HttpServerAction::WebSocketPush`]). /// When received, will contain the message bytes as lazy_load_blob. WebSocketPush { channel_id: u32, @@ -173,16 +164,23 @@ pub enum HttpServerRequest { WebSocketClose(u32), } -#[derive(Debug, Serialize, Deserialize)] +/// An HTTP request routed to a process as a result of a binding. +/// +/// BODY is stored in the lazy_load_blob, as bytes. +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct IncomingHttpRequest { - pub source_socket_addr: Option, // will parse to SocketAddr - pub method: String, // will parse to http::Method - pub url: String, // will parse to url::Url - pub bound_path: String, // the path that was originally bound + /// will parse to SocketAddr + pub source_socket_addr: Option, + /// will parse to http::Method + pub method: String, + /// will parse to url::Url + pub url: String, + /// the matching path that was bound + pub bound_path: String, + /// will parse to http::HeaderMap pub headers: HashMap, - pub url_params: HashMap, // comes from route-recognizer + pub url_params: HashMap, pub query_params: HashMap, - // BODY is stored in the lazy_load_blob, as bytes } ``` @@ -192,11 +190,12 @@ The process must issue a response with this structure in the body, serialized to ```rust /// HTTP Response type that can be shared over Wasm boundary to apps. /// Respond to [`IncomingHttpRequest`] with this type. +/// +/// BODY is stored in the lazy_load_blob, as bytes #[derive(Debug, Serialize, Deserialize)] pub struct HttpResponse { pub status: u16, pub headers: HashMap, - // BODY is stored in the lazy_load_blob, as bytes } ``` diff --git a/src/apis/kernel.md b/src/apis/kernel.md index e8796f27..d4855748 100644 --- a/src/apis/kernel.md +++ b/src/apis/kernel.md @@ -108,8 +108,8 @@ To do that, send a `RunProcess` command after a successful `InitializeProcess` c ## `GrantCapabilities` This command directly inserts a list of capabilities into another process' state. While you generally don't want to do this for security reasons, it helps you clean up the "handshake" process by which capabilities must be handed off between two processes before engaging in the business logic. -For instance, if you want a kernel module like `http_server` to be able to message a process back, you do this by directly inserting that `"messaging"` cap into `http_server`'s store. -Only the `app_store`, `terminal`, and `tester` make use of this. +For instance, if you want a kernel module like `http-server` to be able to message a process back, you do this by directly inserting that `"messaging"` cap into `http-server`'s store. +Only the `app-store`, `terminal`, and `tester` make use of this. ## `DropCapabilities` This command removes a list of capabilities from another process' state. diff --git a/src/apis/kinode_wit.md b/src/apis/kinode_wit.md index 49197308..5111648b 100644 --- a/src/apis/kinode_wit.md +++ b/src/apis/kinode_wit.md @@ -44,5 +44,5 @@ See the [capabilities overview](../system/process/capabilities.md) for more deta Lastly, message I/O functions are used to send and receive messages between processes. Message-passing is the primary means by which processes communicate not only with themselves, but also with runtime modules which expose all kinds of I/O abilities. -For example, handling an HTTP request involves sending and receiving messages to and from the `http_server:disto:sys` runtime module. +For example, handling an HTTP request involves sending and receiving messages to and from the `http-server:disto:sys` runtime module. Interacting with this module and others occurs through message I/O. diff --git a/src/apis/kv.md b/src/apis/kv.md index d2f43c9b..186d60ca 100644 --- a/src/apis/kv.md +++ b/src/apis/kv.md @@ -58,40 +58,147 @@ kv.commit_tx(tx_id)?; ### API ```rust -/// Actions are sent to a specific key value database, "db" is the name, -/// "package_id" is the package. Capabilities are checked, you can access another process's -/// database if it has given you the capability. +/// Actions are sent to a specific key value database. `db` is the name, +/// `package_id` is the [`PackageId`] that created the database. Capabilities +/// are checked: you can access another process's database if it has given +/// you the read and/or write capability to do so. +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct KvRequest { pub package_id: PackageId, pub db: String, pub action: KvAction, } +/// IPC Action format representing operations that can be performed on the +/// key-value runtime module. These actions are included in a [`KvRequest`] +/// sent to the `kv:distro:sys` runtime module. +#[derive(Clone, Debug, Serialize, Deserialize)] pub enum KvAction { + /// Opens an existing key-value database or creates a new one if it doesn't exist. + /// Requires `package_id` in [`KvRequest`] to match the package ID of the sender. + /// The sender will own the database and can remove it with [`KvAction::RemoveDb`]. + /// + /// A successful open will respond with [`KvResponse::Ok`]. Any error will be + /// contained in the [`KvResponse::Err`] variant. Open, + /// Permanently deletes the entire key-value database. + /// Requires `package_id` in [`KvRequest`] to match the package ID of the sender. + /// Only the owner can remove the database. + /// + /// A successful remove will respond with [`KvResponse::Ok`]. Any error will be + /// contained in the [`KvResponse::Err`] variant. RemoveDb, + /// Sets a value for the specified key in the database. + /// + /// # Parameters + /// * `key` - The key as a byte vector + /// * `tx_id` - Optional transaction ID if this operation is part of a transaction + /// * blob: [`Vec`] - Byte vector to store for the key + /// + /// Using this action requires the sender to have the write capability + /// for the database. + /// + /// A successful set will respond with [`KvResponse::Ok`]. Any error will be + /// contained in the [`KvResponse::Err`] variant. Set { key: Vec, tx_id: Option }, + /// Deletes a key-value pair from the database. + /// + /// # Parameters + /// * `key` - The key to delete as a byte vector + /// * `tx_id` - Optional transaction ID if this operation is part of a transaction + /// + /// Using this action requires the sender to have the write capability + /// for the database. + /// + /// A successful delete will respond with [`KvResponse::Ok`]. Any error will be + /// contained in the [`KvResponse::Err`] variant. Delete { key: Vec, tx_id: Option }, - Get { key: Vec }, + /// Retrieves the value associated with the specified key. + /// + /// # Parameters + /// * The key to look up as a byte vector + /// + /// Using this action requires the sender to have the read capability + /// for the database. + /// + /// A successful get will respond with [`KvResponse::Get`], where the response blob + /// contains the value associated with the key if any. Any error will be + /// contained in the [`KvResponse::Err`] variant. + Get(Vec), + /// Begins a new transaction for atomic operations. + /// + /// Sending this will prompt a [`KvResponse::BeginTx`] response with the + /// transaction ID. Any error will be contained in the [`KvResponse::Err`] variant. BeginTx, + /// Commits all operations in the specified transaction. + /// + /// # Parameters + /// * `tx_id` - The ID of the transaction to commit + /// + /// A successful commit will respond with [`KvResponse::Ok`]. Any error will be + /// contained in the [`KvResponse::Err`] variant. Commit { tx_id: u64 }, - Backup, } +#[derive(Clone, Debug, Serialize, Deserialize)] pub enum KvResponse { + /// Indicates successful completion of an operation. + /// Sent in response to actions Open, RemoveDb, Set, Delete, and Commit. Ok, + /// Returns the transaction ID for a newly created transaction. + /// + /// # Fields + /// * `tx_id` - The ID of the newly created transaction BeginTx { tx_id: u64 }, - Get { key: Vec }, - Err { error: KvError }, + /// Returns the value for the key that was retrieved from the database. + /// + /// # Parameters + /// * The retrieved key as a byte vector + /// * blob: [`Vec`] - Byte vector associated with the key + Get(Vec), + /// Indicates an error occurred during the operation. + Err(KvError), } +#[derive(Clone, Debug, Serialize, Deserialize, Error)] pub enum KvError { - NoDb, + #[error("db [{0}, {1}] does not exist")] + NoDb(PackageId, String), + #[error("key not found")] KeyNotFound, - NoTx, - NoCap { error: String }, - RocksDBError { action: String, error: String }, - InputError { error: String }, - IOError { error: String }, + #[error("no transaction {0} found")] + NoTx(u64), + #[error("no write capability for requested DB")] + NoWriteCap, + #[error("no read capability for requested DB")] + NoReadCap, + #[error("request to open or remove DB with mismatching package ID")] + MismatchingPackageId, + #[error("failed to generate capability for new DB")] + AddCapFailed, + #[error("kv got a malformed request that either failed to deserialize or was missing a required blob")] + MalformedRequest, + #[error("RocksDB internal error: {0}")] + RocksDBError(String), + #[error("IO error: {0}")] + IOError(String), +} + +/// The JSON parameters contained in all capabilities issued by `kv:distro:sys`. +/// +/// # Fields +/// * `kind` - The kind of capability, either [`KvCapabilityKind::Read`] or [`KvCapabilityKind::Write`] +/// * `db_key` - The database key, a tuple of the [`PackageId`] that created the database and the database name +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct KvCapabilityParams { + pub kind: KvCapabilityKind, + pub db_key: (PackageId, String), +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +#[serde(rename_all = "lowercase")] +pub enum KvCapabilityKind { + Read, + Write, } ``` diff --git a/src/apis/net.md b/src/apis/net.md index a6fdfb09..df9cc941 100644 --- a/src/apis/net.md +++ b/src/apis/net.md @@ -23,15 +23,17 @@ Different implementations of the networking protocol may reject actions dependin This is, for example, where a router would choose whether or not to perform routing for a specific node<>node connection. ```rust +/// Must be parsed from message pack vector. +/// all Get actions must be sent from local process. used for debugging #[derive(Clone, Debug, Serialize, Deserialize)] pub enum NetAction { /// Received from a router of ours when they have a new pending passthrough for us. /// We should respond (if we desire) by using them to initialize a routed connection /// with the NodeId given. ConnectionRequest(NodeId), - /// can only receive from trusted source, for now just ourselves locally, - /// in the future could get from remote provider + /// can only receive from trusted source: requires net root cap KnsUpdate(KnsUpdate), + /// can only receive from trusted source: requires net root cap KnsBatchUpdate(Vec), /// get a list of peers we are connected to GetPeers, @@ -47,12 +49,10 @@ pub enum NetAction { /// the given source. if the signer is not in our representation of /// the PKI, will not verify. /// **the `from` [`Address`] will always be prepended to the payload** - Verify { - from: Address, - signature: Vec, - } + Verify { from: Address, signature: Vec }, } +#[derive(Clone, Debug, Serialize, Deserialize, Hash, Eq, PartialEq)] pub struct KnsUpdate { pub name: String, pub public_key: String, @@ -67,7 +67,7 @@ This type must be parsed from a request body using MessagePack. This is responded to with either an `Accepted` or `Rejected` variant of `NetResponses`. `KnsUpdate` and `KnsBatchUpdate` both are used as entry point by which the `net` module becomes aware of the Kinode PKI, or KNS. -In the current distro these are only accepted from the local node, and specifically the `kns_indexer` distro package. +In the current distro these are only accepted from the local node, and specifically the `kns-indexer` distro package. `GetPeers` is used to request a list of peers that the `net` module is connected to. It can only be received from the local node. @@ -85,6 +85,7 @@ In the current distro these are only accepted from the local node, and specifica Finally, let's look at the type parsed from a `Response`. ```rust +/// Must be parsed from message pack vector #[derive(Clone, Debug, Serialize, Deserialize)] pub enum NetResponse { /// response to [`NetAction::ConnectionRequest`] diff --git a/src/apis/sqlite.md b/src/apis/sqlite.md index 03f2ec10..f4c4a9a0 100644 --- a/src/apis/sqlite.md +++ b/src/apis/sqlite.md @@ -55,40 +55,115 @@ sqlite.commit_tx(tx_id)?; ### API ```rust -/// Actions are sent to a specific sqlite database, "db" is the name, -/// "package_id" is the package. Capabilities are checked, you can access another process's -/// database if it has given you the capability. +/// Actions are sent to a specific SQLite database. `db` is the name, +/// `package_id` is the [`PackageId`] that created the database. Capabilities +/// are checked: you can access another process's database if it has given +/// you the read and/or write capability to do so. +#[derive(Clone, Debug, Serialize, Deserialize)] pub struct SqliteRequest { pub package_id: PackageId, pub db: String, pub action: SqliteAction, } -#[derive(Debug, Serialize, Deserialize)] +/// IPC Action format representing operations that can be performed on the +/// SQLite runtime module. These actions are included in a [`SqliteRequest`] +/// sent to the `sqlite:distro:sys` runtime module. +#[derive(Clone, Debug, Serialize, Deserialize)] pub enum SqliteAction { + /// Opens an existing key-value database or creates a new one if it doesn't exist. + /// Requires `package_id` in [`SqliteRequest`] to match the package ID of the sender. + /// The sender will own the database and can remove it with [`SqliteAction::RemoveDb`]. + /// + /// A successful open will respond with [`SqliteResponse::Ok`]. Any error will be + /// contained in the [`SqliteResponse::Err`] variant. Open, + /// Permanently deletes the entire key-value database. + /// Requires `package_id` in [`SqliteRequest`] to match the package ID of the sender. + /// Only the owner can remove the database. + /// + /// A successful remove will respond with [`SqliteResponse::Ok`]. Any error will be + /// contained in the [`SqliteResponse::Err`] variant. RemoveDb, + /// Executes a write statement (INSERT/UPDATE/DELETE) + /// + /// * `statement` - SQL statement to execute + /// * `tx_id` - Optional transaction ID + /// * blob: Vec - Parameters for the SQL statement, where SqlValue can be: + /// - null + /// - boolean + /// - i64 + /// - f64 + /// - String + /// - Vec (binary data) + /// + /// Using this action requires the sender to have the write capability + /// for the database. + /// + /// A successful write will respond with [`SqliteResponse::Ok`]. Any error will be + /// contained in the [`SqliteResponse::Err`] variant. Write { statement: String, tx_id: Option, }, - Read { - query: String, - }, + /// Executes a read query (SELECT) + /// + /// * blob: Vec - Parameters for the SQL query, where SqlValue can be: + /// - null + /// - boolean + /// - i64 + /// - f64 + /// - String + /// - Vec (binary data) + /// + /// Using this action requires the sender to have the read capability + /// for the database. + /// + /// A successful query will respond with [`SqliteResponse::Query`], where the + /// response blob contains the results of the query. Any error will be contained + /// in the [`SqliteResponse::Err`] variant. + Query(String), + /// Begins a new transaction for atomic operations. + /// + /// Sending this will prompt a [`SqliteResponse::BeginTx`] response with the + /// transaction ID. Any error will be contained in the [`SqliteResponse::Err`] variant. BeginTx, - Commit { - tx_id: u64, - }, - Backup, + /// Commits all operations in the specified transaction. + /// + /// # Parameters + /// * `tx_id` - The ID of the transaction to commit + /// + /// A successful commit will respond with [`SqliteResponse::Ok`]. Any error will be + /// contained in the [`SqliteResponse::Err`] variant. + Commit { tx_id: u64 }, } +#[derive(Clone, Debug, Serialize, Deserialize)] pub enum SqliteResponse { + /// Indicates successful completion of an operation. + /// Sent in response to actions Open, RemoveDb, Write, Query, BeginTx, and Commit. Ok, + /// Returns the results of a query. + /// + /// * blob: Vec> - Array of rows, where each row contains SqlValue types: + /// - null + /// - boolean + /// - i64 + /// - f64 + /// - String + /// - Vec (binary data) Read, + /// Returns the transaction ID for a newly created transaction. + /// + /// # Fields + /// * `tx_id` - The ID of the newly created transaction BeginTx { tx_id: u64 }, - Err { error: SqliteError }, + /// Indicates an error occurred during the operation. + Err(SqliteError), } +/// Used in blobs to represent array row values in SQLite. +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] pub enum SqlValue { Integer(i64), Real(f64), @@ -98,17 +173,49 @@ pub enum SqlValue { Null, } +#[derive(Clone, Debug, Serialize, Deserialize, Error)] pub enum SqliteError { - NoDb, - NoTx, - NoCap { error: String }, - UnexpectedResponse, + #[error("db [{0}, {1}] does not exist")] + NoDb(PackageId, String), + #[error("no transaction {0} found")] + NoTx(u64), + #[error("no write capability for requested DB")] + NoWriteCap, + #[error("no read capability for requested DB")] + NoReadCap, + #[error("request to open or remove DB with mismatching package ID")] + MismatchingPackageId, + #[error("failed to generate capability for new DB")] + AddCapFailed, + #[error("write statement started with non-existent write keyword")] NotAWriteKeyword, + #[error("read query started with non-existent read keyword")] NotAReadKeyword, + #[error("parameters blob in read/write was misshapen or contained invalid JSON objects")] InvalidParameters, - IOError { error: String }, - RusqliteError { error: String }, - InputError { error: String }, + #[error("sqlite got a malformed request that failed to deserialize")] + MalformedRequest, + #[error("rusqlite error: {0}")] + RusqliteError(String), + #[error("IO error: {0}")] + IOError(String), +} + +/// The JSON parameters contained in all capabilities issued by `sqlite:distro:sys`. +/// +/// # Fields +/// * `kind` - The kind of capability, either [`SqliteCapabilityKind::Read`] or [`SqliteCapabilityKind::Write`] +/// * `db_key` - The database key, a tuple of the [`PackageId`] that created the database and the database name +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct SqliteCapabilityParams { + pub kind: SqliteCapabilityKind, + pub db_key: (PackageId, String), } +#[derive(Clone, Debug, Serialize, Deserialize)] +#[serde(rename_all = "lowercase")] +pub enum SqliteCapabilityKind { + Read, + Write, +} ``` diff --git a/src/apis/terminal.md b/src/apis/terminal.md index 11c2d0c0..efb01986 100644 --- a/src/apis/terminal.md +++ b/src/apis/terminal.md @@ -16,7 +16,7 @@ For this reason, users are unlikely to grant direct terminal access to most apps If one does have the capability to send `Request`s to the terminal, they can execute commands like so: ``` -script_name:package_name:publisher_name +script-name:package-name:publisher-name ``` For example, the `hi` script, which pings another node's terminal with a message, can be called like so: @@ -34,7 +34,7 @@ hi default-router-1.os what's up? The other most commonly used script is `m:terminal:sys`, or just `m` - which stands for `Message`. `m` lets you send a request to any node or application like so: ``` -m john.os@proc:pkg:pub '{"foo":"bar"}' +m some-node.os@proc:pkg:pub '{"foo":"bar"}' ``` Note that if your process has the ability to message the `terminal` app, then that process can call any script. diff --git a/src/apis/vfs.md b/src/apis/vfs.md index d04fe2b7..dc8dfa99 100644 --- a/src/apis/vfs.md +++ b/src/apis/vfs.md @@ -8,7 +8,7 @@ Every request takes a path and a corresponding action. ## Drives -A drive is a directory within a package's VFS directory, e.g., `app_store:sys/pkg/` or `your_package:publisher.os/my_drive/`. +A drive is a directory within a package's VFS directory, e.g., `app-store:sys/pkg/` or `your_package:publisher.os/my_drive/`. Drives are owned by packages. Packages can share access to drives they own via [capabilities](../system/process/capabilities.md). Each package is spawned with two drives: [`pkg/`](#pkg-drive) and [`tmp/`](#tmp-drive). @@ -183,13 +183,14 @@ let metadata = metadata(&some_path)?; ### API ```rust +/// IPC Request format for the vfs:distro:sys runtime module. +#[derive(Debug, Serialize, Deserialize)] pub struct VfsRequest { - /// path is always prepended by package_id, the capabilities of the topmost directory are checked - /// "/your_package:publisher.os/drive_dir/another_dir_or_file" pub path: String, pub action: VfsAction, } +#[derive(Debug, Serialize, Deserialize, PartialEq)] pub enum VfsAction { CreateDrive, CreateDir, @@ -198,15 +199,15 @@ pub enum VfsAction { OpenFile { create: bool }, CloseFile, Write, - WriteAt, + WriteAll, Append, SyncAll, Read, ReadDir, ReadToEnd, - ReadExact(u64), + ReadExact { length: u64 }, ReadToString, - Seek { seek_from: SeekFrom }, + Seek(SeekFrom), RemoveFile, RemoveDir, RemoveDirAll, @@ -219,12 +220,14 @@ pub enum VfsAction { Hash, } +#[derive(Debug, Serialize, Deserialize, PartialEq)] pub enum SeekFrom { Start(u64), End(i64), Current(i64), } +#[derive(Debug, Serialize, Deserialize)] pub enum FileType { File, Directory, @@ -232,21 +235,24 @@ pub enum FileType { Other, } +#[derive(Debug, Serialize, Deserialize)] pub struct FileMetadata { pub file_type: FileType, pub len: u64, } +#[derive(Debug, Serialize, Deserialize)] pub struct DirEntry { pub path: String, pub file_type: FileType, } +#[derive(Debug, Serialize, Deserialize)] pub enum VfsResponse { Ok, Err(VfsError), Read, - SeekFrom(u64), + SeekFrom { new_offset: u64 }, ReadDir(Vec), ReadToString(String), Metadata(FileMetadata), @@ -254,15 +260,27 @@ pub enum VfsResponse { Hash([u8; 32]), } +#[derive(Error, Debug, Serialize, Deserialize)] pub enum VfsError { + #[error("No capability for action {action} at path {path}")] NoCap { action: String, path: String }, + #[error("Bytes blob required for {action} at path {path}")] BadBytes { action: String, path: String }, + #[error("bad request error: {error}")] BadRequest { error: String }, + #[error("error parsing path: {path}: {error}")] ParseError { error: String, path: String }, + #[error("IO error: {error}, at path {path}")] IOError { error: String, path: String }, + #[error("kernel capability channel error: {error}")] CapChannelFail { error: String }, + #[error("Bad JSON blob: {error}")] BadJson { error: String }, + #[error("File not found at path {path}")] NotFound { path: String }, + #[error("Creating directory failed at path: {path}: {error}")] CreateDirError { path: String, error: String }, + #[error("Other error: {error}")] + Other { error: String }, } ``` diff --git a/src/apis/websocket.md b/src/apis/websocket.md index c61f7a23..75028eee 100644 --- a/src/apis/websocket.md +++ b/src/apis/websocket.md @@ -1,6 +1,6 @@ # WebSocket API -WebSocket connections are made with a Rust `warp` server in the core `http_server:distro:sys` process. +WebSocket connections are made with a Rust `warp` server in the core `http-server:distro:sys` process. Each connection is assigned a `channel_id` that can be bound to a given process using a `WsRegister` message. The process receives the `channel_id` for pushing data into the WebSocket, and any subsequent messages from that client will be forwarded to the bound process. @@ -62,7 +62,7 @@ With a `WebSocketPush`, the incoming message will be on the `LazyLoadBlob`, acce A full example: ```rs -fn handle_http_server_request( +fn handle_http-server_request( our: &Address, message_archive: &mut MessageArchive, source: &Address, @@ -119,7 +119,7 @@ pub fn send_ws_push( ) -> anyhow::Result<()> ``` -`node` will usually be `our.node` (although you can also send a WS push to another node's `http_server`!), `channel_id` is the client you want to send to, `message_type` will be either `WsMessageType::Text` or `WsMessageType::Binary`, and `blob` will be a standard `LazyLoadBlob` with an optional `mime` field and required `bytes` field. +`node` will usually be `our.node` (although you can also send a WS push to another node's `http-server`!), `channel_id` is the client you want to send to, `message_type` will be either `WsMessageType::Text` or `WsMessageType::Binary`, and `blob` will be a standard `LazyLoadBlob` with an optional `mime` field and required `bytes` field. If you would prefer to send the request without the helper function, this is that what `send_ws_push` looks like under the hood: @@ -127,7 +127,7 @@ If you would prefer to send the request without the helper function, this is tha Request::new() .target(Address::new( node, - ProcessId::from_str("http_server:distro:sys").unwrap(), + ProcessId::from_str("http-server:distro:sys").unwrap(), )) .body( serde_json::json!(HttpServerRequest::WebSocketPush { diff --git a/src/audits-and-security.md b/src/audits-and-security.md new file mode 100644 index 00000000..b43bb957 --- /dev/null +++ b/src/audits-and-security.md @@ -0,0 +1,13 @@ +# Audits and Security + +The Kinode operating system runtime has been audited by [Enigma Dark](https://www.enigmadark.com/). +That report can be found [here](https://github.com/Enigma-Dark/security-review-reports/blob/main/2024-11-18_Architecture_Review_Report_Kinode.pdf). + +However, the audit was not comprehensive and focused on the robustness of the networking stack and the kernel. +Therefore, other parts of the runtime, such as the filesystem modules and the ETH RPC layer, remain unaudited. +Kinode OS remains a work in progress and will continue to be audited as it matures. + +### Smart Contracts + +Kinode OS uses a number of smart contracts to manage global state. +[link to smart contract audit when finished] diff --git a/src/chess_app/frontend.md b/src/chess_app/frontend.md index 03349f1d..90cb1851 100644 --- a/src/chess_app/frontend.md +++ b/src/chess_app/frontend.md @@ -32,22 +32,22 @@ use kinode_process_lib::{http::server, homepage}; // add ourselves to the homepage homepage::add_to_homepage("My Chess App", None, Some("/"), None); -// create an HTTP server struct with which to manipulate `http_server:distro:sys` -let mut http_server = server::HttpServer::new(5); +// create an HTTP server struct with which to manipulate `http-server:distro:sys` +let mut http-server = server::HttpServer::new(5); let http_config = server::HttpBindingConfig::default(); // Serve the index.html and other UI files found in pkg/ui at the root path. -http_server +http-server .serve_ui(&our, "ui", vec!["/"], http_config.clone()) .expect("failed to serve ui"); // Allow HTTP requests to be made to /games; they will be handled dynamically. -http_server +http-server .bind_http_path("/games", http_config.clone()) .expect("failed to bind /games"); // Allow websockets to be opened at / (our process ID will be prepended). -http_server +http-server .bind_ws_path("/", server::WsBindingConfig::default()) .expect("failed to bind ws"); ``` @@ -61,15 +61,15 @@ See [process_lib docs](https://docs.rs/kinode_process_lib/latest/kinode_process_ These requests all serve HTTP that can only be accessed by a logged-in node user (the `true` parameter for `authenticated` in `HttpBindingConfig`) and can be accessed remotely (the `false` parameter for `local_only`). Requests on the `/games` path will arrive as requests to your process, and you'll have to handle them and respond. -To do this, add a branch to the main request-handling function that takes requests from *our* `http_server:distro:sys`. +To do this, add a branch to the main request-handling function that takes requests from *our* `http-server:distro:sys`. In `my-chess/src/lib.rs`, inside the part of `handle_request()` that handles local requests: ```rust ... // if the message is from the HTTP server runtime module, we should handle it // as an HTTP request and not a chess request - if message.source().process == "http_server:distro:sys" { - return handle_http_request(state, http_server, message); + if message.source().process == "http-server:distro:sys" { + return handle_http_request(state, http-server, message); } ... ``` @@ -87,14 +87,14 @@ In `my-chess/src/lib.rs`: /// Handle HTTP requests from our own frontend. fn handle_http_request( state: &mut ChessState, - http_server: &mut server::HttpServer, + http-server: &mut server::HttpServer, message: &Message, ) -> anyhow::Result<()> { - let request = http_server.parse_request(message.body())?; + let request = http-server.parse_request(message.body())?; // the HTTP server helper struct allows us to pass functions that // handle the various types of requests we get from the frontend - http_server.handle_request( + http-server.handle_request( request, |incoming| { // client frontend sent an HTTP request, process it and @@ -280,8 +280,8 @@ Since open channels are already tracked in `HttpServer`, you just need to send a In `my-chess/src/lib.rs`, add a helper function: ```rust -fn send_ws_update(http_server: &mut server::HttpServer, game: &Game) { - http_server.ws_push_all_channels( +fn send_ws_update(http-server: &mut server::HttpServer, game: &Game) { + http-server.ws_push_all_channels( "/", server::WsMessageType::Binary, LazyLoadBlob { @@ -301,11 +301,11 @@ Now, anywhere you receive an action from another node (in `handle_chess_request( A good place to do this is right after saving the updated state. Local moves from the frontend will update on their own. -Finally, add requests for `http_server` and `vfs` messaging capabilities to the `manifest.json`: +Finally, add requests for `http-server` and `vfs` messaging capabilities to the `manifest.json`: ```json ... "request_capabilities": [ - "http_server:distro:sys", + "http-server:distro:sys", "vfs:distro:sys" ], ... diff --git a/src/cookbook/manage_child_processes.md b/src/cookbook/manage_child_processes.md index d77e0168..1522a745 100644 --- a/src/cookbook/manage_child_processes.md +++ b/src/cookbook/manage_child_processes.md @@ -22,7 +22,7 @@ spawn ... ``` To start a child process, use the [`spawn()`](https://docs.rs/kinode_process_lib/latest/kinode_process_lib/fn.spawn.html) function from [`kinode_process_lib`](https://github.com/kinode-dao/process_lib). -The following example demonstrates a basic parent process whose sole function is to spawn a child process and grant it the ability to send messages using `http_client`: +The following example demonstrates a basic parent process whose sole function is to spawn a child process and grant it the ability to send messages using `http-client`: ```rust {{#includehidetest ../../code/spawn/parent/src/lib.rs}} ``` @@ -45,7 +45,7 @@ OnExit is an enum with three potential values: - `Restart`: The process will automatically restart after termination. - `Requests: Vec<(Address, Request, Option)>`: Upon process termination, a series of predefined requests will be dispatched. - `request_capabilities: Vec`: This argument is for passing immediate capabilities to the child process. - As illustrated in the provided example, the parent's `http_client` messaging capability was shared with the child. + As illustrated in the provided example, the parent's `http-client` messaging capability was shared with the child. - `grant_capabilities: Vec`: This argument is for granting capabilities to other processes on start. However, for security reasons, you limit it just to the `"messaging"` cap for messaging this process back, hence why it is a `Vec` instead of vector of arbitrary capabilities. diff --git a/src/cookbook/package_apis.md b/src/cookbook/package_apis.md index 30f41478..1f9b9b3b 100644 --- a/src/cookbook/package_apis.md +++ b/src/cookbook/package_apis.md @@ -86,7 +86,7 @@ This method requires a [`--port`](#../kit/build.md#--port) (or `-p` for short) f That `--port` corresponds to the Kinode hosting the API dependency. To host an API, your Kinode must either: -1. Have that package downloaded by the `app_store`. +1. Have that package downloaded by the `app-store`. 2. Be a live node, in which case it will attempt to contact the publisher of the package, and download the package. Thus, when developing on a fake node, you must first build and start any dependencies on your fake node before building packages that depend upon them: see [usage example below](#remote-file-storage-usage-example). diff --git a/src/cookbook/publish_to_web.md b/src/cookbook/publish_to_web.md index 0b403eff..9011f42b 100644 --- a/src/cookbook/publish_to_web.md +++ b/src/cookbook/publish_to_web.md @@ -47,9 +47,9 @@ If your process is called `main:my-package:myusername.os` and your Kinode is run - Whether the content is static (not relevant here) - Whether to serve as a secure subdomain -Under the hood, `serve_ui` uses [`bind_http_static_path`](https://docs.rs/kinode_process_lib/latest/kinode_process_lib/http/server/struct.HttpServer.html#method.bind_http_static_path) which caches files in memory with `http_server` to respond to HTTP requests more quickly. +Under the hood, `serve_ui` uses [`bind_http_static_path`](https://docs.rs/kinode_process_lib/latest/kinode_process_lib/http/server/struct.HttpServer.html#method.bind_http_static_path) which caches files in memory with `http-server` to respond to HTTP requests more quickly. The two additional parameters are the `content_type` (an optional String) and the `content` (bytes). The content will be served at the named route with the `Content-Type` header set appropriately. -Note that `serve_ui` caches all files in `http_server`, so if your website or web app has hundreds of MBs of asset files (like high-res images), then you will want to use a different method to serve content. +Note that `serve_ui` caches all files in `http-server`, so if your website or web app has hundreds of MBs of asset files (like high-res images), then you will want to use a different method to serve content. For example, see the [`docs:docs:nick.kino` application](https://github.com/nick1udwig/docs/blob/master/docs/src/lib.rs). diff --git a/src/cookbook/reading_data_from_eth.md b/src/cookbook/reading_data_from_eth.md index e1ae05e3..7f25aefc 100644 --- a/src/cookbook/reading_data_from_eth.md +++ b/src/cookbook/reading_data_from_eth.md @@ -82,4 +82,4 @@ There are a few important things to note when subscribing to contract events and 4. If a subscription fails, it makes sense to try resubscribing, but keep in mind that events might occur between the failure and the resubscribe. A good strategy is to fetch logs for this time period. -For a full example of an app that uses the ETH Provider in a critical use-case, check out the [kns_indexer](https://github.com/kinode-dao/kinode/blob/main/kinode/packages/kns_indexer/kns_indexer/src/lib.rs) in the Kinode repo. +For a full example of an app that uses the ETH Provider in a critical use-case, check out the [kns-indexer](https://github.com/kinode-dao/kinode/blob/main/kinode/packages/kns-indexer/kns-indexer/src/lib.rs) in the Kinode repo. diff --git a/src/getting_started/install.md b/src/getting_started/install.md index a7ef5519..7f0e666d 100644 --- a/src/getting_started/install.md +++ b/src/getting_started/install.md @@ -141,7 +141,7 @@ git clone https://github.com/kinode-dao/kinode.git Build the packages that are bundled with the binary: ```bash -cargo run -p build_packages +cargo run -p build-packages ``` Build the binary: diff --git a/src/getting_started/kimap.md b/src/getting_started/kimap.md index 567dc2d0..ff3812dd 100644 --- a/src/getting_started/kimap.md +++ b/src/getting_started/kimap.md @@ -9,7 +9,7 @@ Discoverability can present both social barriers (finding a new user on a game o Many solutions have been designed to address this problem, but so far, the ``devex'' (developer experience) of deploying centralized services has continued to outcompete the p2p discoverability options available. Kimap aims to change this by providing a single, shared, onchain namespace that can be used to resolve to arbitrary elements of the Kinode network. -1. All keys are strings containing exclusively characters 0-9, a-z (lowercase), - (hyphen). +1. All keys are strings containing exclusively characters 0-9, a-z (lowercase), - (hyphen) and are at maximum 63 characters long. 2. A key may be one of two types, a name-key or a data-key. 3. Every name-key may create sub-entries directly beneath it. 4. Every name-key is an ERC-721[^1] NFT (non-fungible token), with a connected token-bound account[^2] with a counterfactual address. diff --git a/src/kit/boot-fake-node.md b/src/kit/boot-fake-node.md index 127ce61a..bb93bb6d 100644 --- a/src/kit/boot-fake-node.md +++ b/src/kit/boot-fake-node.md @@ -12,7 +12,7 @@ By default, `boot-fake-node` fetches a prebuilt binary and launches the node usi Alternatively, `boot-fake-node` can build a local Kinode core repo and use the resulting binary. It also boots a fake chain with [`anvil`](https://book.getfoundry.sh/anvil/) in the background (see [`kit chain`](../kit/chain.md)). -The fake chain comes preseeded with two contracts: KNS, which nodes use to index networking info of other nodes; and `app_store`, which nodes use to index published packages. +The fake chain comes preseeded with two contracts: KNS, which nodes use to index networking info of other nodes; and `app-store`, which nodes use to index published packages. ## Example Usage diff --git a/src/kit/chain.md b/src/kit/chain.md index 3dd3cb32..8910b936 100644 --- a/src/kit/chain.md +++ b/src/kit/chain.md @@ -13,11 +13,11 @@ The default port is `8545` and the chain ID is `31337`. ## Discussion `kit chain` starts an anvil node with the arguments `--load-state kinostate.json`. -This json file includes the KNS (Kinode Name System) & `app_store` contracts, and is included in the `kit` binary. +This json file includes the KNS (Kinode Name System) & `app-store` contracts, and is included in the `kit` binary. The [`kinostate.json`](https://github.com/kinode-dao/kit/blob/master/src/chain/kinostate) files can be found written into `/tmp/kinode-kit-cache/kinostate-{hash}.json` upon running the command. -Note that while the `kns_indexer` and `app_store` apps in fake nodes use this chain to index events, any events loaded from a json statefile, aren't replayed upon restarting anvil. +Note that while the `kns-indexer` and `app-store` apps in fake nodes use this chain to index events, any events loaded from a json statefile, aren't replayed upon restarting anvil. ## Arguments diff --git a/src/kit/publish.md b/src/kit/publish.md index bcaf3735..975838d0 100644 --- a/src/kit/publish.md +++ b/src/kit/publish.md @@ -2,7 +2,7 @@ short: `kit p` -`kit publish` creates entries in the Kimap, publishing the given package according to the `app_store`s protocol. +`kit publish` creates entries in the Kimap, publishing the given package according to the `app-store`s protocol. It can also be used to update or unpublish previously-published packages. `kit publish` directly writes to the Kimap: it does not interact with a Kinode. diff --git a/src/kit/view-api.md b/src/kit/view-api.md index 963b51d9..e9733879 100644 --- a/src/kit/view-api.md +++ b/src/kit/view-api.md @@ -15,7 +15,7 @@ lists all the APIs of packages downloaded by the Kinode running at port 8080. ```bash # Fetch and display the API for the given package -kit view-api app_store:sys +kit view-api app-store:sys ``` ## Discussion diff --git a/src/my_first_app/chapter_1.md b/src/my_first_app/chapter_1.md index 1cb774c7..7a3abab4 100644 --- a/src/my_first_app/chapter_1.md +++ b/src/my_first_app/chapter_1.md @@ -141,7 +141,7 @@ $ cat my-chat-app/pkg/manifest.json "on_exit": "Restart", "request_networking": true, "request_capabilities": [ - "http_server:distro:sys", + "http-server:distro:sys", "vfs:distro:sys" ], "grant_capabilities": [], @@ -199,7 +199,7 @@ The `wit_version` is an optional field. If elided, the package will use [`kinode.wit` `0.7.0`](https://github.com/kinode-dao/kinode-wit/blob/aa2c8b11c9171b949d1991c32f58591c0e881f85/kinode.wit). If included with a value of `0`, it will use [`kinode.wit` `0.8.0`](https://github.com/kinode-dao/kinode-wit/blob/758fac1fb144f89c2a486778c62cbea2fb5840ac/kinode.wit). The `dependencies` field is also optional; see discussion in [WIT APIs](../system/process/wit_apis.md). -The rest of these fields are not required for development, but become important when publishing a package with the [`app_store`](https://github.com/kinode-dao/kinode/tree/main/kinode/packages/app_store). +The rest of these fields are not required for development, but become important when publishing a package with the [`app-store`](https://github.com/kinode-dao/kinode/tree/main/kinode/packages/app-store). As an aside: each process has a unique `ProcessId`, used to address messages to that process, that looks like @@ -258,7 +258,7 @@ By default, the fake node will bind to port `8080`. Note the port number in the output for [later](#starting-the-package); it will look something like: ```bash -Thu 22:50 http_server: running on port 8080 +Thu 22:50 http-server: running on port 8080 ``` `kit boot-fake-node` also accepts a `--runtime-path` argument. @@ -311,7 +311,7 @@ where here the port provided following `-p` must match the port bound by the nod The node's terminal should display something like ``` -Thu 22:51 app_store:sys: successfully installed my-chat-app:template.os +Thu 22:51 app-store:sys: successfully installed my-chat-app:template.os ``` Congratulations: you've now built and installed your first application on Kinode! diff --git a/src/my_first_app/chapter_4.md b/src/my_first_app/chapter_4.md index 781fba0c..74f333a7 100644 --- a/src/my_first_app/chapter_4.md +++ b/src/my_first_app/chapter_4.md @@ -223,11 +223,11 @@ For an example of a more complex widget, see the source code of our [app store w #### Widget Case Study: App Store -The app store's [widget](https://github.com/kinode-dao/kinode/blob/3719ab38e19143a7bcd501fd245c7a10b2239ee7/kinode/packages/app_store/app_store/src/http_api.rs#L59C1-L133C2) makes a single request to the node, to determine the apps that are listed in the app store. +The app store's [widget](https://github.com/kinode-dao/kinode/blob/3719ab38e19143a7bcd501fd245c7a10b2239ee7/kinode/packages/app-store/app-store/src/http_api.rs#L59C1-L133C2) makes a single request to the node, to determine the apps that are listed in the app store. It then creates some HTML to display the apps in a nice little list. ```html -{{#webinclude https://raw.githubusercontent.com/kinode-dao/kinode/3719ab38e19143a7bcd501fd245c7a10b2239ee7/kinode/packages/app_store/app_store/src/http_api.rs 62:130}} +{{#webinclude https://raw.githubusercontent.com/kinode-dao/kinode/3719ab38e19143a7bcd501fd245c7a10b2239ee7/kinode/packages/app-store/app-store/src/http_api.rs 62:130}} ``` diff --git a/src/process_stdlib/overview.md b/src/process_stdlib/overview.md index 1e6ce8ef..74b90c03 100644 --- a/src/process_stdlib/overview.md +++ b/src/process_stdlib/overview.md @@ -5,16 +5,7 @@ The full documentation can be found [here](https://docs.rs/kinode_process_lib), In your `Cargo.toml` file, use a version tag like this: ```toml -kinode_process_lib = "0.8.5" -``` - -To use a specific commit hash or branch from the `process_lib` repo, use this: -```toml -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "5305453" } -``` -or this: -```toml -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", branch = "main" } +kinode_process_lib = "0.10.0" ``` **Make sure to use a recent version of the `process_lib` while the system is in beta and active development.** @@ -24,7 +15,7 @@ Since the current major version of both is 0, breaking changes can occur at any Once the major version reaches 1, breaking changes will only occur between major versions. As is, **developers may have to update their version of `process_lib` as they update Kinode.** -Since Kinode apps use the [WebAssembly Component Model](https://component-model.bytecodealliance.org/), they are built on top of a [WIT](https://component-model.bytecodealliance.org/design/wit.html) (Wasm Interface Type) [package](https://github.com/kinode-dao/kinode-wit/blob/v0.8/kinode.wit). +Since Kinode apps use the [WebAssembly Component Model](https://component-model.bytecodealliance.org/), they are built on top of a [WIT](https://component-model.bytecodealliance.org/design/wit.html) (Wasm Interface Type) [package](https://github.com/kinode-dao/kinode-wit). [`wit-bindgen`](https://github.com/bytecodealliance/wit-bindgen) is used to generate Rust code from a WIT file. The generated code then contains the core types and functions that are available to all Kinode apps. diff --git a/src/system/files.md b/src/system/files.md index 707e434c..66d9aa07 100644 --- a/src/system/files.md +++ b/src/system/files.md @@ -11,11 +11,11 @@ For example, part of the VFS might look like: ```text node-home/vfs -├── app_store:sys +├── app-store:sys │   ├── pkg │   │   ├── api -│   │   │   └── app_store:sys-v0.wit -│   │   ├── app_store.wasm +│   │   │   └── app-store:sys-v0.wit +│   │   ├── app-store.wasm │   │   ├── manifest.json │   │ ... │   └── tmp @@ -44,7 +44,7 @@ node-home/vfs ## Drives -A drive is a directory within a package's VFS directory, e.g., `app_store:sys/pkg/` or `your-package:publisher.os/my-drive/`. +A drive is a directory within a package's VFS directory, e.g., `app-store:sys/pkg/` or `your-package:publisher.os/my-drive/`. Drives are owned by processes. Processes can share access to drives they own via [capabilities](process/capabilities.md). Each package is spawned with two drives: [`pkg/`](#pkg-drive) and [`tmp/`](#tmp-drive). diff --git a/src/system/http_server_and_client.md b/src/system/http_server_and_client.md index 5cf3335e..46a8c5ec 100644 --- a/src/system/http_server_and_client.md +++ b/src/system/http_server_and_client.md @@ -6,9 +6,9 @@ As a result, Kinode apps can read data from the web (and other Kinodes), and als The HTTP server is how most processes in Kinode present their interface to the user, through an authenticated web browser. The specification for the [server](../apis/http_server.md) and [client](../apis/http_client.md) APIs are available in the API reference. -These APIs are accessible via messaging the [`http_server:distro:sys`](https://github.com/kinode-dao/kinode/blob/main/kinode/src/http/server.rs) and [`http_client:distro:sys`](https://github.com/kinode-dao/kinode/blob/main/kinode/src/http/client.rs) runtime modules, respectively. +These APIs are accessible via messaging the [`http-server:distro:sys`](https://github.com/kinode-dao/kinode/blob/main/kinode/src/http/server.rs) and [`http-client:distro:sys`](https://github.com/kinode-dao/kinode/blob/main/kinode/src/http/client.rs) runtime modules, respectively. The only [`capability`](../system/process/capabilities.md) required to use either process is the one to message it, granted by the kernel. -It is recommended to interact with the `http_server` and `http_client` using the [`kinode_process_lib`](https://docs.rs/kinode_process_lib/latest/kinode_process_lib/http/index.html) +It is recommended to interact with the `http-server` and `http-client` using the [`kinode_process_lib`](https://docs.rs/kinode_process_lib/latest/kinode_process_lib/http/index.html) WebSocket server/client functionality is presented alongside HTTP. diff --git a/src/system/process/capabilities.md b/src/system/process/capabilities.md index a46c4c55..1ca24acf 100644 --- a/src/system/process/capabilities.md +++ b/src/system/process/capabilities.md @@ -42,14 +42,14 @@ Here is a `manifest.json` example for the `chess` app: "net:distro:sys" ], "grant_capabilities": [ - "http_server:distro:sys" + "http-server:distro:sys" ], "public": true } ] ``` By setting `request_networking: true`, the kernel will give it the `"networking"` capability. In the `request_capabilities` field, `chess` is asking for the capability to message `net:distro:sys`. -Finally, in the `grant_capabilities` field, it is giving `http_server:distro:sys` the ability to message `chess`. +Finally, in the `grant_capabilities` field, it is giving `http-server:distro:sys` the ability to message `chess`. When booting the `chess` app, all of these capabilities will be granted throughout your node. If you were to print out `chess`' capabilities using `kinode_process_lib::our_capabilities() -> Vec`, you would see something like this: @@ -57,9 +57,9 @@ If you were to print out `chess`' capabilities using `kinode_process_lib::our_ca ```rust [ // obtained because of `request_networking: true` - Capability { issuer: "our@kernel:distro:sys", params: "\"network\"" }, + Capability { issuer: "our-node.os@kernel:distro:sys", params: "\"network\"" }, // obtained because we asked for it in `request_capabilities` - Capability { issuer: "our@net:distro:sys", params: "\"messaging\"" } + Capability { issuer: "our-node.os@net:distro:sys", params: "\"messaging\"" } ] ``` Note that [userspace capabilities](#userspace-capabilities), those *created by other processes*, can also be requested in a package manifest, though it's not guaranteed that the user will have installed the process that can grant the capability. diff --git a/src/system/process/extensions.md b/src/system/process/extensions.md index 7487fd74..2f00e583 100644 --- a/src/system/process/extensions.md +++ b/src/system/process/extensions.md @@ -42,7 +42,7 @@ The [examples below](#examples) show some more working extensions. The process [binds a WebSocket](#bind-an-extension-websocket), so Kinode acts as the WebSocket server. The extension acts as a client, connecting to the WebSocket served by the Kinode process. -The process sends [`HttpServerAction::WebSocketExtPushOutgoing`](https://docs.rs/kinode_process_lib/0.9.6/kinode_process_lib/http/server/enum.HttpServerAction.html#variant.WebSocketExtPushOutgoing) Requests to the `http_server`(look [here](../http_server_and_client.md) and [here](../..//apis/http_server.md)) to communicate with the extension (see the `enum` defined at the bottom of this section). +The process sends [`HttpServerAction::WebSocketExtPushOutgoing`](https://docs.rs/kinode_process_lib/0.9.6/kinode_process_lib/http/server/enum.HttpServerAction.html#variant.WebSocketExtPushOutgoing) Requests to the `http-server`(look [here](../http-server_and_client.md) and [here](../..//apis/http_server.md)) to communicate with the extension (see the `enum` defined at the bottom of this section). Table 1: `HttpServerAction::WebSocketExtPushOutgoing` Inputs @@ -54,7 +54,7 @@ Field Name | Description The [`lazy_load_blob`](https://docs.rs/kinode_process_lib/latest/kinode_process_lib/kinode/process/standard/struct.LazyLoadBlob.html) is the payload for the WebSocket message. -The `http_server` converts the Request into a `HttpServerAction::WebSocketExtPushData`, [MessagePack](https://msgpack.org)s it, and sends it to the extension. +The `http-server` converts the Request into a `HttpServerAction::WebSocketExtPushData`, [MessagePack](https://msgpack.org)s it, and sends it to the extension. Specifically, it attaches the Message's `id`, copies the `desired_reply_type` to the `kinode_message_type` field, and copies the `lazy_load_blob` to the `blob` field. The extension replies with a [MessagePack](https://msgpack.org)ed `HttpServerAction::WebSocketExtPushData`. @@ -73,8 +73,8 @@ pub enum HttpServerAction { desired_reply_type: MessageType, }, /// For communicating with the ext. - /// Kinode's http_server sends this to the ext after receiving `WebSocketExtPushOutgoing`. - /// Upon receiving reply with this type from ext, http_server parses, setting: + /// Kinode's http-server sends this to the ext after receiving `WebSocketExtPushOutgoing`. + /// Upon receiving reply with this type from ext, http-server parses, setting: /// * id as given, /// * message type as given (Request or Response), /// * body as HttpServerRequest::WebSocketPush, @@ -121,7 +121,7 @@ These are how other Kinode processes will make Requests that are served by the e 4. Interface process receives Response, optionally does some logic, sends Response on to process A. The [WebSocket protocol section](#the-websocket-protocol) above discusses how to send messages to the extension over WebSockets. -Briefly, a `HttpServerAction::WebSocketExtPushOutgoing` Request is sent to the `http_server`, with the payload in the `lazy_load_blob`. +Briefly, a `HttpServerAction::WebSocketExtPushOutgoing` Request is sent to the `http-server`, with the payload in the `lazy_load_blob`. It is recommended to use the following protocol: 1. Use the [`WsMessageType::Binary`](https://docs.rs/kinode_process_lib/latest/kinode_process_lib/http/server/enum.WsMessageType.html) WebSocket message type and use MessagePack to (de)serialize your messages. @@ -131,7 +131,7 @@ It is recommended to use the following protocol: 2. Set `desired_reply_type` to `MessageType::Response` type. Then the extension can indicate its reply is a Response, which will allow your Kinode process to properly route it back to the original requestor. 3. If possible, the original requestor should serialize the `lazy_load_blob`, and the type of `lazy_load_blob` should be defined accordingly. - Then, all the interface process needs to do is `inherit` the `lazy_load_blob` in its `http_server` Request. + Then, all the interface process needs to do is `inherit` the `lazy_load_blob` in its `http-server` Request. This increases efficiency since it avoids bringing those bytes across the Wasm boundry between the process and the runtime (see more discussion [here](../process/processes.md#message-structure)). #### Handle WebSocket Messages @@ -146,7 +146,7 @@ Table 2: [`HttpServerRequest`](https://docs.rs/kinode_process_lib/latest/kinode_ `WebSocketClose` | Sent when the WebSocket closes. A good time to clean up the old `channel_id`, since it will no longer be used. `WebSocketPush` | Used for sending payloads between interface and extension. -Although the extension will send a `HttpServerAction::WebSocketExtPushData`, the `http_server` converts that into a `HttpServerRequest::WebSocketPush`. +Although the extension will send a `HttpServerAction::WebSocketExtPushData`, the `http-server` converts that into a `HttpServerRequest::WebSocketPush`. The `lazy_load_blob` then contains the payload from the extension, which can either be processed in the interface or `inherit`ed and passed back to the original requestor process. ### The Extension diff --git a/src/system/process/wit_apis.md b/src/system/process/wit_apis.md index 16026b64..365366a2 100644 --- a/src/system/process/wit_apis.md +++ b/src/system/process/wit_apis.md @@ -49,10 +49,10 @@ chat WIT compiles into types of your preferred language. Kinode currently recommends Rust, but also supports Python and Javascript, with plans to support C/C++ and JVM languages like Java, Scala, and Clojure. You can see the code generated by your WIT file using the [`wit-bindgen` CLI](https://github.com/bytecodealliance/wit-bindgen). -For example, to generate the Rust code for the `app_store` API in [Kinode core](https://github.com/kinode-dao/kinode/tree/main/kinode/packages/app_store), use, e.g., +For example, to generate the Rust code for the `app-store` API in [Kinode core](https://github.com/kinode-dao/kinode/tree/main/kinode/packages/app-store), use, e.g., ``` -kit b app_store -wit-bindgen rust -w app-store-sys-v1 --generate-unused-types --additional_derive_attribute serde::Deserialize app_store/app_store/target/wit +kit b app-store +wit-bindgen rust -w app-store-sys-v1 --generate-unused-types --additional_derive_attribute serde::Deserialize app-store/app-store/target/wit ``` In the case of Rust, `kebab-case` WIT variable names become `UpperCamelCase`. diff --git a/src/system/terminal.md b/src/system/terminal.md index e181b2a4..0c3410a5 100644 --- a/src/system/terminal.md +++ b/src/system/terminal.md @@ -111,7 +111,7 @@ For instance, `m.wasm` only uses root, public, and `request_networking`, omittin ### Example -This is a `scripts.json` that publishes a single script, `hi`, which doesn't receive `root` capabilities, is not `public`, can send messages over the network, will receive the capability to message `net:distro:sys`, and gives `net:distro:sys` the ability to message it back: +This is a `scripts.json` that publishes a single script, `hi`, which doesn't receive all of its parent's capabilities (root=false), is not `public`, can send messages over the network, will receive the capability to message `net:distro:sys`, and gives `net:distro:sys` the ability to message it back: ```json {