Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
545 changes: 324 additions & 221 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions kinode/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ path = "src/main.rs"

[build-dependencies]
anyhow = "1.0.71"
kit = { git = "https://github.com/kinode-dao/kit", rev = "1bd7bec" }
kit = { git = "https://github.com/kinode-dao/kit", rev = "659f59e" }
rayon = "1.8.1"
sha2 = "0.10"
tokio = "1.28"
Expand Down Expand Up @@ -86,6 +86,7 @@ tokio-tungstenite = "0.20.1"
url = "2.4.1"
uuid = { version = "1.1.2", features = ["serde", "v4"] }
warp = "0.3.5"
wasmtime = "17.0.1"
wasmtime-wasi = "17.0.1"
wasi-common = "19.0.1"
wasmtime = "19.0.1"
wasmtime-wasi = "19.0.1"
zip = "0.6"
4 changes: 3 additions & 1 deletion kinode/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ fn build_and_zip_package(
) -> anyhow::Result<(String, String, Vec<u8>)> {
let rt = tokio::runtime::Runtime::new().unwrap();
rt.block_on(async {
kit::build::execute(&entry_path, true, false, true, features).await?;
kit::build::execute(&entry_path, true, false, true, features)
.await
.map_err(|e| anyhow::anyhow!("{:?}", e))?;

let mut writer = Cursor::new(Vec::new());
let options = FileOptions::default()
Expand Down
4 changes: 2 additions & 2 deletions kinode/packages/app_store/app_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ alloy-primitives = "0.6.2"
alloy-sol-types = "0.6.2"
anyhow = "1.0"
bincode = "1.3.3"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" }
rand = "0.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
sha2 = "0.10.8"
sha3 = "0.10.8"
url = "2.4.1"
urlencoding = "2.1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" }
wit-bindgen = "0.24.0"
zip = { version = "0.6.6", default-features = false }

[lib]
Expand Down
3 changes: 0 additions & 3 deletions kinode/packages/app_store/app_store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ use std::str::FromStr;
wit_bindgen::generate!({
path: "wit",
world: "process",
exports: {
world: Component,
},
});

mod api;
Expand Down
4 changes: 2 additions & 2 deletions kinode/packages/app_store/download/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ simulation-mode = []

[dependencies]
anyhow = "1.0"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" }
wit-bindgen = "0.24.0"

[lib]
crate-type = ["cdylib"]
Expand Down
8 changes: 2 additions & 6 deletions kinode/packages/app_store/download/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use kinode_process_lib::{
await_next_request_body, call_init, println, Address, Message, NodeId, PackageId, Request,
await_next_message_body, call_init, println, Address, Message, NodeId, PackageId, Request,
};

mod api;
Expand All @@ -8,15 +8,11 @@ use api::*;
wit_bindgen::generate!({
path: "wit",
world: "process",
exports: {
world: Component,
},
});

call_init!(init);

fn init(our: Address) {
let Ok(body) = await_next_request_body() else {
let Ok(body) = await_next_message_body() else {
println!("download: failed to get args!");
return;
};
Expand Down
4 changes: 2 additions & 2 deletions kinode/packages/app_store/ft_worker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ simulation-mode = []
[dependencies]
anyhow = "1.0"
bincode = "1.3.3"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" }
rand = "0.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" }
wit-bindgen = "0.24.0"

[lib]
crate-type = ["cdylib"]
Expand Down
4 changes: 0 additions & 4 deletions kinode/packages/app_store/ft_worker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ use ft_worker_lib::*;
wit_bindgen::generate!({
path: "wit",
world: "process",
exports: {
world: Component,
},
});

/// internal worker protocol
Expand All @@ -21,7 +18,6 @@ pub enum FTWorkerProtocol {
}

call_init!(init);

fn init(our: Address) {
let Ok(Message::Request {
source: parent_process,
Expand Down
4 changes: 2 additions & 2 deletions kinode/packages/app_store/install/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ simulation-mode = []

[dependencies]
anyhow = "1.0"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" }
wit-bindgen = "0.24.0"

[lib]
crate-type = ["cdylib"]
Expand Down
8 changes: 2 additions & 6 deletions kinode/packages/app_store/install/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use kinode_process_lib::{
await_next_request_body, call_init, println, Address, Message, PackageId, Request,
await_next_message_body, call_init, println, Address, Message, PackageId, Request,
};

mod api;
Expand All @@ -8,15 +8,11 @@ use api::*;
wit_bindgen::generate!({
path: "wit",
world: "process",
exports: {
world: Component,
},
});

call_init!(init);

fn init(our: Address) {
let Ok(body) = await_next_request_body() else {
let Ok(body) = await_next_message_body() else {
println!("install: failed to get args!");
return;
};
Expand Down
4 changes: 2 additions & 2 deletions kinode/packages/app_store/uninstall/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ simulation-mode = []

[dependencies]
anyhow = "1.0"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" }
wit-bindgen = "0.24.0"

[lib]
crate-type = ["cdylib"]
Expand Down
8 changes: 2 additions & 6 deletions kinode/packages/app_store/uninstall/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use kinode_process_lib::{
await_next_request_body, call_init, println, Address, Message, PackageId, Request,
await_next_message_body, call_init, println, Address, Message, PackageId, Request,
};

mod api;
Expand All @@ -8,15 +8,11 @@ use api::*;
wit_bindgen::generate!({
path: "wit",
world: "process",
exports: {
world: Component,
},
});

call_init!(init);

fn init(our: Address) {
let Ok(body) = await_next_request_body() else {
let Ok(body) = await_next_message_body() else {
println!("uninstall: failed to get args!");
return;
};
Expand Down
4 changes: 2 additions & 2 deletions kinode/packages/chess/chess/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ simulation-mode = []
anyhow = "1.0"
base64 = "0.13"
bincode = "1.3.3"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" }
pleco = "0.5"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
url = "*"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" }
wit-bindgen = "0.24.0"

[lib]
crate-type = ["cdylib"]
Expand Down
4 changes: 0 additions & 4 deletions kinode/packages/chess/chess/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,10 @@ fn send_ws_update(our: &Address, game: &Game, open_channels: &HashSet<u32>) -> a
wit_bindgen::generate!({
path: "wit",
world: "process",
exports: {
world: Component,
},
});
// After generating bindings, use this macro to define the Component struct
// and its init() function, which the kernel will look for on startup.
call_init!(initialize);

fn initialize(our: Address) {
// A little printout to show in terminal that the process has started.
println!("started");
Expand Down
4 changes: 2 additions & 2 deletions kinode/packages/homepage/homepage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ simulation-mode = []
[dependencies]
anyhow = "1.0"
bincode = "1.3.3"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" }
wit-bindgen = "0.24.0"

[lib]
crate-type = ["cdylib"]
Expand Down
6 changes: 1 addition & 5 deletions kinode/packages/homepage/homepage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ struct HomepageApp {
wit_bindgen::generate!({
path: "wit",
world: "process",
exports: {
world: Component,
},
});

const HOME_PAGE: &str = include_str!("index.html");
Expand All @@ -50,8 +47,6 @@ const APP_TEMPLATE: &str = r#"
<h6>${label}</h6>
</a>"#;

call_init!(init);

/// bind to root path on http_server (we have special dispensation to do so!)
fn bind_index(our: &str, apps: &HashMap<ProcessId, String>) {
bind_http_static_path(
Expand Down Expand Up @@ -161,6 +156,7 @@ fn bind_index(our: &str, apps: &HashMap<ProcessId, String>) {
// Ok(())
// }

call_init!(init);
fn init(our: Address) {
let mut apps: HashMap<ProcessId, String> = HashMap::new();
let mut app_data: HashMap<ProcessId, HomepageApp> = HashMap::new();
Expand Down
4 changes: 2 additions & 2 deletions kinode/packages/kns_indexer/get_block/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ edition = "2021"
simulation-mode = []

[dependencies]
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" }
wit-bindgen = "0.24.0"

[lib]
crate-type = ["cdylib"]
Expand Down
8 changes: 2 additions & 6 deletions kinode/packages/kns_indexer/get_block/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
use kinode_process_lib::{await_next_request_body, call_init, eth, println, Address};
use kinode_process_lib::{await_next_message_body, call_init, eth, println, Address};

wit_bindgen::generate!({
path: "wit",
world: "process",
exports: {
world: Component,
},
});

call_init!(init);

fn init(_our: Address) {
let Ok(args) = await_next_request_body() else {
let Ok(args) = await_next_message_body() else {
println!("failed to get args");
return;
};
Expand Down
4 changes: 2 additions & 2 deletions kinode/packages/kns_indexer/kns_indexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ alloy-primitives = "0.6.2"
alloy-sol-types = "0.6.2"
bincode = "1.3.3"
hex = "0.4.3"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.0" }
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" }
rmp-serde = "1.1.2"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "21a46c7" }
wit-bindgen = "0.24.0"

[lib]
crate-type = ["cdylib"]
Expand Down
Loading