From 249960dc62f3dfcee9a742cce5e6770bcb8d644d Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Mon, 6 May 2024 11:09:51 -0700 Subject: [PATCH 01/33] build: add `wit` api support --- src/build/mod.rs | 73 +++++++++++++++++++++++++++++++++++----- src/start_package/mod.rs | 10 +++--- 2 files changed, 69 insertions(+), 14 deletions(-) diff --git a/src/build/mod.rs b/src/build/mod.rs index 534bc1fe..31042ba0 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -1,11 +1,13 @@ use std::path::Path; use std::process::Command; -use color_eyre::{eyre::eyre, Result}; +use color_eyre::{eyre::{eyre, WrapErr}, Result}; use fs_err as fs; use serde::{Deserialize, Serialize}; use tracing::{info, warn, instrument}; +use kinode_process_lib::kernel_types::Erc721Metadata; + use crate::KIT_CACHE; use crate::setup::{ check_js_deps, check_py_deps, check_rust_deps, get_deps, get_newest_valid_node_version, get_python_version, @@ -92,6 +94,15 @@ pub async fn download_file(url: &str, path: &Path) -> Result<()> { Ok(()) } +#[instrument(level = "trace", skip_all)] +pub fn read_metadata(package_dir: &Path) -> Result { + let metadata: Erc721Metadata = + serde_json::from_reader(fs::File::open(package_dir.join("metadata.json")) + .wrap_err_with(|| "Missing required metadata.json file. See discussion at https://book.kinode.org/my_first_app/chapter_1.html?highlight=metadata.json#metadatajson")? + )?; + Ok(metadata) +} + #[instrument(level = "trace", skip_all)] async fn compile_javascript_wasm_process( process_dir: &Path, @@ -101,8 +112,6 @@ async fn compile_javascript_wasm_process( "Compiling Javascript Kinode process in {:?}...", process_dir ); - let wit_dir = process_dir.join("wit"); - download_file(KINODE_WIT_URL, &wit_dir.join("kinode.wit")).await?; let wasm_file_name = process_dir.file_name().and_then(|s| s.to_str()).unwrap(); @@ -145,8 +154,6 @@ async fn compile_javascript_wasm_process( #[instrument(level = "trace", skip_all)] async fn compile_python_wasm_process(process_dir: &Path, python: &str) -> Result<()> { info!("Compiling Python Kinode process in {:?}...", process_dir); - let wit_dir = process_dir.join("wit"); - download_file(KINODE_WIT_URL, &wit_dir.join("kinode.wit")).await?; let wasm_file_name = process_dir.file_name().and_then(|s| s.to_str()).unwrap(); @@ -175,16 +182,13 @@ async fn compile_rust_wasm_process( info!("Compiling Rust Kinode process in {:?}...", process_dir); // Paths + let wit_dir = process_dir.join("wit"); let bindings_dir = process_dir .join("target") .join("bindings") .join(process_dir.file_name().unwrap()); - let wit_dir = process_dir.join("wit"); - fs::create_dir_all(&bindings_dir)?; - download_file(KINODE_WIT_URL, &wit_dir.join("kinode.wit")).await?; - // Check and download wasi_snapshot_preview1.wasm if it does not exist let wasi_snapshot_file = process_dir.join("wasi_snapshot_preview1.wasm"); let wasi_snapshot_url = format!( @@ -359,6 +363,14 @@ async fn compile_package_and_ui( Ok(()) } +#[instrument(level = "trace", skip_all)] +async fn build_wit_dir(process_dir: &Path) -> Result<()> { + let package_dir = process_dir.parent().ok_or_else(|| eyre!("process_dir has no parent"))?; + let wit_dir = process_dir.join("wit"); + download_file(KINODE_WIT_URL, &wit_dir.join("kinode.wit")).await?; + Ok(()) +} + #[instrument(level = "trace", skip_all)] async fn compile_package_item( entry: std::io::Result, @@ -367,6 +379,8 @@ async fn compile_package_item( let entry = entry?; let path = entry.path(); if path.is_dir() { + build_wit_dir(&path).await?; + if path.join(RUST_SRC_PATH).exists() { compile_rust_wasm_process(&path, &features).await?; } else if path.join(PYTHON_SRC_PATH).exists() { @@ -381,12 +395,34 @@ async fn compile_package_item( Ok(()) } +/// package dir looks like: +/// ``` +/// metadata.json +/// my_package:publisher.os-api-v0.wit <- optional +/// api/ <- working dir +/// pkg/ +/// api.zip +/// manifest.json +/// process_i.wasm +/// projess_j.wasm +/// process_i/ +/// src/ +/// lib.rs +/// process_i.wit +/// target/ <- working dir +/// wit/ <- working dir +/// process_j/ +/// src/ +/// target/ <- working dir +/// wit/ <- working dir +/// ``` #[instrument(level = "trace", skip_all)] async fn compile_package( package_dir: &Path, skip_deps_check: bool, features: &str, ) -> Result<()> { + let metadata = read_metadata(package_dir)?; let mut checked_rust = false; let mut checked_py = false; let mut checked_js = false; @@ -406,6 +442,25 @@ async fn compile_package( get_deps(deps)?; checked_js = true; } + } else if path.is_file() { + let Some(ext) = path.extension().and_then(|e| e.to_str()) else { + continue; + }; + if ext != "wit" { + continue; + } + let Some(path_str) = path.file_name().and_then(|s| s.to_str()) else { + continue; + }; + if path_str.starts_with(&format!( + "{}:{}-api", + metadata.properties.package_name, + metadata.properties.publisher, + )) { + // Copy it into wit/ + let path_in_wit = package_dir.join("wit").join(path_str); + std::fs::copy(path, path_in_wit)?; + } } } diff --git a/src/start_package/mod.rs b/src/start_package/mod.rs index bd8a2423..cf046420 100644 --- a/src/start_package/mod.rs +++ b/src/start_package/mod.rs @@ -10,18 +10,20 @@ use zip::write::FileOptions; use kinode_process_lib::kernel_types::Erc721Metadata; -use crate::{inject_message, KIT_LOG_PATH_DEFAULT}; +use crate::{build::read_metadata, inject_message, KIT_LOG_PATH_DEFAULT}; #[instrument(level = "trace", skip_all)] fn new_package( node: Option<&str>, package_name: &str, publisher_node: &str, + metadata: &Erc721Metadata, bytes_path: &str, ) -> Result { let message = json!({ "NewPackage": { "package": {"package_name": package_name, "publisher_node": publisher_node}, + "metadata": metadata, "mirror": true } }); @@ -102,10 +104,7 @@ pub async fn execute(package_dir: &Path, url: &str) -> Result<()> { )); } let pkg_dir = package_dir.join("pkg").canonicalize()?; - let metadata: Erc721Metadata = - serde_json::from_reader(fs::File::open(package_dir.join("metadata.json")) - .wrap_err_with(|| "Missing required metadata.json file. See discussion at https://book.kinode.org/my_first_app/chapter_1.html?highlight=metadata.json#metadatajson")? - )?; + let metadata = read_metadata(package_dir)?; let package_name = metadata.properties.package_name.as_str(); let publisher = metadata.properties.publisher.as_str(); let pkg_publisher = format!("{}:{}", package_name, publisher); @@ -123,6 +122,7 @@ pub async fn execute(package_dir: &Path, url: &str) -> Result<()> { None, package_name, publisher, + &metadata, zip_filename.to_str().unwrap(), )?; let response = inject_message::send_request(url, new_pkg_request).await?; From f292496081b54420e1ec63b053750628c08ecae5 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Mon, 6 May 2024 16:48:28 -0700 Subject: [PATCH 02/33] get node booting --- src/build/mod.rs | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/src/build/mod.rs b/src/build/mod.rs index 31042ba0..68d6412f 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -1,3 +1,4 @@ +use std::collections::HashMap; use std::path::Path; use std::process::Command; @@ -364,10 +365,23 @@ async fn compile_package_and_ui( } #[instrument(level = "trace", skip_all)] -async fn build_wit_dir(process_dir: &Path) -> Result<()> { - let package_dir = process_dir.parent().ok_or_else(|| eyre!("process_dir has no parent"))?; +async fn build_wit_dir(process_dir: &Path, apis: &HashMap>) -> Result<()> { let wit_dir = process_dir.join("wit"); download_file(KINODE_WIT_URL, &wit_dir.join("kinode.wit")).await?; + for (file_name, contents) in apis { + fs::write(wit_dir.join(file_name), contents)?; + } + + let src_dir = process_dir.join("src"); + for entry in src_dir.read_dir()? { + let entry = entry?; + let path = entry.path(); + if Some("wit") == path.extension().and_then(|s| s.to_str()) { + if let Some(file_name) = path.file_name().and_then(|s| s.to_str()) { + fs::copy(&path, wit_dir.join(file_name))?; + } + } + } Ok(()) } @@ -375,19 +389,25 @@ async fn build_wit_dir(process_dir: &Path) -> Result<()> { async fn compile_package_item( entry: std::io::Result, features: String, + apis: HashMap>, ) -> Result<()> { let entry = entry?; let path = entry.path(); if path.is_dir() { - build_wit_dir(&path).await?; + let is_rust_process = path.join(RUST_SRC_PATH).exists(); + let is_py_process = path.join(PYTHON_SRC_PATH).exists(); + let is_js_process = path.join(JAVASCRIPT_SRC_PATH).exists(); + if is_rust_process || is_py_process || is_js_process { + build_wit_dir(&path, &apis).await?; + } - if path.join(RUST_SRC_PATH).exists() { + if is_rust_process { compile_rust_wasm_process(&path, &features).await?; - } else if path.join(PYTHON_SRC_PATH).exists() { + } else if is_py_process { let python = get_python_version(None, None)? .ok_or_else(|| eyre!("kit requires Python 3.10 or newer"))?; compile_python_wasm_process(&path, &python).await?; - } else if path.join(JAVASCRIPT_SRC_PATH).exists() { + } else if is_js_process { let valid_node = get_newest_valid_node_version(None, None)?; compile_javascript_wasm_process(&path, valid_node).await?; } @@ -426,6 +446,7 @@ async fn compile_package( let mut checked_rust = false; let mut checked_py = false; let mut checked_js = false; + let mut apis = HashMap::new(); for entry in package_dir.read_dir()? { let entry = entry?; let path = entry.path(); @@ -449,17 +470,17 @@ async fn compile_package( if ext != "wit" { continue; } - let Some(path_str) = path.file_name().and_then(|s| s.to_str()) else { + let Some(file_name) = path.file_name().and_then(|s| s.to_str()) else { continue; }; - if path_str.starts_with(&format!( + if file_name.starts_with(&format!( "{}:{}-api", metadata.properties.package_name, metadata.properties.publisher, )) { - // Copy it into wit/ - let path_in_wit = package_dir.join("wit").join(path_str); - std::fs::copy(path, path_in_wit)?; + if let Ok(api_contents) = fs::read(&path) { + apis.insert(file_name.to_string(), api_contents); + } } } } @@ -467,7 +488,7 @@ async fn compile_package( let mut tasks = tokio::task::JoinSet::new(); let features = features.to_string(); for entry in package_dir.read_dir()? { - tasks.spawn(compile_package_item(entry, features.clone())); + tasks.spawn(compile_package_item(entry, features.clone(), apis.clone())); } while let Some(res) = tasks.join_next().await { res??; From c7df4fd7f81ad41b4adba7cf4b43fb7068eaf1bb Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Mon, 6 May 2024 20:05:53 -0700 Subject: [PATCH 03/33] add `view-api` --- src/lib.rs | 1 + src/main.rs | 40 ++++++++++++++- src/view_api/mod.rs | 121 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 src/view_api/mod.rs diff --git a/src/lib.rs b/src/lib.rs index a7de2593..b22da410 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,6 +10,7 @@ pub mod run_tests; pub mod setup; pub mod start_package; pub mod update; +pub mod view_api; pub const KIT_CACHE: &str = "/tmp/kinode-kit-cache"; pub const KIT_LOG_PATH_DEFAULT: &str = "/tmp/kinode-kit-cache/logs/log.log"; diff --git a/src/main.rs b/src/main.rs index 08b6a2e8..e98943c2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,6 +25,7 @@ use kit::{ setup, start_package, update, + view_api, KIT_LOG_PATH_DEFAULT, }; @@ -317,6 +318,20 @@ async fn execute( update::execute(args, branch) } + Some(("view-api", view_api_matches)) => { + let package_id = view_api_matches + .get_one::("PACKAGE_ID") + .and_then(|s: &String| Some(s.as_str())); + let url: String = match view_api_matches.get_one::("URL") { + Some(url) => url.clone(), + None => { + let port = view_api_matches.get_one::("NODE_PORT").unwrap(); + format!("http://localhost:{}", port) + } + }; + + view_api::execute(None, package_id, &url).await + } _ => { warn!("Invalid subcommand. Usage:\n{}", usage); Ok(()) @@ -682,7 +697,6 @@ async fn make_app(current_dir: &std::ffi::OsString) -> Result { .long("url") .help("Node URL (overrides NODE_PORT)") .required(false) - //.default_value("http://localhost:8080") ) ) .subcommand(Command::new("reset-cache") @@ -738,6 +752,30 @@ async fn make_app(current_dir: &std::ffi::OsString) -> Result { .default_value("master") ) ) + .subcommand(Command::new("view-api") + .about("Fetch the list of APIs or a specific API") + .visible_alias("v") + .arg(Arg::new("PACKAGE_ID") + .action(ArgAction::Set) + .help("Get API of this package (default: list all APIs)") + .required(false) + ) + .arg(Arg::new("NODE_PORT") + .action(ArgAction::Set) + .short('p') + .long("port") + .help("Node port: for use on localhost (overridden by URL)") + .default_value("8080") + .value_parser(value_parser!(u16)) + ) + .arg(Arg::new("URL") + .action(ArgAction::Set) + .short('u') + .long("url") + .help("Node URL (overrides NODE_PORT)") + .required(false) + ) + ) ) } diff --git a/src/view_api/mod.rs b/src/view_api/mod.rs new file mode 100644 index 00000000..039ed3fc --- /dev/null +++ b/src/view_api/mod.rs @@ -0,0 +1,121 @@ +use std::io::{Read, Write}; +use std::path::Path; + +use color_eyre::{Result, eyre::{eyre, WrapErr}}; +use fs_err as fs; +use serde_json::json; +use tracing::{info, instrument}; +use walkdir::WalkDir; +use zip::write::FileOptions; + +use kinode_process_lib::kernel_types::Erc721Metadata; + +use crate::{build::read_metadata, inject_message, KIT_LOG_PATH_DEFAULT}; + +#[instrument(level = "trace", skip_all)] +fn list_apis(node: Option<&str>) -> Result { + let message = json!("ListApis"); + + inject_message::make_message( + "main:app_store:sys", + Some(5), + &message.to_string(), + node, + None, + None, + ) +} + +#[instrument(level = "trace", skip_all)] +fn get_api( + node: Option<&str>, + package_name: &str, + publisher_node: &str, +) -> Result { + let message = json!({ + "GetApi": { + "package_name": package_name, + "publisher_node": publisher_node, + }, + }); + + inject_message::make_message( + "main:app_store:sys", + Some(5), + &message.to_string(), + node, + None, + None, + ) +} + +//#[instrument(level = "trace", skip_all)] +//fn zip_directory(directory: &Path, zip_filename: &str) -> Result<()> { +// let file = fs::File::create(zip_filename)?; +// let walkdir = WalkDir::new(directory); +// let it = walkdir.into_iter(); +// +// let mut zip = zip::ZipWriter::new(file); +// +// let options = FileOptions::default() +// .compression_method(zip::CompressionMethod::Stored) +// .unix_permissions(0o755); +// +// for entry in it { +// let entry = entry?; +// let path = entry.path(); +// let name = path.strip_prefix(Path::new(directory))?; +// +// if path.is_file() { +// zip.start_file(name.to_string_lossy(), options)?; +// let mut f = fs::File::open(path)?; +// let mut buffer = Vec::new(); +// f.read_to_end(&mut buffer)?; +// zip.write_all(&*buffer)?; +// } else if name.as_os_str().len() != 0 { +// // Only if it is not the root directory +// zip.add_directory(name.to_string_lossy(), options)?; +// } +// } +// +// zip.finish()?; +// Ok(()) +//} + +#[instrument(level = "trace", skip_all)] +pub async fn execute( + node: Option<&str>, + package_id: Option<&str>, + url: &str, +) -> Result<()> { + let request = if let Some(package_id) = package_id { + let mut pids = package_id.splitn(2, ':'); + let (Some(package_name), Some(publisher_node), None) = ( + pids.next(), + pids.next(), + pids.next(), + ) else { + return Err(eyre!("package_id must be None or Some(:)")); + }; + get_api(node, package_name, publisher_node)? + } else { + list_apis(node)? + }; + let response = inject_message::send_request(url, request).await?; + + let inject_message::Response { ref body, .. } = + inject_message::parse_response(response) + .await + .map_err(|e| { + let e_string = e.to_string(); + if e_string.contains("Failed with status code:") { + eyre!("{}\ncheck logs (default at {}) for full http response\n\nhint: is Kinode running at url {}?", e_string, KIT_LOG_PATH_DEFAULT, url) + } else { + eyre!(e_string) + } + })?; + let body = serde_json::from_str::(body)?; + info!("{}", serde_json::to_string_pretty(&body)?); + + Ok(()) +} From 70cc9dd6900b57a9e8587fe2541ba09d92958983 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Tue, 7 May 2024 12:01:59 -0700 Subject: [PATCH 04/33] move `wit/` dir into `target/` --- src/build/mod.rs | 23 +++++++++++-------- src/new/componentize.mjs | 2 +- .../templates/rust/no-ui/chat/send/src/lib.rs | 2 +- .../rust/no-ui/chat/{package_name}/src/lib.rs | 2 +- .../rust/no-ui/echo/{package_name}/src/lib.rs | 2 +- .../rust/no-ui/fibonacci/number/src/lib.rs | 2 +- .../no-ui/fibonacci/{package_name}/src/lib.rs | 2 +- .../no-ui/file_transfer/download/src/lib.rs | 2 +- .../no-ui/file_transfer/list_files/src/lib.rs | 2 +- .../no-ui/file_transfer/worker/src/lib.rs | 2 +- .../file_transfer/{package_name}/src/lib.rs | 2 +- .../rust/ui/chat/{package_name}/src/lib.rs | 2 +- 12 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/build/mod.rs b/src/build/mod.rs index 68d6412f..0786df05 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -166,7 +166,7 @@ async fn compile_python_wasm_process(process_dir: &Path, python: &str) -> Result run_command(Command::new("bash") .args(&[ "-c", - &format!("source ../{PY_VENV_NAME}/bin/activate && pip install {REQUIRED_PY_PACKAGE} && componentize-py -d ../wit/ -w process componentize lib -o ../../pkg/{wasm_file_name}.wasm"), + &format!("source ../{PY_VENV_NAME}/bin/activate && pip install {REQUIRED_PY_PACKAGE} && componentize-py -d ../target/wit/ -w process componentize lib -o ../../pkg/{wasm_file_name}.wasm"), ]) .current_dir(process_dir.join("src")) )?; @@ -183,7 +183,7 @@ async fn compile_rust_wasm_process( info!("Compiling Rust Kinode process in {:?}...", process_dir); // Paths - let wit_dir = process_dir.join("wit"); + let wit_dir = process_dir.join("target").join("wit"); let bindings_dir = process_dir .join("target") .join("bindings") @@ -366,7 +366,7 @@ async fn compile_package_and_ui( #[instrument(level = "trace", skip_all)] async fn build_wit_dir(process_dir: &Path, apis: &HashMap>) -> Result<()> { - let wit_dir = process_dir.join("wit"); + let wit_dir = process_dir.join("target").join("wit"); download_file(KINODE_WIT_URL, &wit_dir.join("kinode.wit")).await?; for (file_name, contents) in apis { fs::write(wit_dir.join(file_name), contents)?; @@ -418,24 +418,27 @@ async fn compile_package_item( /// package dir looks like: /// ``` /// metadata.json -/// my_package:publisher.os-api-v0.wit <- optional -/// api/ <- working dir +/// api/ <- optional +/// my_package:publisher.os-v0-api.wit /// pkg/ /// api.zip /// manifest.json /// process_i.wasm /// projess_j.wasm /// process_i/ +/// process_i.wit /// src/ /// lib.rs -/// process_i.wit -/// target/ <- working dir -/// wit/ <- working dir +/// target/ <- working +/// api/ +/// wit/ /// process_j/ /// src/ -/// target/ <- working dir -/// wit/ <- working dir +/// target/ <- working +/// api/ +/// wit/ /// ``` + #[instrument(level = "trace", skip_all)] async fn compile_package( package_dir: &Path, diff --git a/src/new/componentize.mjs b/src/new/componentize.mjs index 61c9dd1a..d4cec6da 100644 --- a/src/new/componentize.mjs +++ b/src/new/componentize.mjs @@ -9,7 +9,7 @@ if (!processName) { } const jsSource = await readFile('src/lib.js', 'utf8'); -const witPath = 'wit/kinode.wit'; +const witPath = 'target/wit/kinode.wit'; const { component } = await componentize(jsSource, { witPath: witPath, worldName: 'process', debug: false }); diff --git a/src/new/templates/rust/no-ui/chat/send/src/lib.rs b/src/new/templates/rust/no-ui/chat/send/src/lib.rs index 66c8b349..b1fe42b6 100644 --- a/src/new/templates/rust/no-ui/chat/send/src/lib.rs +++ b/src/new/templates/rust/no-ui/chat/send/src/lib.rs @@ -5,7 +5,7 @@ use kinode_process_lib::{ }; wit_bindgen::generate!({ - path: "wit", + path: "target/wit", world: "process", }); diff --git a/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs index 92c0ddc0..83f5612b 100644 --- a/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs @@ -4,7 +4,7 @@ use std::str::FromStr; use kinode_process_lib::{await_message, call_init, println, Address, ProcessId, Request, Response}; wit_bindgen::generate!({ - path: "wit", + path: "target/wit", world: "process", }); diff --git a/src/new/templates/rust/no-ui/echo/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/echo/{package_name}/src/lib.rs index 9e02fb06..895a75e7 100644 --- a/src/new/templates/rust/no-ui/echo/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/echo/{package_name}/src/lib.rs @@ -1,7 +1,7 @@ use kinode_process_lib::{await_message, call_init, println, Address, Response}; wit_bindgen::generate!({ - path: "wit", + path: "target/wit", world: "process", }); diff --git a/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs b/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs index ba0ede9f..967e5a14 100644 --- a/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs +++ b/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs @@ -5,7 +5,7 @@ use kinode_process_lib::{ }; wit_bindgen::generate!({ - path: "wit", + path: "target/wit", world: "process", }); diff --git a/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs index e57f072f..852fef2d 100644 --- a/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs @@ -2,7 +2,7 @@ use kinode_process_lib::{await_message, call_init, println, Address, Response}; use serde::{Deserialize, Serialize}; wit_bindgen::generate!({ - path: "wit", + path: "target/wit", world: "process", }); diff --git a/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs index 33afd7ec..6f99638a 100644 --- a/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs @@ -5,7 +5,7 @@ use kinode_process_lib::{ }; wit_bindgen::generate!({ - path: "wit", + path: "target/wit", world: "process", }); diff --git a/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs index 19b0ea44..e1785532 100644 --- a/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs @@ -5,7 +5,7 @@ use kinode_process_lib::{ }; wit_bindgen::generate!({ - path: "wit", + path: "target/wit", world: "process", }); diff --git a/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs index 10818a42..277adb0a 100644 --- a/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs @@ -8,7 +8,7 @@ use kinode_process_lib::{ }; wit_bindgen::generate!({ - path: "wit", + path: "target/wit", world: "process", }); diff --git a/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs index 01617259..03b010ca 100644 --- a/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs @@ -6,7 +6,7 @@ use kinode_process_lib::{ use serde::{Deserialize, Serialize}; wit_bindgen::generate!({ - path: "wit", + path: "target/wit", world: "process", }); diff --git a/src/new/templates/rust/ui/chat/{package_name}/src/lib.rs b/src/new/templates/rust/ui/chat/{package_name}/src/lib.rs index 78760a4b..209dca43 100644 --- a/src/new/templates/rust/ui/chat/{package_name}/src/lib.rs +++ b/src/new/templates/rust/ui/chat/{package_name}/src/lib.rs @@ -12,7 +12,7 @@ use kinode_process_lib::{ use serde::{Deserialize, Serialize}; wit_bindgen::generate!({ - path: "wit", + path: "target/wit", world: "process", }); From 3610cddc6559a0e92ff638683f2ebb5257464e2b Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Tue, 7 May 2024 17:07:24 -0700 Subject: [PATCH 05/33] get api viewing working --- src/boot_fake_node/mod.rs | 2 +- src/build/mod.rs | 61 ++++++++++++++++++++-------------- src/inject_message/mod.rs | 7 ++-- src/start_package/mod.rs | 2 +- src/view_api/mod.rs | 69 +++++++++++++++------------------------ 5 files changed, 68 insertions(+), 73 deletions(-) diff --git a/src/boot_fake_node/mod.rs b/src/boot_fake_node/mod.rs index 1842a68e..753f07dd 100644 --- a/src/boot_fake_node/mod.rs +++ b/src/boot_fake_node/mod.rs @@ -39,7 +39,7 @@ struct Asset { } #[instrument(level = "trace", skip_all)] -fn extract_zip(archive_path: &Path) -> Result<()> { +pub fn extract_zip(archive_path: &Path) -> Result<()> { let file = fs::File::open(archive_path)?; let mut archive = ZipArchive::new(file)?; diff --git a/src/build/mod.rs b/src/build/mod.rs index 0786df05..5a1cc8dc 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -14,6 +14,7 @@ use crate::setup::{ check_js_deps, check_py_deps, check_rust_deps, get_deps, get_newest_valid_node_version, get_python_version, REQUIRED_PY_PACKAGE, }; +use crate::start_package::zip_directory; const PY_VENV_NAME: &str = "process_env"; const JAVASCRIPT_SRC_PATH: &str = "src/lib.js"; @@ -418,23 +419,23 @@ async fn compile_package_item( /// package dir looks like: /// ``` /// metadata.json -/// api/ <- optional +/// api/ <- optional /// my_package:publisher.os-v0-api.wit /// pkg/ -/// api.zip +/// api.zip <- built /// manifest.json -/// process_i.wasm -/// projess_j.wasm +/// process_i.wasm <- built +/// projess_j.wasm <- built /// process_i/ -/// process_i.wit /// src/ /// lib.rs -/// target/ <- working +/// process_i.wit <- optional +/// target/ <- built /// api/ /// wit/ /// process_j/ /// src/ -/// target/ <- working +/// target/ <- built /// api/ /// wit/ /// ``` @@ -465,24 +466,34 @@ async fn compile_package( let deps = check_js_deps()?; get_deps(deps)?; checked_js = true; - } - } else if path.is_file() { - let Some(ext) = path.extension().and_then(|e| e.to_str()) else { - continue; - }; - if ext != "wit" { - continue; - } - let Some(file_name) = path.file_name().and_then(|s| s.to_str()) else { - continue; - }; - if file_name.starts_with(&format!( - "{}:{}-api", - metadata.properties.package_name, - metadata.properties.publisher, - )) { - if let Ok(api_contents) = fs::read(&path) { - apis.insert(file_name.to_string(), api_contents); + } else if Some("api") == path.file_name().and_then(|s| s.to_str()) { + // zip & place in pkg/: publish API inside Kinode + let zip_path = package_dir.join("pkg").join("api.zip"); + let zip_path = zip_path.to_str().unwrap(); + zip_directory(&path, zip_path)?; + + // read api files: to be used in build + for entry in path.read_dir()? { + let entry = entry?; + let path = entry.path(); + let Some(ext) = path.extension().and_then(|e| e.to_str()) else { + continue; + }; + if ext != "wit" { + continue; + } + let Some(file_name) = path.file_name().and_then(|s| s.to_str()) else { + continue; + }; + if file_name.starts_with(&format!( + "{}:{}-api", + metadata.properties.package_name, + metadata.properties.publisher, + )) { + if let Ok(api_contents) = fs::read(&path) { + apis.insert(file_name.to_string(), api_contents); + } + } } } } diff --git a/src/inject_message/mod.rs b/src/inject_message/mod.rs index 7d8bd07f..0a1fc818 100644 --- a/src/inject_message/mod.rs +++ b/src/inject_message/mod.rs @@ -140,6 +140,7 @@ pub async fn parse_response(response: reqwest::Response) -> Result { }) .ok_or_else(|| eyre!("Response did not contain `body` field."))??; + #[allow(deprecated)] let blob = data .get("lazy_load_blob") .and_then(|b| { @@ -174,12 +175,12 @@ pub async fn parse_response(response: reqwest::Response) -> Result { ))), } }) - .transpose()?; + .transpose()? + .and_then(|b| decode(b).ok()); - #[allow(deprecated)] Ok(Response { body, - lazy_load_blob_utf8: blob.clone().and_then(|b| decode(b).ok()).map(|b| String::from_utf8(b).ok()), + lazy_load_blob_utf8: blob.clone().map(|b| String::from_utf8(b).ok()), lazy_load_blob: blob, }) } diff --git a/src/start_package/mod.rs b/src/start_package/mod.rs index cf046420..3e0b295c 100644 --- a/src/start_package/mod.rs +++ b/src/start_package/mod.rs @@ -63,7 +63,7 @@ pub fn interact_with_package( } #[instrument(level = "trace", skip_all)] -fn zip_directory(directory: &Path, zip_filename: &str) -> Result<()> { +pub fn zip_directory(directory: &Path, zip_filename: &str) -> Result<()> { let file = fs::File::create(zip_filename)?; let walkdir = WalkDir::new(directory); let it = walkdir.into_iter(); diff --git a/src/view_api/mod.rs b/src/view_api/mod.rs index 039ed3fc..a0d73e9d 100644 --- a/src/view_api/mod.rs +++ b/src/view_api/mod.rs @@ -1,16 +1,11 @@ -use std::io::{Read, Write}; -use std::path::Path; +use std::path::PathBuf; -use color_eyre::{Result, eyre::{eyre, WrapErr}}; +use color_eyre::{Result, eyre::eyre}; use fs_err as fs; use serde_json::json; use tracing::{info, instrument}; -use walkdir::WalkDir; -use zip::write::FileOptions; -use kinode_process_lib::kernel_types::Erc721Metadata; - -use crate::{build::read_metadata, inject_message, KIT_LOG_PATH_DEFAULT}; +use crate::{boot_fake_node::extract_zip, inject_message, KIT_CACHE, KIT_LOG_PATH_DEFAULT}; #[instrument(level = "trace", skip_all)] fn list_apis(node: Option<&str>) -> Result { @@ -49,39 +44,6 @@ fn get_api( ) } -//#[instrument(level = "trace", skip_all)] -//fn zip_directory(directory: &Path, zip_filename: &str) -> Result<()> { -// let file = fs::File::create(zip_filename)?; -// let walkdir = WalkDir::new(directory); -// let it = walkdir.into_iter(); -// -// let mut zip = zip::ZipWriter::new(file); -// -// let options = FileOptions::default() -// .compression_method(zip::CompressionMethod::Stored) -// .unix_permissions(0o755); -// -// for entry in it { -// let entry = entry?; -// let path = entry.path(); -// let name = path.strip_prefix(Path::new(directory))?; -// -// if path.is_file() { -// zip.start_file(name.to_string_lossy(), options)?; -// let mut f = fs::File::open(path)?; -// let mut buffer = Vec::new(); -// f.read_to_end(&mut buffer)?; -// zip.write_all(&*buffer)?; -// } else if name.as_os_str().len() != 0 { -// // Only if it is not the root directory -// zip.add_directory(name.to_string_lossy(), options)?; -// } -// } -// -// zip.finish()?; -// Ok(()) -//} - #[instrument(level = "trace", skip_all)] pub async fn execute( node: Option<&str>, @@ -103,7 +65,7 @@ pub async fn execute( }; let response = inject_message::send_request(url, request).await?; - let inject_message::Response { ref body, .. } = + let inject_message::Response { ref body, ref lazy_load_blob, .. } = inject_message::parse_response(response) .await .map_err(|e| { @@ -115,7 +77,28 @@ pub async fn execute( } })?; let body = serde_json::from_str::(body)?; - info!("{}", serde_json::to_string_pretty(&body)?); + if let Some(blob) = lazy_load_blob { + let api_name = format!("{}-api", package_id.unwrap()); + let zip_dir = PathBuf::from(KIT_CACHE).join(api_name); + let zip_path = zip_dir.join(format!("{}-api.zip", package_id.unwrap())); + if zip_dir.exists() { + fs::remove_dir_all(&zip_dir)?; + } + fs::create_dir_all(&zip_dir)?; + fs::write(&zip_path, blob)?; + extract_zip(&zip_path)?; + for entry in zip_dir.read_dir()? { + let entry = entry?; + let path = entry.path(); + if Some("wit") == path.extension().and_then(|s| s.to_str()) { + let file_path = path.to_str().unwrap_or_default(); + let wit_contents = fs::read_to_string(&path)?; + info!("{}\n\n{}", file_path, wit_contents); + } + } + } else { + info!("{}", serde_json::to_string_pretty(&body)?); + } Ok(()) } From ed60bcbbd3476ef9f70886751d4ce0f24555c8b7 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Tue, 7 May 2024 19:54:30 -0700 Subject: [PATCH 06/33] build: fetch dependencies from node (not yet tested; TODOs on run-tests) --- Cargo.toml | 2 +- src/build/mod.rs | 46 +++++++++++++++++++++++++++++++--- src/build_start_package/mod.rs | 2 +- src/main.rs | 34 +++++++++++++++++++++++-- src/run_tests/mod.rs | 4 +-- src/view_api/mod.rs | 43 ++++++++++++++++++++----------- 6 files changed, 107 insertions(+), 24 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 07e2cf24..59578f70 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ dirs = "5.0" fs-err = "2.11" futures-util = "0.3" hex = "0.4" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "84b3d84" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "2aa3a1a" } nix = { version = "0.27", features = ["process", "signal", "term"] } regex = "1" reqwest = { version = "0.11", features = ["json"] } diff --git a/src/build/mod.rs b/src/build/mod.rs index 5a1cc8dc..8d224379 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -15,6 +15,7 @@ use crate::setup::{ REQUIRED_PY_PACKAGE, }; use crate::start_package::zip_directory; +use crate::view_api; const PY_VENV_NAME: &str = "process_env"; const JAVASCRIPT_SRC_PATH: &str = "src/lib.js"; @@ -359,9 +360,10 @@ async fn compile_package_and_ui( valid_node: Option, skip_deps_check: bool, features: &str, + url: Option, ) -> Result<()> { compile_and_copy_ui(package_dir, valid_node).await?; - compile_package(package_dir, skip_deps_check, features).await?; + compile_package(package_dir, skip_deps_check, features, url).await?; Ok(()) } @@ -416,6 +418,28 @@ async fn compile_package_item( Ok(()) } +async fn fetch_dependencies( + dependencies: &Vec, + apis: &mut HashMap>, + url: String, +) -> Result<()> { + for dependency in dependencies { + let Some(zip_dir) = view_api::execute(None, Some(dependency), &url, false).await? else { + return Err(eyre!("Got unexpected result from fetching API for {dependency}")); + }; + for entry in zip_dir.read_dir()? { + let entry = entry?; + let path = entry.path(); + if Some("wit") == path.extension().and_then(|s| s.to_str()) { + let file_name = path.file_name().and_then(|s| s.to_str()).unwrap_or_default(); + let wit_contents = fs::read(&path)?; + apis.insert(file_name.into(), wit_contents); + } + } + } + Ok(()) +} + /// package dir looks like: /// ``` /// metadata.json @@ -445,6 +469,7 @@ async fn compile_package( package_dir: &Path, skip_deps_check: bool, features: &str, + url: Option, ) -> Result<()> { let metadata = read_metadata(package_dir)?; let mut checked_rust = false; @@ -495,6 +520,19 @@ async fn compile_package( } } } + + // fetch dependency apis: to be used in build + if !metadata.properties.dependencies.is_empty() { + let Some(ref url) = url else { + // TODO: can we use kit-cached deps? + return Err(eyre!("Need a node to be able to fetch dependencies")); + }; + fetch_dependencies( + &metadata.properties.dependencies, + &mut apis, + url.clone(), + ).await?; + } } } } @@ -518,6 +556,7 @@ pub async fn execute( ui_only: bool, skip_deps_check: bool, features: &str, + url: Option, ) -> Result<()> { if !package_dir.join("pkg").exists() { return Err(eyre!( @@ -531,11 +570,11 @@ pub async fn execute( if ui_only { return Err(eyre!("kit build: can't build UI: no ui directory exists")); } else { - compile_package(package_dir, skip_deps_check, features).await + compile_package(package_dir, skip_deps_check, features, url).await } } else { if no_ui { - return compile_package(package_dir, skip_deps_check, features).await; + return compile_package(package_dir, skip_deps_check, features, url).await; } let deps = check_js_deps()?; @@ -550,6 +589,7 @@ pub async fn execute( valid_node, skip_deps_check, features, + url, ).await } } diff --git a/src/build_start_package/mod.rs b/src/build_start_package/mod.rs index 92d23f2b..94d5e52b 100644 --- a/src/build_start_package/mod.rs +++ b/src/build_start_package/mod.rs @@ -15,7 +15,7 @@ pub async fn execute( skip_deps_check: bool, features: &str, ) -> Result<()> { - build::execute(package_dir, no_ui, ui_only, skip_deps_check, features).await?; + build::execute(package_dir, no_ui, ui_only, skip_deps_check, features, Some(url.into())).await?; start_package::execute(package_dir, url).await?; Ok(()) } diff --git a/src/main.rs b/src/main.rs index e98943c2..98af402d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -170,8 +170,22 @@ async fn execute( Some(f) => f.clone(), None => "".into(), }; + let url: Option = match build_matches.get_one::("URL") { + Some(url) => Some(url.clone()), + None => { + build_matches.get_one::("NODE_PORT") + .map(|p| format!("http://localhost:{}", p)) + } + }; - build::execute(&package_dir, *no_ui, *ui_only, *skip_deps_check, &features).await + build::execute( + &package_dir, + *no_ui, + *ui_only, + *skip_deps_check, + &features, + url, + ).await } Some(("build-start-package", build_start_matches)) => { let package_dir = PathBuf::from(build_start_matches.get_one::("DIR").unwrap()); @@ -330,7 +344,8 @@ async fn execute( } }; - view_api::execute(None, package_id, &url).await + view_api::execute(None, package_id, &url, true).await?; + Ok(()) } _ => { warn!("Invalid subcommand. Usage:\n{}", usage); @@ -483,6 +498,21 @@ async fn make_app(current_dir: &std::ffi::OsString) -> Result { .help("Pass these comma-delimited feature flags to Rust cargo builds") .required(false) ) + .arg(Arg::new("NODE_PORT") + .action(ArgAction::Set) + .short('p') + .long("port") + .help("Node port: for use on localhost (overridden by URL)") + .value_parser(value_parser!(u16)) + .required(false) + ) + .arg(Arg::new("URL") + .action(ArgAction::Set) + .short('u') + .long("url") + .help("Node URL (overrides NODE_PORT)") + .required(false) + ) ) .subcommand(Command::new("build-start-package") .about("Build and start a Kinode package") diff --git a/src/run_tests/mod.rs b/src/run_tests/mod.rs index e810db5d..f9803d27 100644 --- a/src/run_tests/mod.rs +++ b/src/run_tests/mod.rs @@ -288,10 +288,10 @@ async fn run_tests( #[instrument(level = "trace", skip_all)] async fn handle_test(detached: bool, runtime_path: &Path, test: Test) -> Result<()> { for setup_package_path in &test.setup_package_paths { - build::execute(&setup_package_path, false, false, false, "").await?; + build::execute(&setup_package_path, false, false, false, "", None).await?; // TODO } for TestPackage { ref path, .. } in &test.test_packages { - build::execute(path, false, false, false, "").await?; + build::execute(path, false, false, false, "", None).await?; // TODO } // Initialize variables for master node and nodes list diff --git a/src/view_api/mod.rs b/src/view_api/mod.rs index a0d73e9d..6e7689f2 100644 --- a/src/view_api/mod.rs +++ b/src/view_api/mod.rs @@ -44,22 +44,29 @@ fn get_api( ) } +#[instrument(level = "trace", skip_all)] +fn split_package_id(package_id: &str) -> Result<(String, String)> { + let mut pids = package_id.splitn(2, ':'); + let (Some(package_name), Some(publisher_node), None) = ( + pids.next(), + pids.next(), + pids.next(), + ) else { + return Err(eyre!("package_id must be None or Some(:)")); + }; + Ok((package_name.to_string(), publisher_node.to_string())) +} + #[instrument(level = "trace", skip_all)] pub async fn execute( node: Option<&str>, package_id: Option<&str>, url: &str, -) -> Result<()> { + verbose: bool, +) -> Result> { let request = if let Some(package_id) = package_id { - let mut pids = package_id.splitn(2, ':'); - let (Some(package_name), Some(publisher_node), None) = ( - pids.next(), - pids.next(), - pids.next(), - ) else { - return Err(eyre!("package_id must be None or Some(:)")); - }; - get_api(node, package_name, publisher_node)? + let (package_name, publisher_node) = split_package_id(package_id)?; + get_api(node, &package_name, &publisher_node)? } else { list_apis(node)? }; @@ -77,7 +84,7 @@ pub async fn execute( } })?; let body = serde_json::from_str::(body)?; - if let Some(blob) = lazy_load_blob { + let zip_dir = if let Some(blob) = lazy_load_blob { let api_name = format!("{}-api", package_id.unwrap()); let zip_dir = PathBuf::from(KIT_CACHE).join(api_name); let zip_path = zip_dir.join(format!("{}-api.zip", package_id.unwrap())); @@ -93,12 +100,18 @@ pub async fn execute( if Some("wit") == path.extension().and_then(|s| s.to_str()) { let file_path = path.to_str().unwrap_or_default(); let wit_contents = fs::read_to_string(&path)?; - info!("{}\n\n{}", file_path, wit_contents); + if verbose { + info!("{}\n\n{}", file_path, wit_contents); + } } } + Some(zip_dir) } else { - info!("{}", serde_json::to_string_pretty(&body)?); - } + if verbose { + info!("{}", serde_json::to_string_pretty(&body)?); + } + None + }; - Ok(()) + Ok(zip_dir) } From f7ad2e9c5e14142e5f7feed83ac54e2968eaac90 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Wed, 8 May 2024 17:18:06 -0700 Subject: [PATCH 07/33] new: update rust ui-less chat to use wit api --- src/new/mod.rs | 27 ++++++++ .../api/{package_name}:{publisher}-api-v0.wit | 22 +++++++ .../templates/rust/no-ui/chat/metadata.json | 5 +- .../templates/rust/no-ui/chat/send/src/lib.rs | 27 +++----- .../no-ui/chat/send/src/{package_name}.wit | 4 ++ .../rust/no-ui/chat/{package_name}/src/lib.rs | 62 +++++++++++-------- .../{package_name}/src/{package_name}.wit | 4 ++ 7 files changed, 102 insertions(+), 49 deletions(-) create mode 100644 src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit create mode 100644 src/new/templates/rust/no-ui/chat/send/src/{package_name}.wit create mode 100644 src/new/templates/rust/no-ui/chat/{package_name}/src/{package_name}.wit diff --git a/src/new/mod.rs b/src/new/mod.rs index 647afa42..bb28e405 100644 --- a/src/new/mod.rs +++ b/src/new/mod.rs @@ -66,9 +66,36 @@ impl From<&String> for Template { } fn replace_vars(input: &str, package_name: &str, publisher: &str) -> String { + let (publisher_dotted_cab, publisher_dotted_hep) = { + let publisher_dotted = publisher.split('.'); + if publisher_dotted.clone().count() == 1 { + (publisher.to_string(), publisher.to_string()) + } else { + let publisher_dotted_cab = publisher_dotted + .clone() + .fold(String::new(), |mut pd, item| { + if !pd.is_empty() { + pd.push_str("_dot_"); + } + pd.push_str(item); + pd + }); + let publisher_dotted_hep = publisher_dotted + .fold(String::new(), |mut pd, item| { + if !pd.is_empty() { + pd.push_str("-dot-"); + } + pd.push_str(item); + pd + }); + (publisher_dotted_cab, publisher_dotted_hep) + } + }; input .replace("{package_name}", package_name) .replace("{publisher}", publisher) + .replace("{publisher_dotted_cab}", &publisher_dotted_cab) + .replace("{publisher_dotted_hep}", &publisher_dotted_hep) .replace("Cargo.toml_", "Cargo.toml") .to_string() } diff --git a/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit b/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit new file mode 100644 index 00000000..12e54fca --- /dev/null +++ b/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit @@ -0,0 +1,22 @@ +interface {package_name}-{publisher_dotted_hep}-api-v0 { + variant chat-request { + send(send-request), + /// history of chat with given node + history(string), + } + + variant chat-response { + send, + history(list), + } + + record send-request { + target: string, + message: string, + } + + record chat-message { + author: string, + content: string, + } +} diff --git a/src/new/templates/rust/no-ui/chat/metadata.json b/src/new/templates/rust/no-ui/chat/metadata.json index 675ada88..944b2bb4 100644 --- a/src/new/templates/rust/no-ui/chat/metadata.json +++ b/src/new/templates/rust/no-ui/chat/metadata.json @@ -9,8 +9,9 @@ "mirrors": [], "code_hashes": { "0.1.0": "" - } + }, + "dependencies": [] }, "external_url": "", "animation_url": "" -} \ No newline at end of file +} diff --git a/src/new/templates/rust/no-ui/chat/send/src/lib.rs b/src/new/templates/rust/no-ui/chat/send/src/lib.rs index b1fe42b6..8da70d3e 100644 --- a/src/new/templates/rust/no-ui/chat/send/src/lib.rs +++ b/src/new/templates/rust/no-ui/chat/send/src/lib.rs @@ -1,28 +1,15 @@ -use serde::{Deserialize, Serialize}; - +use crate::kinode::process::{package_name}_{publisher_dotted_cab}_api_v0::{ChatRequest, ChatResponse, SendRequest}; use kinode_process_lib::{ await_next_message_body, call_init, println, Address, Message, Request, }; wit_bindgen::generate!({ path: "target/wit", - world: "process", + world: "{package_name}", + generate_unused_types: true, + additional_derives: [serde::Deserialize, serde::Serialize], }); -#[derive(Debug, Serialize, Deserialize)] -enum ChatRequest { - Send { target: String, message: String }, - History, -} - -#[derive(Debug, Serialize, Deserialize)] -enum ChatResponse { - Ack, - History { messages: MessageArchive }, -} - -type MessageArchive = Vec<(String, String)>; - call_init!(init); fn init(our: Address) { let Ok(body) = await_next_message_body() else { @@ -40,10 +27,10 @@ fn init(our: Address) { let Ok(Ok(Message::Response { body, .. })) = Request::to((our.node(), ("{package_name}", "{package_name}", "{publisher}"))) .body( - serde_json::to_vec(&ChatRequest::Send { + serde_json::to_vec(&ChatRequest::Send(SendRequest { target: target.into(), message: message.into(), - }) + })) .unwrap(), ) .send_and_await_response(5) @@ -52,7 +39,7 @@ fn init(our: Address) { return; }; - let Ok(ChatResponse::Ack) = serde_json::from_slice(&body) else { + let Ok(ChatResponse::Send) = serde_json::from_slice(&body) else { println!("did not receive expected Ack from {package_name}:{package_name}:{publisher}"); return; }; diff --git a/src/new/templates/rust/no-ui/chat/send/src/{package_name}.wit b/src/new/templates/rust/no-ui/chat/send/src/{package_name}.wit new file mode 100644 index 00000000..22f12571 --- /dev/null +++ b/src/new/templates/rust/no-ui/chat/send/src/{package_name}.wit @@ -0,0 +1,4 @@ +world {package_name} { + import {package_name}-{publisher_dotted_hep}-api-v0; + include process; +} diff --git a/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs index 83f5612b..0d998e32 100644 --- a/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs @@ -1,26 +1,19 @@ -use serde::{Deserialize, Serialize}; +use std::collections::HashMap; use std::str::FromStr; +use serde::{Deserialize, Serialize}; + +use crate::kinode::process::{package_name}_{publisher_dotted_cab}_api_v0::{ChatMessage, ChatRequest, ChatResponse, SendRequest}; use kinode_process_lib::{await_message, call_init, println, Address, ProcessId, Request, Response}; wit_bindgen::generate!({ path: "target/wit", - world: "process", + world: "{package_name}", + generate_unused_types: true, + additional_derives: [serde::Deserialize, serde::Serialize], }); -#[derive(Debug, Serialize, Deserialize)] -enum ChatRequest { - Send { target: String, message: String }, - History, -} - -#[derive(Debug, Serialize, Deserialize)] -enum ChatResponse { - Ack, - History { messages: MessageArchive }, -} - -type MessageArchive = Vec<(String, String)>; +type MessageArchive = HashMap>; fn handle_message(our: &Address, message_archive: &mut MessageArchive) -> anyhow::Result<()> { let message = await_message()?; @@ -32,13 +25,20 @@ fn handle_message(our: &Address, message_archive: &mut MessageArchive) -> anyhow let body = message.body(); let source = message.source(); match serde_json::from_slice(body)? { - ChatRequest::Send { + ChatRequest::Send(SendRequest { ref target, ref message, - } => { + }) => { if target == &our.node { println!("{}: {}", source.node, message); - message_archive.push((source.node.clone(), message.clone())); + let message = ChatMessage { + author: source.node.clone(), + content: message.into(), + }; + message_archive + .entry(source.node.clone()) + .and_modify(|e| e.push(message.clone())) + .or_insert(vec![message]); } else { let _ = Request::new() .target(Address { @@ -50,20 +50,28 @@ fn handle_message(our: &Address, message_archive: &mut MessageArchive) -> anyhow .body(body) .send_and_await_response(5)? .unwrap(); + let message = ChatMessage { + author: our.node.clone(), + content: message.into(), + }; + message_archive + .entry(target.clone()) + .and_modify(|e| e.push(message.clone())) + .or_insert(vec![message]); } Response::new() - .body(serde_json::to_vec(&ChatResponse::Ack).unwrap()) + .body(serde_json::to_vec(&ChatResponse::Send).unwrap()) .send() .unwrap(); } - ChatRequest::History => { + ChatRequest::History(ref node) => { Response::new() - .body( - serde_json::to_vec(&ChatResponse::History { - messages: message_archive.clone(), - }) - .unwrap(), - ) + .body(serde_json::to_vec(&ChatResponse::History( + message_archive + .get(node) + .map(|msgs| msgs.clone()) + .unwrap_or_default() + )).unwrap()) .send() .unwrap(); } @@ -75,7 +83,7 @@ call_init!(init); fn init(our: Address) { println!("begin"); - let mut message_archive: MessageArchive = Vec::new(); + let mut message_archive = HashMap::new(); loop { match handle_message(&our, &mut message_archive) { diff --git a/src/new/templates/rust/no-ui/chat/{package_name}/src/{package_name}.wit b/src/new/templates/rust/no-ui/chat/{package_name}/src/{package_name}.wit new file mode 100644 index 00000000..22f12571 --- /dev/null +++ b/src/new/templates/rust/no-ui/chat/{package_name}/src/{package_name}.wit @@ -0,0 +1,4 @@ +world {package_name} { + import {package_name}-{publisher_dotted_hep}-api-v0; + include process; +} From 5565ced63727e07d3742cc1871bb2966c4f98a92 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Thu, 9 May 2024 10:59:14 -0700 Subject: [PATCH 08/33] convert rust no-ui fibonacci to wit api --- .../api/{package_name}:{publisher}-api-v0.wit | 11 +++++++++ .../rust/no-ui/fibonacci/metadata.json | 5 ++-- .../rust/no-ui/fibonacci/number/src/lib.rs | 23 +++++------------- .../fibonacci/number/src/{package_name}.wit | 4 ++++ .../no-ui/fibonacci/{package_name}/src/lib.rs | 24 ++++++------------- .../{package_name}/src/{package_name}.wit | 4 ++++ 6 files changed, 35 insertions(+), 36 deletions(-) create mode 100644 src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-api-v0.wit create mode 100644 src/new/templates/rust/no-ui/fibonacci/number/src/{package_name}.wit create mode 100644 src/new/templates/rust/no-ui/fibonacci/{package_name}/src/{package_name}.wit diff --git a/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-api-v0.wit b/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-api-v0.wit new file mode 100644 index 00000000..52c65c14 --- /dev/null +++ b/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-api-v0.wit @@ -0,0 +1,11 @@ +interface {package_name}-{publisher_dotted_hep}-api-v0 { + variant fibonacci-request { + number(u32), + numbers(tuple), + } + + variant fibonacci-response { + number(u64), + numbers(tuple), + } +} diff --git a/src/new/templates/rust/no-ui/fibonacci/metadata.json b/src/new/templates/rust/no-ui/fibonacci/metadata.json index 675ada88..944b2bb4 100644 --- a/src/new/templates/rust/no-ui/fibonacci/metadata.json +++ b/src/new/templates/rust/no-ui/fibonacci/metadata.json @@ -9,8 +9,9 @@ "mirrors": [], "code_hashes": { "0.1.0": "" - } + }, + "dependencies": [] }, "external_url": "", "animation_url": "" -} \ No newline at end of file +} diff --git a/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs b/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs index 967e5a14..cb47afaf 100644 --- a/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs +++ b/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs @@ -1,29 +1,18 @@ -use serde::{Deserialize, Serialize}; - +use crate::kinode::process::{package_name}_{publisher_dotted_cab}_api_v0::{FibonacciRequest, FibonacciResponse}; use kinode_process_lib::{ - await_next_request_body, call_init, println, Address, Message, Request, + await_next_message_body, call_init, println, Address, Message, Request, }; wit_bindgen::generate!({ path: "target/wit", - world: "process", + world: "{package_name}", + generate_unused_types: true, + additional_derives: [serde::Deserialize, serde::Serialize], }); -#[derive(Debug, Serialize, Deserialize)] -enum FibonacciRequest { - Number(u32), - Numbers((u32, u32)), -} - -#[derive(Debug, Serialize, Deserialize)] -enum FibonacciResponse { - Number(u128), - Numbers((u128, u32)), -} - call_init!(init); fn init(our: Address) { - let Ok(body) = await_next_request_body() else { + let Ok(body) = await_next_message_body() else { println!("failed to get args!"); return; }; diff --git a/src/new/templates/rust/no-ui/fibonacci/number/src/{package_name}.wit b/src/new/templates/rust/no-ui/fibonacci/number/src/{package_name}.wit new file mode 100644 index 00000000..22f12571 --- /dev/null +++ b/src/new/templates/rust/no-ui/fibonacci/number/src/{package_name}.wit @@ -0,0 +1,4 @@ +world {package_name} { + import {package_name}-{publisher_dotted_hep}-api-v0; + include process; +} diff --git a/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs index 852fef2d..d731c3c9 100644 --- a/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs @@ -1,27 +1,17 @@ +use crate::kinode::process::{package_name}_{publisher_dotted_cab}_api_v0::{FibonacciRequest, FibonacciResponse}; use kinode_process_lib::{await_message, call_init, println, Address, Response}; -use serde::{Deserialize, Serialize}; wit_bindgen::generate!({ path: "target/wit", - world: "process", + world: "{package_name}", + generate_unused_types: true, + additional_derives: [serde::Deserialize, serde::Serialize], }); -#[derive(Debug, Serialize, Deserialize)] -enum FibonacciRequest { - Number(u32), - Numbers((u32, u32)), -} - -#[derive(Debug, Serialize, Deserialize)] -enum FibonacciResponse { - Number(u128), - Numbers((u128, u32)), -} - /// calculate the nth Fibonacci number -/// since we are using u128, the maximum number -/// we can calculate is the 186th Fibonacci number -fn fibonacci(n: u32) -> u128 { +/// since we are using u64, the maximum number +/// we can calculate is the 93rd Fibonacci number +fn fibonacci(n: u32) -> u64 { if n == 0 { return 0; } diff --git a/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/{package_name}.wit b/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/{package_name}.wit new file mode 100644 index 00000000..22f12571 --- /dev/null +++ b/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/{package_name}.wit @@ -0,0 +1,4 @@ +world {package_name} { + import {package_name}-{publisher_dotted_hep}-api-v0; + include process; +} From c48c5e2fbc1db13e729ad0836585abefd900798d Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Fri, 10 May 2024 11:27:06 -0700 Subject: [PATCH 09/33] move more processes to wit api; add py & js build changes --- src/build/mod.rs | 97 ++++++++++++++++--- src/build_start_package/mod.rs | 11 ++- src/main.rs | 18 ++++ src/new/componentize.mjs | 12 ++- src/new/mod.rs | 71 ++++++++------ .../javascript/no-ui/chat/metadata.json | 5 +- .../javascript/no-ui/echo/metadata.json | 5 +- .../javascript/no-ui/fibonacci/metadata.json | 5 +- .../api/{package_name}:{publisher}-api-v0.wit | 22 +++++ .../templates/python/no-ui/chat/metadata.json | 5 +- .../no-ui/chat/{package_name}/src/lib.py | 37 +++++-- .../{package_name}/src/{package_name}.wit | 4 + .../templates/python/no-ui/echo/metadata.json | 5 +- .../python/no-ui/fibonacci/metadata.json | 5 +- .../api/{package_name}:{publisher}-api-v0.wit | 2 +- .../templates/rust/no-ui/chat/send/src/lib.rs | 2 +- .../no-ui/chat/send/src/{package_name}.wit | 2 +- .../rust/no-ui/chat/{package_name}/src/lib.rs | 2 +- .../{package_name}/src/{package_name}.wit | 2 +- .../templates/rust/no-ui/echo/metadata.json | 5 +- .../api/{package_name}:{publisher}-api-v0.wit | 2 +- .../rust/no-ui/fibonacci/number/src/lib.rs | 2 +- .../fibonacci/number/src/{package_name}.wit | 2 +- .../no-ui/fibonacci/{package_name}/src/lib.rs | 2 +- .../{package_name}/src/{package_name}.wit | 2 +- .../rust/no-ui/file_transfer/metadata.json | 3 +- src/new/templates/rust/ui/chat/metadata.json | 5 +- src/run_tests/mod.rs | 4 +- 28 files changed, 259 insertions(+), 80 deletions(-) create mode 100644 src/new/templates/python/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit create mode 100644 src/new/templates/python/no-ui/chat/{package_name}/src/{package_name}.wit diff --git a/src/build/mod.rs b/src/build/mod.rs index 8d224379..d3957900 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -24,6 +24,7 @@ const RUST_SRC_PATH: &str = "src/lib.rs"; const KINODE_WIT_URL: &str = "https://raw.githubusercontent.com/kinode-dao/kinode-wit/aa2c8b11c9171b949d1991c32f58591c0e881f85/kinode.wit"; const WASI_VERSION: &str = "19.0.1"; // TODO: un-hardcode +const DEFAULT_WORLD: &str = "process"; #[derive(Debug, Clone, Serialize, Deserialize)] struct CargoFile { @@ -106,10 +107,55 @@ pub fn read_metadata(package_dir: &Path) -> Result { Ok(metadata) } +/// Regex to dynamically capture the world name after 'world' +#[instrument(level = "trace", skip_all)] +fn extract_world(data: &str) -> Option { + let re = regex::Regex::new(r"world\s+(\w+)\s*\{").unwrap(); + re.captures(data).and_then(|caps| caps.get(1).map(|match_| match_.as_str().to_string())) +} + +#[instrument(level = "trace", skip_all)] +fn extract_worlds_from_files(directory: &Path) -> Vec { + let mut worlds = vec![]; + + // Safe to return early if directory reading fails + let entries = match fs::read_dir(directory) { + Ok(entries) => entries, + Err(_) => return worlds, + }; + + for entry in entries.filter_map(Result::ok) { + let path = entry.path(); + if !path.is_file() + || Some("kinode.wit") == path.file_name().and_then(|s| s.to_str()) + || Some("wit") != path.extension().and_then(|s| s.to_str()) { + continue; + } + let contents = fs::read_to_string(&path).unwrap_or_default(); + if let Some(world) = extract_world(&contents) { + worlds.push(world); + } + } + + worlds +} + +#[instrument(level = "trace", skip_all)] +fn get_world_or_default(directory: &Path, default_world: Option) -> String { + let worlds = extract_worlds_from_files(directory); + if worlds.len() == 1 { + return worlds[0].clone(); + } + let default_world = default_world.unwrap_or_else(|| DEFAULT_WORLD.to_string()); + warn!("Found {} worlds in {directory:?}; defaulting to {default_world}", worlds.len()); + default_world +} + #[instrument(level = "trace", skip_all)] async fn compile_javascript_wasm_process( process_dir: &Path, valid_node: Option, + default_world: Option, ) -> Result<()> { info!( "Compiling Javascript Kinode process in {:?}...", @@ -117,9 +163,10 @@ async fn compile_javascript_wasm_process( ); let wasm_file_name = process_dir.file_name().and_then(|s| s.to_str()).unwrap(); + let world_name = get_world_or_default(&process_dir.join("target").join("wit"), default_world); let install = "npm install".to_string(); - let componentize = format!("node componentize.mjs {wasm_file_name}"); + let componentize = format!("node componentize.mjs {wasm_file_name} {world_name}"); let (install, componentize) = valid_node .map(|valid_node| { ( @@ -155,10 +202,23 @@ async fn compile_javascript_wasm_process( } #[instrument(level = "trace", skip_all)] -async fn compile_python_wasm_process(process_dir: &Path, python: &str) -> Result<()> { +async fn compile_python_wasm_process( + process_dir: &Path, + python: &str, + default_world: Option, +) -> Result<()> { info!("Compiling Python Kinode process in {:?}...", process_dir); let wasm_file_name = process_dir.file_name().and_then(|s| s.to_str()).unwrap(); + let world_name = get_world_or_default(&process_dir.join("target").join("wit"), default_world); + + let source = format!("source ../{PY_VENV_NAME}/bin/activate"); + let install = format!("pip install {REQUIRED_PY_PACKAGE}"); + let componentize = format!( + "componentize-py -d ../target/wit/ -w {} componentize lib -o ../../pkg/{}.wasm", + world_name, + wasm_file_name, + ); run_command( Command::new(python) @@ -166,10 +226,7 @@ async fn compile_python_wasm_process(process_dir: &Path, python: &str) -> Result .current_dir(process_dir), )?; run_command(Command::new("bash") - .args(&[ - "-c", - &format!("source ../{PY_VENV_NAME}/bin/activate && pip install {REQUIRED_PY_PACKAGE} && componentize-py -d ../target/wit/ -w process componentize lib -o ../../pkg/{wasm_file_name}.wasm"), - ]) + .args(&["-c", &format!("{source} && {install} && {componentize}")]) .current_dir(process_dir.join("src")) )?; @@ -361,9 +418,10 @@ async fn compile_package_and_ui( skip_deps_check: bool, features: &str, url: Option, + default_world: Option, ) -> Result<()> { compile_and_copy_ui(package_dir, valid_node).await?; - compile_package(package_dir, skip_deps_check, features, url).await?; + compile_package(package_dir, skip_deps_check, features, url, default_world).await?; Ok(()) } @@ -393,6 +451,7 @@ async fn compile_package_item( entry: std::io::Result, features: String, apis: HashMap>, + default_world: Option, ) -> Result<()> { let entry = entry?; let path = entry.path(); @@ -409,10 +468,10 @@ async fn compile_package_item( } else if is_py_process { let python = get_python_version(None, None)? .ok_or_else(|| eyre!("kit requires Python 3.10 or newer"))?; - compile_python_wasm_process(&path, &python).await?; + compile_python_wasm_process(&path, &python, default_world).await?; } else if is_js_process { let valid_node = get_newest_valid_node_version(None, None)?; - compile_javascript_wasm_process(&path, valid_node).await?; + compile_javascript_wasm_process(&path, valid_node, default_world).await?; } } Ok(()) @@ -470,6 +529,7 @@ async fn compile_package( skip_deps_check: bool, features: &str, url: Option, + default_world: Option, ) -> Result<()> { let metadata = read_metadata(package_dir)?; let mut checked_rust = false; @@ -540,7 +600,12 @@ async fn compile_package( let mut tasks = tokio::task::JoinSet::new(); let features = features.to_string(); for entry in package_dir.read_dir()? { - tasks.spawn(compile_package_item(entry, features.clone(), apis.clone())); + tasks.spawn(compile_package_item( + entry, + features.clone(), + apis.clone(), + default_world.clone(), + )); } while let Some(res) = tasks.join_next().await { res??; @@ -557,6 +622,7 @@ pub async fn execute( skip_deps_check: bool, features: &str, url: Option, + default_world: Option, ) -> Result<()> { if !package_dir.join("pkg").exists() { return Err(eyre!( @@ -570,11 +636,17 @@ pub async fn execute( if ui_only { return Err(eyre!("kit build: can't build UI: no ui directory exists")); } else { - compile_package(package_dir, skip_deps_check, features, url).await + compile_package(package_dir, skip_deps_check, features, url, default_world).await } } else { if no_ui { - return compile_package(package_dir, skip_deps_check, features, url).await; + return compile_package( + package_dir, + skip_deps_check, + features, + url, + default_world, + ).await; } let deps = check_js_deps()?; @@ -590,6 +662,7 @@ pub async fn execute( skip_deps_check, features, url, + default_world, ).await } } diff --git a/src/build_start_package/mod.rs b/src/build_start_package/mod.rs index 94d5e52b..50e79062 100644 --- a/src/build_start_package/mod.rs +++ b/src/build_start_package/mod.rs @@ -14,8 +14,17 @@ pub async fn execute( url: &str, skip_deps_check: bool, features: &str, + default_world: Option, ) -> Result<()> { - build::execute(package_dir, no_ui, ui_only, skip_deps_check, features, Some(url.into())).await?; + build::execute( + package_dir, + no_ui, + ui_only, + skip_deps_check, + features, + Some(url.into()), + default_world, + ).await?; start_package::execute(package_dir, url).await?; Ok(()) } diff --git a/src/main.rs b/src/main.rs index 98af402d..3c7d3563 100644 --- a/src/main.rs +++ b/src/main.rs @@ -177,6 +177,7 @@ async fn execute( .map(|p| format!("http://localhost:{}", p)) } }; + let default_world = build_matches.get_one::("WORLD"); build::execute( &package_dir, @@ -185,6 +186,7 @@ async fn execute( *skip_deps_check, &features, url, + default_world.cloned(), ).await } Some(("build-start-package", build_start_matches)) => { @@ -207,6 +209,7 @@ async fn execute( Some(f) => f.clone(), None => "".into(), }; + let default_world = build_start_matches.get_one::("WORLD"); build_start_package::execute( &package_dir, @@ -215,6 +218,7 @@ async fn execute( &url, *skip_deps_check, &features, + default_world.cloned(), ) .await } @@ -513,6 +517,13 @@ async fn make_app(current_dir: &std::ffi::OsString) -> Result { .help("Node URL (overrides NODE_PORT)") .required(false) ) + .arg(Arg::new("WORLD") + .action(ArgAction::Set) + .short('w') + .long("world") + .help("Fallback WIT world name") + .required(false) + ) ) .subcommand(Command::new("build-start-package") .about("Build and start a Kinode package") @@ -537,6 +548,13 @@ async fn make_app(current_dir: &std::ffi::OsString) -> Result { .help("Node URL (overrides NODE_PORT)") .required(false) ) + .arg(Arg::new("WORLD") + .action(ArgAction::Set) + .short('w') + .long("world") + .help("Fallback WIT world name") + .required(false) + ) .arg(Arg::new("NO_UI") .action(ArgAction::SetTrue) .long("no-ui") diff --git a/src/new/componentize.mjs b/src/new/componentize.mjs index d4cec6da..0c5a6f99 100644 --- a/src/new/componentize.mjs +++ b/src/new/componentize.mjs @@ -3,14 +3,18 @@ import { readFile, writeFile } from 'node:fs/promises'; // Retrieve the package name from command line arguments const processName = process.argv[2]; -if (!processName) { - console.error('Please provide a process name (e.g. `node componentize.mjs process_name`).'); +const worldName = process.argv[3]; +if (!processName || !worldName) { + console.error('usage:\nnode componentize.mjs processName worldName'); process.exit(1); } const jsSource = await readFile('src/lib.js', 'utf8'); -const witPath = 'target/wit/kinode.wit'; +const witPath = 'target/wit'; -const { component } = await componentize(jsSource, { witPath: witPath, worldName: 'process', debug: false }); +const { component } = await componentize( + jsSource, + { witPath: witPath, worldName: worldName, debug: false }, +); await writeFile(`../pkg/${processName}.wasm`, component); diff --git a/src/new/mod.rs b/src/new/mod.rs index bb28e405..9ae3a6ed 100644 --- a/src/new/mod.rs +++ b/src/new/mod.rs @@ -65,37 +65,54 @@ impl From<&String> for Template { } } -fn replace_vars(input: &str, package_name: &str, publisher: &str) -> String { - let (publisher_dotted_cab, publisher_dotted_hep) = { - let publisher_dotted = publisher.split('.'); - if publisher_dotted.clone().count() == 1 { - (publisher.to_string(), publisher.to_string()) - } else { - let publisher_dotted_cab = publisher_dotted - .clone() - .fold(String::new(), |mut pd, item| { - if !pd.is_empty() { - pd.push_str("_dot_"); - } - pd.push_str(item); - pd - }); - let publisher_dotted_hep = publisher_dotted - .fold(String::new(), |mut pd, item| { - if !pd.is_empty() { - pd.push_str("-dot-"); - } - pd.push_str(item); - pd - }); - (publisher_dotted_cab, publisher_dotted_hep) +fn snake_to_upper_camel_case(input: &str) -> String { + let parts: Vec<&str> = input.split('_').collect(); + let mut camel_case = String::new(); + + for part in parts { + if let Some(first_char) = part.chars().next() { + camel_case.push_str(&first_char.to_uppercase().to_string()); + camel_case.push_str(&part[first_char.len_utf8()..]); } - }; + } + camel_case +} + +fn replace_dots(input: &str) -> (String, String) { + let dotted = input.split('.'); + if dotted.clone().count() == 1 { + (input.to_string(), input.to_string()) + } else { + let dotted_snake = dotted + .clone() + .fold(String::new(), |mut d, item| { + if !d.is_empty() { + d.push_str("_dot_"); + } + d.push_str(item); + d + }); + let dotted_kebab = dotted + .fold(String::new(), |mut d, item| { + if !d.is_empty() { + d.push_str("-dot-"); + } + d.push_str(item); + d + }); + (dotted_snake, dotted_kebab) + } +} + +fn replace_vars(input: &str, package_name: &str, publisher: &str) -> String { + let (publisher_dotted_snake, publisher_dotted_kebab) = replace_dots(publisher); + let package_name_upper_camel = snake_to_upper_camel_case(package_name); input .replace("{package_name}", package_name) + .replace("{package_name_upper_camel}", &package_name_upper_camel) .replace("{publisher}", publisher) - .replace("{publisher_dotted_cab}", &publisher_dotted_cab) - .replace("{publisher_dotted_hep}", &publisher_dotted_hep) + .replace("{publisher_dotted_snake}", &publisher_dotted_snake) + .replace("{publisher_dotted_kebab}", &publisher_dotted_kebab) .replace("Cargo.toml_", "Cargo.toml") .to_string() } diff --git a/src/new/templates/javascript/no-ui/chat/metadata.json b/src/new/templates/javascript/no-ui/chat/metadata.json index 675ada88..944b2bb4 100644 --- a/src/new/templates/javascript/no-ui/chat/metadata.json +++ b/src/new/templates/javascript/no-ui/chat/metadata.json @@ -9,8 +9,9 @@ "mirrors": [], "code_hashes": { "0.1.0": "" - } + }, + "dependencies": [] }, "external_url": "", "animation_url": "" -} \ No newline at end of file +} diff --git a/src/new/templates/javascript/no-ui/echo/metadata.json b/src/new/templates/javascript/no-ui/echo/metadata.json index 675ada88..944b2bb4 100644 --- a/src/new/templates/javascript/no-ui/echo/metadata.json +++ b/src/new/templates/javascript/no-ui/echo/metadata.json @@ -9,8 +9,9 @@ "mirrors": [], "code_hashes": { "0.1.0": "" - } + }, + "dependencies": [] }, "external_url": "", "animation_url": "" -} \ No newline at end of file +} diff --git a/src/new/templates/javascript/no-ui/fibonacci/metadata.json b/src/new/templates/javascript/no-ui/fibonacci/metadata.json index 675ada88..944b2bb4 100644 --- a/src/new/templates/javascript/no-ui/fibonacci/metadata.json +++ b/src/new/templates/javascript/no-ui/fibonacci/metadata.json @@ -9,8 +9,9 @@ "mirrors": [], "code_hashes": { "0.1.0": "" - } + }, + "dependencies": [] }, "external_url": "", "animation_url": "" -} \ No newline at end of file +} diff --git a/src/new/templates/python/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit b/src/new/templates/python/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit new file mode 100644 index 00000000..0e4fd006 --- /dev/null +++ b/src/new/templates/python/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit @@ -0,0 +1,22 @@ +interface {package_name}-{publisher_dotted_kebab}-api-v0 { + variant chat-request { + send(send-request), + /// history of chat with given node + history(string), + } + + variant chat-response { + send, + history(list), + } + + record send-request { + target: string, + message: string, + } + + record chat-message { + author: string, + content: string, + } +} diff --git a/src/new/templates/python/no-ui/chat/metadata.json b/src/new/templates/python/no-ui/chat/metadata.json index 675ada88..944b2bb4 100644 --- a/src/new/templates/python/no-ui/chat/metadata.json +++ b/src/new/templates/python/no-ui/chat/metadata.json @@ -9,8 +9,9 @@ "mirrors": [], "code_hashes": { "0.1.0": "" - } + }, + "dependencies": [] }, "external_url": "", "animation_url": "" -} \ No newline at end of file +} diff --git a/src/new/templates/python/no-ui/chat/{package_name}/src/lib.py b/src/new/templates/python/no-ui/chat/{package_name}/src/lib.py index 172c95bc..cbdc7d83 100644 --- a/src/new/templates/python/no-ui/chat/{package_name}/src/lib.py +++ b/src/new/templates/python/no-ui/chat/{package_name}/src/lib.py @@ -1,7 +1,7 @@ import json -import process -from process.imports.standard import ( +import {package_name} +from {package_name}.imports.standard import ( Address, MessageRequest, MessageResponse, @@ -13,7 +13,7 @@ send_and_await_response, send_response, ) -from process.types import Err +from {package_name}.types import Err def parse_address(address_string): node, _, rest = address_string.partition("@") @@ -23,6 +23,17 @@ def parse_address(address_string): return node, process, package, publisher +def add_to_archive(conversation, author, content, message_archive): + message = { + "author": author, + "content": content, + } + if conversation in message_archive[conversation]: + message_archive[conversation].append(message) + else: + message_archive[conversation] = [message] + return message_archive + def handle_message(our_node, message_archive): result = receive() if isinstance(result, Err): @@ -37,8 +48,13 @@ def handle_message(our_node, message_archive): if "Send" in body: target, message_text = body["Send"]["target"], body["Send"]["message"] if target == our_node: - print_to_terminal(0, f"{package_name}|{source.node}: {message_text}") - message_archive[source.node] = message_text + print_to_terminal(0, f"{source.node}: {message_text}") + message_archive = add_to_archive( + source.node, + source.node, + message_text, + message_archive, + ) else: send_and_await_response( Address( @@ -48,15 +64,22 @@ def handle_message(our_node, message_archive): Request(False, 5, message.value.body, None, []), None, ) + message_archive = add_to_archive( + target, + our_node, + message_text, + message_archive, + ) send_response( Response(False, json.dumps({"Ack": None}).encode("utf-8"), None, []), None, ) elif "History" in body: + node = body["History"] send_response( Response( False, - json.dumps({"History": {"messages": message_archive}}).encode("utf-8"), + json.dumps({"History": message_archive.get(node, [])}).encode("utf-8"), None, [], ), @@ -67,7 +90,7 @@ def handle_message(our_node, message_archive): return message_archive -class Process(process.Process): +class {package_name_upper_camel}({package_name}.{package_name_upper_camel}): def init(self, our): print_to_terminal(0, "{package_name}: begin (python)") diff --git a/src/new/templates/python/no-ui/chat/{package_name}/src/{package_name}.wit b/src/new/templates/python/no-ui/chat/{package_name}/src/{package_name}.wit new file mode 100644 index 00000000..b4cc5591 --- /dev/null +++ b/src/new/templates/python/no-ui/chat/{package_name}/src/{package_name}.wit @@ -0,0 +1,4 @@ +world {package_name} { + import {package_name}-{publisher_dotted_kebab}-api-v0; + include process; +} diff --git a/src/new/templates/python/no-ui/echo/metadata.json b/src/new/templates/python/no-ui/echo/metadata.json index 675ada88..944b2bb4 100644 --- a/src/new/templates/python/no-ui/echo/metadata.json +++ b/src/new/templates/python/no-ui/echo/metadata.json @@ -9,8 +9,9 @@ "mirrors": [], "code_hashes": { "0.1.0": "" - } + }, + "dependencies": [] }, "external_url": "", "animation_url": "" -} \ No newline at end of file +} diff --git a/src/new/templates/python/no-ui/fibonacci/metadata.json b/src/new/templates/python/no-ui/fibonacci/metadata.json index 675ada88..944b2bb4 100644 --- a/src/new/templates/python/no-ui/fibonacci/metadata.json +++ b/src/new/templates/python/no-ui/fibonacci/metadata.json @@ -9,8 +9,9 @@ "mirrors": [], "code_hashes": { "0.1.0": "" - } + }, + "dependencies": [] }, "external_url": "", "animation_url": "" -} \ No newline at end of file +} diff --git a/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit b/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit index 12e54fca..0e4fd006 100644 --- a/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit +++ b/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit @@ -1,4 +1,4 @@ -interface {package_name}-{publisher_dotted_hep}-api-v0 { +interface {package_name}-{publisher_dotted_kebab}-api-v0 { variant chat-request { send(send-request), /// history of chat with given node diff --git a/src/new/templates/rust/no-ui/chat/send/src/lib.rs b/src/new/templates/rust/no-ui/chat/send/src/lib.rs index 8da70d3e..24d86b1e 100644 --- a/src/new/templates/rust/no-ui/chat/send/src/lib.rs +++ b/src/new/templates/rust/no-ui/chat/send/src/lib.rs @@ -1,4 +1,4 @@ -use crate::kinode::process::{package_name}_{publisher_dotted_cab}_api_v0::{ChatRequest, ChatResponse, SendRequest}; +use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{ChatRequest, ChatResponse, SendRequest}; use kinode_process_lib::{ await_next_message_body, call_init, println, Address, Message, Request, }; diff --git a/src/new/templates/rust/no-ui/chat/send/src/{package_name}.wit b/src/new/templates/rust/no-ui/chat/send/src/{package_name}.wit index 22f12571..b4cc5591 100644 --- a/src/new/templates/rust/no-ui/chat/send/src/{package_name}.wit +++ b/src/new/templates/rust/no-ui/chat/send/src/{package_name}.wit @@ -1,4 +1,4 @@ world {package_name} { - import {package_name}-{publisher_dotted_hep}-api-v0; + import {package_name}-{publisher_dotted_kebab}-api-v0; include process; } diff --git a/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs index 0d998e32..a85f7c81 100644 --- a/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs @@ -3,7 +3,7 @@ use std::str::FromStr; use serde::{Deserialize, Serialize}; -use crate::kinode::process::{package_name}_{publisher_dotted_cab}_api_v0::{ChatMessage, ChatRequest, ChatResponse, SendRequest}; +use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{ChatMessage, ChatRequest, ChatResponse, SendRequest}; use kinode_process_lib::{await_message, call_init, println, Address, ProcessId, Request, Response}; wit_bindgen::generate!({ diff --git a/src/new/templates/rust/no-ui/chat/{package_name}/src/{package_name}.wit b/src/new/templates/rust/no-ui/chat/{package_name}/src/{package_name}.wit index 22f12571..b4cc5591 100644 --- a/src/new/templates/rust/no-ui/chat/{package_name}/src/{package_name}.wit +++ b/src/new/templates/rust/no-ui/chat/{package_name}/src/{package_name}.wit @@ -1,4 +1,4 @@ world {package_name} { - import {package_name}-{publisher_dotted_hep}-api-v0; + import {package_name}-{publisher_dotted_kebab}-api-v0; include process; } diff --git a/src/new/templates/rust/no-ui/echo/metadata.json b/src/new/templates/rust/no-ui/echo/metadata.json index 675ada88..944b2bb4 100644 --- a/src/new/templates/rust/no-ui/echo/metadata.json +++ b/src/new/templates/rust/no-ui/echo/metadata.json @@ -9,8 +9,9 @@ "mirrors": [], "code_hashes": { "0.1.0": "" - } + }, + "dependencies": [] }, "external_url": "", "animation_url": "" -} \ No newline at end of file +} diff --git a/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-api-v0.wit b/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-api-v0.wit index 52c65c14..74be9210 100644 --- a/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-api-v0.wit +++ b/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-api-v0.wit @@ -1,4 +1,4 @@ -interface {package_name}-{publisher_dotted_hep}-api-v0 { +interface {package_name}-{publisher_dotted_kebab}-api-v0 { variant fibonacci-request { number(u32), numbers(tuple), diff --git a/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs b/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs index cb47afaf..69d7d4a5 100644 --- a/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs +++ b/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs @@ -1,4 +1,4 @@ -use crate::kinode::process::{package_name}_{publisher_dotted_cab}_api_v0::{FibonacciRequest, FibonacciResponse}; +use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{FibonacciRequest, FibonacciResponse}; use kinode_process_lib::{ await_next_message_body, call_init, println, Address, Message, Request, }; diff --git a/src/new/templates/rust/no-ui/fibonacci/number/src/{package_name}.wit b/src/new/templates/rust/no-ui/fibonacci/number/src/{package_name}.wit index 22f12571..b4cc5591 100644 --- a/src/new/templates/rust/no-ui/fibonacci/number/src/{package_name}.wit +++ b/src/new/templates/rust/no-ui/fibonacci/number/src/{package_name}.wit @@ -1,4 +1,4 @@ world {package_name} { - import {package_name}-{publisher_dotted_hep}-api-v0; + import {package_name}-{publisher_dotted_kebab}-api-v0; include process; } diff --git a/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs index d731c3c9..7aba17e0 100644 --- a/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs @@ -1,4 +1,4 @@ -use crate::kinode::process::{package_name}_{publisher_dotted_cab}_api_v0::{FibonacciRequest, FibonacciResponse}; +use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{FibonacciRequest, FibonacciResponse}; use kinode_process_lib::{await_message, call_init, println, Address, Response}; wit_bindgen::generate!({ diff --git a/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/{package_name}.wit b/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/{package_name}.wit index 22f12571..b4cc5591 100644 --- a/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/{package_name}.wit +++ b/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/{package_name}.wit @@ -1,4 +1,4 @@ world {package_name} { - import {package_name}-{publisher_dotted_hep}-api-v0; + import {package_name}-{publisher_dotted_kebab}-api-v0; include process; } diff --git a/src/new/templates/rust/no-ui/file_transfer/metadata.json b/src/new/templates/rust/no-ui/file_transfer/metadata.json index f621b7d7..944b2bb4 100644 --- a/src/new/templates/rust/no-ui/file_transfer/metadata.json +++ b/src/new/templates/rust/no-ui/file_transfer/metadata.json @@ -9,7 +9,8 @@ "mirrors": [], "code_hashes": { "0.1.0": "" - } + }, + "dependencies": [] }, "external_url": "", "animation_url": "" diff --git a/src/new/templates/rust/ui/chat/metadata.json b/src/new/templates/rust/ui/chat/metadata.json index 675ada88..944b2bb4 100644 --- a/src/new/templates/rust/ui/chat/metadata.json +++ b/src/new/templates/rust/ui/chat/metadata.json @@ -9,8 +9,9 @@ "mirrors": [], "code_hashes": { "0.1.0": "" - } + }, + "dependencies": [] }, "external_url": "", "animation_url": "" -} \ No newline at end of file +} diff --git a/src/run_tests/mod.rs b/src/run_tests/mod.rs index f9803d27..952d00b0 100644 --- a/src/run_tests/mod.rs +++ b/src/run_tests/mod.rs @@ -288,10 +288,10 @@ async fn run_tests( #[instrument(level = "trace", skip_all)] async fn handle_test(detached: bool, runtime_path: &Path, test: Test) -> Result<()> { for setup_package_path in &test.setup_package_paths { - build::execute(&setup_package_path, false, false, false, "", None).await?; // TODO + build::execute(&setup_package_path, false, false, false, "", None, None).await?; // TODO } for TestPackage { ref path, .. } in &test.test_packages { - build::execute(path, false, false, false, "", None).await?; // TODO + build::execute(path, false, false, false, "", None, None).await?; // TODO } // Initialize variables for master node and nodes list From 75e5cdfdeb273b311ac8c6b7dc800c4071bdd309 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Fri, 10 May 2024 16:51:26 -0700 Subject: [PATCH 10/33] file_transfer to wit --- .../rust/no-ui/chat/{package_name}/src/lib.rs | 2 - .../api/{package_name}:{publisher}-api-v0.wit | 48 ++++++++++++++ .../no-ui/file_transfer/download/Cargo.toml_ | 2 +- .../no-ui/file_transfer/download/src/lib.rs | 4 +- .../file_transfer/list_files/Cargo.toml_ | 2 +- .../no-ui/file_transfer/list_files/src/lib.rs | 4 +- .../no-ui/file_transfer/worker/Cargo.toml_ | 2 +- .../no-ui/file_transfer/worker/src/lib.rs | 50 +++++---------- .../worker/src/{package_name}.wit | 4 ++ .../file_transfer/{package_name}/Cargo.toml_ | 2 +- .../file_transfer/{package_name}/src/lib.rs | 62 ++++++------------- .../{package_name}/src/{package_name}.wit | 4 ++ 12 files changed, 97 insertions(+), 89 deletions(-) create mode 100644 src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-api-v0.wit create mode 100644 src/new/templates/rust/no-ui/file_transfer/worker/src/{package_name}.wit create mode 100644 src/new/templates/rust/no-ui/file_transfer/{package_name}/src/{package_name}.wit diff --git a/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs index a85f7c81..42db2528 100644 --- a/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs @@ -1,8 +1,6 @@ use std::collections::HashMap; use std::str::FromStr; -use serde::{Deserialize, Serialize}; - use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{ChatMessage, ChatRequest, ChatResponse, SendRequest}; use kinode_process_lib::{await_message, call_init, println, Address, ProcessId, Request, Response}; diff --git a/src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-api-v0.wit b/src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-api-v0.wit new file mode 100644 index 00000000..ba25d35d --- /dev/null +++ b/src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-api-v0.wit @@ -0,0 +1,48 @@ +interface {package_name}-{publisher_dotted_kebab}-api-v0 { + use standard.{address}; + + variant transfer-request { + list-files, + download(download-request), + progress(progress-request), + } + + variant transfer-response { + list-files(list), + download, + done, + started, + } + + variant worker-request { + initialize(initialize-request), + chunk(chunk-request), + size(u64), + } + + record download-request { + name: string, + target: address, + } + + record progress-request { + name: string, + progress: u64, + } + + record file-info { + name: string, + size: u64, + } + + record initialize-request { + name: string, + target-worker: option
, + } + + record chunk-request { + name: string, + offset: u64, + length: u64, + } +} diff --git a/src/new/templates/rust/no-ui/file_transfer/download/Cargo.toml_ b/src/new/templates/rust/no-ui/file_transfer/download/Cargo.toml_ index dcc06a91..6f709749 100644 --- a/src/new/templates/rust/no-ui/file_transfer/download/Cargo.toml_ +++ b/src/new/templates/rust/no-ui/file_transfer/download/Cargo.toml_ @@ -5,7 +5,7 @@ edition = "2021" [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "2aa3a1a" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" wit-bindgen = "0.24.0" diff --git a/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs index 6f99638a..4142d88c 100644 --- a/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs @@ -1,7 +1,7 @@ use serde::{Deserialize, Serialize}; use kinode_process_lib::{ - await_next_request_body, call_init, println, Address, Message, Request, + await_next_message_body, call_init, println, Address, Message, Request, }; wit_bindgen::generate!({ @@ -32,7 +32,7 @@ pub struct FileInfo { call_init!(init); fn init(our: Address) { - let Ok(body) = await_next_request_body() else { + let Ok(body) = await_next_message_body() else { println!("failed to get args!"); return; }; diff --git a/src/new/templates/rust/no-ui/file_transfer/list_files/Cargo.toml_ b/src/new/templates/rust/no-ui/file_transfer/list_files/Cargo.toml_ index 7eb0aad6..719c8c3f 100644 --- a/src/new/templates/rust/no-ui/file_transfer/list_files/Cargo.toml_ +++ b/src/new/templates/rust/no-ui/file_transfer/list_files/Cargo.toml_ @@ -5,7 +5,7 @@ edition = "2021" [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "2aa3a1a" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" wit-bindgen = "0.24.0" diff --git a/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs index e1785532..c22674ec 100644 --- a/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs @@ -1,7 +1,7 @@ use serde::{Deserialize, Serialize}; use kinode_process_lib::{ - await_next_request_body, call_init, println, Address, Message, Request, + await_next_message_body, call_init, println, Address, Message, Request, }; wit_bindgen::generate!({ @@ -32,7 +32,7 @@ pub struct FileInfo { call_init!(init); fn init(our: Address) { - let Ok(body) = await_next_request_body() else { + let Ok(body) = await_next_message_body() else { println!("failed to get args!"); return; }; diff --git a/src/new/templates/rust/no-ui/file_transfer/worker/Cargo.toml_ b/src/new/templates/rust/no-ui/file_transfer/worker/Cargo.toml_ index f5aaef3d..24838943 100644 --- a/src/new/templates/rust/no-ui/file_transfer/worker/Cargo.toml_ +++ b/src/new/templates/rust/no-ui/file_transfer/worker/Cargo.toml_ @@ -6,7 +6,7 @@ edition = "2021" [dependencies] anyhow = "1.0" bincode = "1.3.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "2aa3a1a" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" wit-bindgen = "0.24.0" diff --git a/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs index 277adb0a..ae4abd5a 100644 --- a/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs @@ -1,6 +1,6 @@ -use serde::{Deserialize, Serialize}; use std::str::FromStr; +use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{TransferRequest, WorkerRequest, ProgressRequest, InitializeRequest, ChunkRequest}; use kinode_process_lib::{ await_message, call_init, get_blob, println, vfs::{open_dir, open_file, Directory, File, SeekFrom}, @@ -9,32 +9,13 @@ use kinode_process_lib::{ wit_bindgen::generate!({ path: "target/wit", - world: "process", + world: "{package_name}", + generate_unused_types: true, + additional_derives: [serde::Deserialize, serde::Serialize], }); const CHUNK_SIZE: u64 = 1048576; // 1MB -#[derive(Serialize, Deserialize, Debug)] -pub enum WorkerRequest { - Initialize { - name: String, - target_worker: Option
, - }, - Chunk { - name: String, - offset: u64, - length: u64, - }, - Size(u64), -} - -#[derive(Serialize, Deserialize, Debug)] -pub enum TransferRequest { - ListFiles, - Download { name: String, target: Address }, - Progress { name: String, progress: u64 }, -} - fn handle_message( our: &Address, file: &mut Option, @@ -48,13 +29,11 @@ fn handle_message( ref body, .. } => { - let request = serde_json::from_slice::(body)?; - - match request { - WorkerRequest::Initialize { + match serde_json::from_slice(body)? { + WorkerRequest::Initialize(InitializeRequest { name, target_worker, - } => { + }) => { // initialize command from main process, // sets up worker, matches on if it's a sender or receiver. // target_worker = None, we are receiver, else sender. @@ -64,7 +43,8 @@ fn handle_message( open_file(&format!("{}/{}", files_dir.path, &name), true, None)?; match target_worker { - Some(target_worker) => { + Some(ref target_worker) => { + let target_worker: Address = serde_json::from_str(&serde_json::to_string(target_worker)?)?; // we have a target, chunk the data, and send it. let size = active_file.metadata()?.len; let num_chunks = (size as f64 / CHUNK_SIZE as f64).ceil() as u64; @@ -85,11 +65,11 @@ fn handle_message( active_file.read_at(&mut buffer)?; Request::new() - .body(serde_json::to_vec(&WorkerRequest::Chunk { + .body(serde_json::to_vec(&WorkerRequest::Chunk(ChunkRequest { name: name.clone(), offset, length, - })?) + }))?) .target(target_worker.clone()) .blob_bytes(buffer) .send()?; @@ -107,11 +87,11 @@ fn handle_message( } } // someone sending a chunk to us! - WorkerRequest::Chunk { + WorkerRequest::Chunk(ChunkRequest { name, offset, length, - } => { + }) => { let file = match file { Some(file) => file, None => { @@ -143,10 +123,10 @@ fn handle_message( }; Request::new() - .body(serde_json::to_vec(&TransferRequest::Progress { + .body(serde_json::to_vec(&TransferRequest::Progress(ProgressRequest { name, progress, - })?) + }))?) .target(&main_app) .send()?; diff --git a/src/new/templates/rust/no-ui/file_transfer/worker/src/{package_name}.wit b/src/new/templates/rust/no-ui/file_transfer/worker/src/{package_name}.wit new file mode 100644 index 00000000..b4cc5591 --- /dev/null +++ b/src/new/templates/rust/no-ui/file_transfer/worker/src/{package_name}.wit @@ -0,0 +1,4 @@ +world {package_name} { + import {package_name}-{publisher_dotted_kebab}-api-v0; + include process; +} diff --git a/src/new/templates/rust/no-ui/file_transfer/{package_name}/Cargo.toml_ b/src/new/templates/rust/no-ui/file_transfer/{package_name}/Cargo.toml_ index 64320709..b8884cf5 100644 --- a/src/new/templates/rust/no-ui/file_transfer/{package_name}/Cargo.toml_ +++ b/src/new/templates/rust/no-ui/file_transfer/{package_name}/Cargo.toml_ @@ -6,7 +6,7 @@ edition = "2021" [dependencies] anyhow = "1.0" bincode = "1.3.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", tag = "v0.6.0" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "2aa3a1a" } multipart = "0.18.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs index 03b010ca..6731e4b7 100644 --- a/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs @@ -1,44 +1,17 @@ +use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{Address as WitAddress, TransferRequest, TransferResponse, WorkerRequest, DownloadRequest, ProgressRequest, FileInfo, InitializeRequest, ChunkRequest}; use kinode_process_lib::{ await_message, call_init, our_capabilities, println, spawn, vfs::{create_drive, metadata, open_dir, Directory, FileType}, Address, OnExit, Request, Response, }; -use serde::{Deserialize, Serialize}; wit_bindgen::generate!({ path: "target/wit", - world: "process", + world: "{package_name}", + generate_unused_types: true, + additional_derives: [serde::Deserialize, serde::Serialize], }); -#[derive(Serialize, Deserialize, Debug)] -pub enum TransferRequest { - ListFiles, - Download { name: String, target: Address }, - Progress { name: String, progress: u64 }, -} - -#[derive(Serialize, Deserialize, Debug)] -pub enum TransferResponse { - ListFiles(Vec), - Download { name: String, worker: Address }, - Done, - Started, -} - -#[derive(Serialize, Deserialize, Debug)] -pub struct FileInfo { - pub name: String, - pub size: u64, -} - -#[derive(Serialize, Deserialize, Debug)] -pub enum WorkerRequest { - Initialize { - name: String, - target_worker: Option
, - }, -} - fn ls_files(files_dir: &Directory) -> anyhow::Result> { let entries = files_dir.read()?; let files: Vec = entries @@ -64,9 +37,7 @@ fn handle_transfer_request( body: &[u8], files_dir: &Directory, ) -> anyhow::Result<()> { - let transfer_request = serde_json::from_slice::(body)?; - - match transfer_request { + match serde_json::from_slice(body)? { TransferRequest::ListFiles => { let files = ls_files(files_dir)?; @@ -74,7 +45,7 @@ fn handle_transfer_request( .body(serde_json::to_vec(&TransferResponse::ListFiles(files))?) .send()?; } - TransferRequest::Download { name, target } => { + TransferRequest::Download(DownloadRequest { name, ref target }) => { // spin up a worker, initialize based on whether it's a downloader or a sender. let our_worker = spawn( None, @@ -89,37 +60,40 @@ fn handle_transfer_request( node: our.node.clone(), process: our_worker, }; + let our_worker_wit_address = serde_json::from_str(&serde_json::to_string(&our_worker_address)?)?; if source.node == our.node { // we want to download a file let _resp = Request::new() - .body(serde_json::to_vec(&WorkerRequest::Initialize { + .body(serde_json::to_vec(&WorkerRequest::Initialize(InitializeRequest { name: name.clone(), target_worker: None, - })?) + }))?) .target(&our_worker_address) .send_and_await_response(5)??; // send our initialized worker address to the other node + let target = serde_json::from_str(&serde_json::to_string(target)?)?; Request::new() - .body(serde_json::to_vec(&TransferRequest::Download { + .body(serde_json::to_vec(&TransferRequest::Download(DownloadRequest { name: name.clone(), - target: our_worker_address, - })?) + target: our_worker_wit_address, + }))?) .target(&target) + //.target(&target.into()) .send()?; } else { // they want to download a file Request::new() - .body(serde_json::to_vec(&WorkerRequest::Initialize { + .body(serde_json::to_vec(&WorkerRequest::Initialize(InitializeRequest { name: name.clone(), - target_worker: Some(target), - })?) + target_worker: Some(target.clone()), + }))?) .target(&our_worker_address) .send()?; } } - TransferRequest::Progress { name, progress } => { + TransferRequest::Progress(ProgressRequest { name, progress }) => { println!("{} progress: {}%", name, progress); } } diff --git a/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/{package_name}.wit b/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/{package_name}.wit new file mode 100644 index 00000000..b4cc5591 --- /dev/null +++ b/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/{package_name}.wit @@ -0,0 +1,4 @@ +world {package_name} { + import {package_name}-{publisher_dotted_kebab}-api-v0; + include process; +} From 104034a2a7dad52775cd9ec8e9df589c61ea6429 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Fri, 10 May 2024 17:34:15 -0700 Subject: [PATCH 11/33] use wit api in file_transfer scripts --- .../no-ui/file_transfer/download/src/lib.rs | 35 +++++-------------- .../download/src/{package_name}.wit | 4 +++ .../no-ui/file_transfer/list_files/src/lib.rs | 28 +++------------ .../list_files/src/{package_name}.wit | 4 +++ 4 files changed, 20 insertions(+), 51 deletions(-) create mode 100644 src/new/templates/rust/no-ui/file_transfer/download/src/{package_name}.wit create mode 100644 src/new/templates/rust/no-ui/file_transfer/list_files/src/{package_name}.wit diff --git a/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs index 4142d88c..06d142f8 100644 --- a/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs @@ -1,35 +1,15 @@ -use serde::{Deserialize, Serialize}; - +use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{Address as WitAddress, TransferRequest, DownloadRequest}; use kinode_process_lib::{ await_next_message_body, call_init, println, Address, Message, Request, }; wit_bindgen::generate!({ path: "target/wit", - world: "process", + world: "{package_name}", + generate_unused_types: true, + additional_derives: [serde::Deserialize, serde::Serialize], }); -#[derive(Serialize, Deserialize, Debug)] -pub enum TransferRequest { - ListFiles, - Download { name: String, target: Address }, - Progress { name: String, progress: u64 }, -} - -#[derive(Serialize, Deserialize, Debug)] -pub enum TransferResponse { - ListFiles(Vec), - Download { name: String, worker: Address }, - Done, - Started, -} - -#[derive(Serialize, Deserialize, Debug)] -pub struct FileInfo { - pub name: String, - pub size: u64, -} - call_init!(init); fn init(our: Address) { let Ok(body) = await_next_message_body() else { @@ -49,16 +29,17 @@ fn init(our: Address) { let target: Address = format!("{}@{package_name}:{package_name}:{publisher}", who) .parse() .unwrap(); + let target: WitAddress = serde_json::from_str(&serde_json::to_string(&target).unwrap()).unwrap(); let Ok(Ok(Message::Response { .. })) = Request::to(our) - .body(serde_json::to_vec(&TransferRequest::Download { + .body(serde_json::to_vec(&TransferRequest::Download(DownloadRequest { name: name.into(), target: target.clone(), - }).unwrap()) + })).unwrap()) .send_and_await_response(5) else { - println!("did not receive expected Response from {target}"); + println!("did not receive expected Response from {target:?}"); return; }; } diff --git a/src/new/templates/rust/no-ui/file_transfer/download/src/{package_name}.wit b/src/new/templates/rust/no-ui/file_transfer/download/src/{package_name}.wit new file mode 100644 index 00000000..b4cc5591 --- /dev/null +++ b/src/new/templates/rust/no-ui/file_transfer/download/src/{package_name}.wit @@ -0,0 +1,4 @@ +world {package_name} { + import {package_name}-{publisher_dotted_kebab}-api-v0; + include process; +} diff --git a/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs index c22674ec..57916742 100644 --- a/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs @@ -1,35 +1,15 @@ -use serde::{Deserialize, Serialize}; - +use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{TransferRequest, TransferResponse}; use kinode_process_lib::{ await_next_message_body, call_init, println, Address, Message, Request, }; wit_bindgen::generate!({ path: "target/wit", - world: "process", + world: "{package_name}", + generate_unused_types: true, + additional_derives: [serde::Deserialize, serde::Serialize], }); -#[derive(Serialize, Deserialize, Debug)] -pub enum TransferRequest { - ListFiles, - Download { name: String, target: Address }, - Progress { name: String, progress: u64 }, -} - -#[derive(Serialize, Deserialize, Debug)] -pub enum TransferResponse { - ListFiles(Vec), - Download { name: String, worker: Address }, - Done, - Started, -} - -#[derive(Serialize, Deserialize, Debug)] -pub struct FileInfo { - pub name: String, - pub size: u64, -} - call_init!(init); fn init(our: Address) { let Ok(body) = await_next_message_body() else { diff --git a/src/new/templates/rust/no-ui/file_transfer/list_files/src/{package_name}.wit b/src/new/templates/rust/no-ui/file_transfer/list_files/src/{package_name}.wit new file mode 100644 index 00000000..b4cc5591 --- /dev/null +++ b/src/new/templates/rust/no-ui/file_transfer/list_files/src/{package_name}.wit @@ -0,0 +1,4 @@ +world {package_name} { + import {package_name}-{publisher_dotted_kebab}-api-v0; + include process; +} From 39189b59993a386d6e0df7f2d9470091ef5c8922 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Fri, 10 May 2024 17:50:18 -0700 Subject: [PATCH 12/33] behave better when github throttled --- Cargo.lock | 3357 ------------------------------------- src/boot_fake_node/mod.rs | 14 +- src/main.rs | 17 +- 3 files changed, 22 insertions(+), 3366 deletions(-) delete mode 100644 Cargo.lock diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index c5040f19..00000000 --- a/Cargo.lock +++ /dev/null @@ -1,3357 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aes" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", -] - -[[package]] -name = "alloy-json-rpc" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=6f8ebb4#6f8ebb45afca1a201a11d421ec46db0f7a1d8d08" -dependencies = [ - "alloy-primitives", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "alloy-primitives" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "600d34d8de81e23b6d909c094e23b3d357e01ca36b78a8c5424c501eedbe86f0" -dependencies = [ - "alloy-rlp", - "bytes", - "cfg-if", - "const-hex", - "derive_more", - "hex-literal", - "itoa", - "k256", - "keccak-asm", - "proptest", - "rand", - "ruint", - "serde", - "tiny-keccak", -] - -[[package]] -name = "alloy-rlp" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" -dependencies = [ - "alloy-rlp-derive", - "arrayvec", - "bytes", -] - -[[package]] -name = "alloy-rlp-derive" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "alloy-rpc-types" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=6f8ebb4#6f8ebb45afca1a201a11d421ec46db0f7a1d8d08" -dependencies = [ - "alloy-primitives", - "alloy-rlp", - "itertools 0.12.1", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "alloy-transport" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy.git?rev=6f8ebb4#6f8ebb45afca1a201a11d421ec46db0f7a1d8d08" -dependencies = [ - "alloy-json-rpc", - "base64", - "futures-util", - "serde", - "serde_json", - "thiserror", - "tokio", - "tower", - "url", - "wasm-bindgen-futures", -] - -[[package]] -name = "anstream" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" - -[[package]] -name = "anstyle-parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" -dependencies = [ - "anstyle", - "windows-sys", -] - -[[package]] -name = "anyhow" -version = "1.0.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" - -[[package]] -name = "ark-ff" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" -dependencies = [ - "ark-ff-asm 0.3.0", - "ark-ff-macros 0.3.0", - "ark-serialize 0.3.0", - "ark-std 0.3.0", - "derivative", - "num-bigint", - "num-traits", - "paste", - "rustc_version 0.3.3", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm 0.4.2", - "ark-ff-macros 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "digest 0.10.7", - "itertools 0.10.5", - "num-bigint", - "num-traits", - "paste", - "rustc_version 0.4.0", - "zeroize", -] - -[[package]] -name = "ark-ff-asm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" -dependencies = [ - "num-bigint", - "num-traits", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-serialize" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" -dependencies = [ - "ark-std 0.3.0", - "digest 0.9.0", -] - -[[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-std 0.4.0", - "digest 0.10.7", - "num-bigint", -] - -[[package]] -name = "ark-std" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" -dependencies = [ - "num-traits", - "rand", -] - -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand", -] - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "auto_impl" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base64" -version = "0.21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" - -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "byte-slice-cast" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" -dependencies = [ - "serde", -] - -[[package]] -name = "bzip2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" -dependencies = [ - "bzip2-sys", - "libc", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "jobserver", - "libc", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - -[[package]] -name = "clap" -version = "4.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64" -dependencies = [ - "clap_builder", -] - -[[package]] -name = "clap_builder" -version = "4.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_lex" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" - -[[package]] -name = "color-eyre" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5" -dependencies = [ - "backtrace", - "color-spantrace", - "eyre", - "indenter", - "once_cell", - "owo-colors", - "tracing-error", -] - -[[package]] -name = "color-spantrace" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2" -dependencies = [ - "once_cell", - "owo-colors", - "tracing-core", - "tracing-error", -] - -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "const-hex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efbd12d49ab0eaf8193ba9175e45f56bbc2e4b27d57b8cfe62aa47942a46b9a9" -dependencies = [ - "cfg-if", - "cpufeatures", - "hex", - "proptest", - "serde", -] - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "core-foundation" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" - -[[package]] -name = "cpufeatures" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" -dependencies = [ - "generic-array", - "rand_core", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "data-encoding" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" - -[[package]] -name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "deranged" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" -dependencies = [ - "powerfmt", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version 0.4.0", - "syn 1.0.109", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "const-oid", - "crypto-common", - "subtle", -] - -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys", -] - -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest 0.10.7", - "elliptic-curve", - "rfc6979", - "signature", - "spki", -] - -[[package]] -name = "either" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" - -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest 0.10.7", - "ff", - "generic-array", - "group", - "pkcs8", - "rand_core", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "eyre" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" -dependencies = [ - "indenter", - "once_cell", -] - -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - -[[package]] -name = "fastrlp" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", -] - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "rand_core", - "subtle", -] - -[[package]] -name = "fixed-hash" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" -dependencies = [ - "byteorder", - "rand", - "rustc-hex", - "static_assertions", -] - -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fs-err" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" -dependencies = [ - "autocfg", -] - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "futures-channel" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" - -[[package]] -name = "futures-macro" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "futures-sink" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" - -[[package]] -name = "futures-task" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" - -[[package]] -name = "futures-util" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" -dependencies = [ - "futures-core", - "futures-macro", - "futures-sink", - "futures-task", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "getrandom" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" - -[[package]] -name = "git2" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b3ba52851e73b46a4c3df1d89343741112003f0f6f13beb0dfac9e457c3fdcd" -dependencies = [ - "bitflags 2.4.1", - "libc", - "libgit2-sys", - "log", - "openssl-probe", - "openssl-sys", - "url", -] - -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand_core", - "subtle", -] - -[[package]] -name = "h2" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.10", - "indexmap 1.9.3", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hermit-abi" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -dependencies = [ - "serde", -] - -[[package]] -name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "http" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f95b9abcae896730d42b78e09c155ed4ddf82c07b4de772c64aee5b2d8b7c150" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" -dependencies = [ - "bytes", - "http 0.2.10", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "0.14.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http 0.2.10", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.4.10", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - -[[package]] -name = "id-arena" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" - -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "impl-codec" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" -dependencies = [ - "parity-scale-codec", -] - -[[package]] -name = "impl-trait-for-tuples" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "indenter" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" -dependencies = [ - "equivalent", - "hashbrown 0.14.2", - "serde", -] - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" - -[[package]] -name = "jobserver" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "k256" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2", - "signature", -] - -[[package]] -name = "keccak-asm" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb8515fff80ed850aea4a1595f2e519c003e2a00a82fe168ebf5269196caf444" -dependencies = [ - "digest 0.10.7", - "sha3-asm", -] - -[[package]] -name = "kinode_process_lib" -version = "0.6.0" -source = "git+https://github.com/kinode-dao/process_lib.git?rev=84b3d84#84b3d84c7c31185f15691a288f1b45dbffb18fe2" -dependencies = [ - "alloy-json-rpc", - "alloy-primitives", - "alloy-rpc-types", - "alloy-transport", - "anyhow", - "bincode", - "http 1.0.0", - "mime_guess", - "rand", - "serde", - "serde_json", - "thiserror", - "url", - "wit-bindgen", -] - -[[package]] -name = "kit" -version = "0.3.1" -dependencies = [ - "anyhow", - "base64", - "clap", - "color-eyre", - "dirs", - "fs-err", - "futures-util", - "git2", - "hex", - "kinode_process_lib", - "nix", - "regex", - "reqwest", - "rmp-serde", - "semver 1.0.20", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-tungstenite", - "toml", - "tracing", - "tracing-appender", - "tracing-error", - "tracing-subscriber", - "walkdir", - "zip", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "leb128" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" - -[[package]] -name = "libc" -version = "0.2.150" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" - -[[package]] -name = "libgit2-sys" -version = "0.16.2+1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" -dependencies = [ - "cc", - "libc", - "libssh2-sys", - "libz-sys", - "openssl-sys", - "pkg-config", -] - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "libredox" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" -dependencies = [ - "bitflags 2.4.1", - "libc", - "redox_syscall", -] - -[[package]] -name = "libssh2-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" -dependencies = [ - "cc", - "libc", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "libz-sys" -version = "1.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037731f5d3aaa87a5675e895b63ddff1a87624bc29f77004ea829809654e48f6" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "memchr" -version = "2.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "mime_guess" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" -dependencies = [ - "mime", - "unicase", -] - -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" -dependencies = [ - "libc", - "wasi", - "windows-sys", -] - -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "nix" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" -dependencies = [ - "bitflags 2.4.1", - "cfg-if", - "libc", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "object" -version = "0.32.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "openssl" -version = "0.10.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33" -dependencies = [ - "bitflags 2.4.1", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "owo-colors" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" - -[[package]] -name = "parity-scale-codec" -version = "3.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" -dependencies = [ - "arrayvec", - "bitvec", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "3.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core", - "subtle", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", - "hmac", - "password-hash", - "sha2", -] - -[[package]] -name = "percent-encoding" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" - -[[package]] -name = "pest" -version = "2.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f8023d0fb78c8e03784ea1c7f3fa36e68a723138990b8d5a47d916b651e7a8" -dependencies = [ - "memchr", - "thiserror", - "ucd-trie", -] - -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "primitive-types" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" -dependencies = [ - "fixed-hash", - "impl-codec", - "uint", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - -[[package]] -name = "proc-macro2" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "proptest" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" -dependencies = [ - "bit-set", - "bit-vec", - "bitflags 2.4.1", - "lazy_static", - "num-traits", - "rand", - "rand_chacha", - "rand_xorshift", - "regex-syntax 0.8.2", - "rusty-fork", - "tempfile", - "unarray", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_users" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" -dependencies = [ - "getrandom", - "libredox", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.3", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - -[[package]] -name = "reqwest" -version = "0.11.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http 0.2.10", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "system-configuration", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac", - "subtle", -] - -[[package]] -name = "rlp" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" -dependencies = [ - "bytes", - "rustc-hex", -] - -[[package]] -name = "rmp" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9860a6cc38ed1da53456442089b4dfa35e7cedaa326df63017af88385e6b20" -dependencies = [ - "byteorder", - "num-traits", - "paste", -] - -[[package]] -name = "rmp-serde" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffea85eea980d8a74453e5d02a8d93028f3c34725de143085a844ebe953258a" -dependencies = [ - "byteorder", - "rmp", - "serde", -] - -[[package]] -name = "ruint" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b1d9521f889713d1221270fdd63370feca7e5c71a18745343402fa86e4f04f" -dependencies = [ - "alloy-rlp", - "ark-ff 0.3.0", - "ark-ff 0.4.2", - "bytes", - "fastrlp", - "num-bigint", - "num-traits", - "parity-scale-codec", - "primitive-types", - "proptest", - "rand", - "rlp", - "ruint-macro", - "serde", - "valuable", - "zeroize", -] - -[[package]] -name = "ruint-macro" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustc_version" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver 1.0.20", -] - -[[package]] -name = "rustix" -version = "0.38.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" -dependencies = [ - "bitflags 2.4.1", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - -[[package]] -name = "rusty-fork" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" -dependencies = [ - "fnv", - "quick-error", - "tempfile", - "wait-timeout", -] - -[[package]] -name = "ryu" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schannel" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", -] - -[[package]] -name = "security-framework" -version = "2.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" - -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - -[[package]] -name = "serde" -version = "1.0.192" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.192" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "serde_json" -version = "1.0.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_spanned" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha3-asm" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac61da6b35ad76b195eb4771210f947734321a8d81d7738e1580d953bc7a15e" -dependencies = [ - "cc", - "cfg-if", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest 0.10.7", - "rand_core", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" - -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "spdx" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b19b32ed6d899ab23174302ff105c1577e45a06b08d4fe0a9dd13ce804bbbf71" -dependencies = [ - "smallvec", -] - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" -dependencies = [ - "cfg-if", - "fastrand", - "redox_syscall", - "rustix", - "windows-sys", -] - -[[package]] -name = "thiserror" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "thread_local" -version = "1.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "time" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" -dependencies = [ - "deranged", - "itoa", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" -dependencies = [ - "time-core", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "pin-project-lite", - "signal-hook-registry", - "socket2 0.5.5", - "tokio-macros", - "windows-sys", -] - -[[package]] -name = "tokio-macros" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite", -] - -[[package]] -name = "tokio-util" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "toml" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.21.0", -] - -[[package]] -name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.1.0", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" -dependencies = [ - "indexmap 2.1.0", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-appender" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" -dependencies = [ - "crossbeam-channel", - "thiserror", - "time", - "tracing-subscriber", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-error" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" -dependencies = [ - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-serde" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" -dependencies = [ - "serde", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "serde", - "serde_json", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", - "tracing-serde", -] - -[[package]] -name = "try-lock" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" - -[[package]] -name = "tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 0.2.10", - "httparse", - "log", - "rand", - "sha1", - "thiserror", - "url", - "utf-8", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "ucd-trie" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" - -[[package]] -name = "uint" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - -[[package]] -name = "unarray" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" - -[[package]] -name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" - -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - -[[package]] -name = "url" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wait-timeout" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" -dependencies = [ - "libc", -] - -[[package]] -name = "walkdir" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.39", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" - -[[package]] -name = "wasm-encoder" -version = "0.202.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfd106365a7f5f7aa3c1916a98cbb3ad477f5ff96ddb130285a91c6e7429e67a" -dependencies = [ - "leb128", -] - -[[package]] -name = "wasm-metadata" -version = "0.202.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "094aea3cb90e09f16ee25a4c0e324b3e8c934e7fd838bfa039aef5352f44a917" -dependencies = [ - "anyhow", - "indexmap 2.1.0", - "serde", - "serde_derive", - "serde_json", - "spdx", - "wasm-encoder", - "wasmparser", -] - -[[package]] -name = "wasmparser" -version = "0.202.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6998515d3cf3f8b980ef7c11b29a9b1017d4cf86b99ae93b546992df9931413" -dependencies = [ - "bitflags 2.4.1", - "indexmap 2.1.0", - "semver 1.0.20", -] - -[[package]] -name = "web-sys" -version = "0.3.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "winnow" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys", -] - -[[package]] -name = "wit-bindgen" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" -dependencies = [ - "wit-bindgen-rt", - "wit-bindgen-rust-macro", -] - -[[package]] -name = "wit-bindgen-core" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" -dependencies = [ - "anyhow", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rt" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0780cf7046630ed70f689a098cd8d56c5c3b22f2a7379bbdb088879963ff96" -dependencies = [ - "bitflags 2.4.1", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30acbe8fb708c3a830a33c4cb705df82659bf831b492ec6ca1a17a369cfeeafb" -dependencies = [ - "anyhow", - "heck", - "indexmap 2.1.0", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", -] - -[[package]] -name = "wit-bindgen-rust-macro" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b1b06eae85feaecdf9f2854f7cac124e00d5a6e5014bfb02eb1ecdeb5f265b9" -dependencies = [ - "anyhow", - "proc-macro2", - "quote", - "syn 2.0.39", - "wit-bindgen-core", - "wit-bindgen-rust", -] - -[[package]] -name = "wit-component" -version = "0.202.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c836b1fd9932de0431c1758d8be08212071b6bba0151f7bac826dbc4312a2a9" -dependencies = [ - "anyhow", - "bitflags 2.4.1", - "indexmap 2.1.0", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", -] - -[[package]] -name = "wit-parser" -version = "0.202.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744237b488352f4f27bca05a10acb79474415951c450e52ebd0da784c1df2bcc" -dependencies = [ - "anyhow", - "id-arena", - "indexmap 2.1.0", - "log", - "semver 1.0.20", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser", -] - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "zeroize" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "aes", - "byteorder", - "bzip2", - "constant_time_eq", - "crc32fast", - "crossbeam-utils", - "flate2", - "hmac", - "pbkdf2", - "sha1", - "time", - "zstd", -] - -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/src/boot_fake_node/mod.rs b/src/boot_fake_node/mod.rs index 753f07dd..2a34313f 100644 --- a/src/boot_fake_node/mod.rs +++ b/src/boot_fake_node/mod.rs @@ -206,14 +206,21 @@ pub async fn get_from_github(owner: &str, repo: &str, endpoint: &str) -> Result< .bytes() .await { Ok(v) => { + let v = v.to_vec(); + if let Ok(s) = String::from_utf8(v.clone()) { + if s.contains("API rate limit exceeded") { + warn!("GitHub throttled: can't fetch {owner}/{repo}/{endpoint}"); + return Ok(vec![]); + } + } fs::create_dir_all( cache_path.parent().ok_or_else(|| eyre!("path doesn't have parent"))? )?; fs::write(&cache_path, &v)?; - return Ok(v.to_vec()); + return Ok(v); }, Err(_) => { - warn!("github throttled!"); + warn!("GitHub throttled: can't fetch {owner}/{repo}/{endpoint}"); return Ok(vec![]); }, }; @@ -222,6 +229,9 @@ pub async fn get_from_github(owner: &str, repo: &str, endpoint: &str) -> Result< #[instrument(level = "trace", skip_all)] async fn fetch_releases(owner: &str, repo: &str) -> Result> { let bytes = get_from_github(owner, repo, "releases").await?; + if bytes.is_empty() { + return Ok(vec![]); + } Ok(serde_json::from_slice(&bytes)?) } diff --git a/src/main.rs b/src/main.rs index 3c7d3563..38d7453c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -48,9 +48,12 @@ async fn get_latest_commit_sha_from_branch( owner: &str, repo: &str, branch: &str, -) -> Result { +) -> Result> { let bytes = boot_fake_node::get_from_github(owner, repo, &format!("commits/{branch}")).await?; - Ok(serde_json::from_slice(&bytes)?) + if bytes.is_empty() { + return Ok(None); + } + Ok(Some(serde_json::from_slice(&bytes)?)) } fn init_tracing(log_path: PathBuf) -> tracing_appender::non_blocking::WorkerGuard { @@ -861,14 +864,14 @@ async fn main() -> Result<()> { if let Some((subcommand, _)) = matches { if subcommand != "update" && GIT_BRANCH_NAME == "master" { - let latest = get_latest_commit_sha_from_branch( + if let Some(latest) = get_latest_commit_sha_from_branch( boot_fake_node::KINODE_OWNER, KIT_REPO, KIT_MASTER_BRANCH, - ) - .await?; - if GIT_COMMIT_HASH != latest.sha { - warn!("kit is out of date! Run:\n```\nkit update\n```\nto update to the latest version."); + ).await? { + if GIT_COMMIT_HASH != latest.sha { + warn!("kit is out of date! Run:\n```\nkit update\n```\nto update to the latest version."); + } } } } From 9b88f2f1d5cb0ae4980056509ef58bb565988eda Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Sat, 11 May 2024 14:44:08 -0700 Subject: [PATCH 13/33] add wit api to js chat; add `send` script to py chat --- Cargo.lock | 3631 +++++++++++++++++ .../api/{package_name}:{publisher}-api-v0.wit | 22 + .../javascript/no-ui/chat/pkg/scripts.json | 13 + .../javascript/no-ui/chat/send/Cargo.toml_ | 17 + .../javascript/no-ui/chat/send/src/lib.rs | 46 + .../no-ui/chat/send/src/{package_name}.wit | 4 + .../no-ui/chat/{package_name}/src/lib.js | 26 +- .../{package_name}/src/{package_name}.wit | 4 + .../python/no-ui/chat/pkg/scripts.json | 13 + .../python/no-ui/chat/send/Cargo.toml_ | 17 + .../python/no-ui/chat/send/src/lib.py | 63 + .../no-ui/chat/send/src/{package_name}.wit | 4 + .../no-ui/chat/{package_name}/src/lib.py | 6 +- 13 files changed, 3862 insertions(+), 4 deletions(-) create mode 100644 Cargo.lock create mode 100644 src/new/templates/javascript/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit create mode 100644 src/new/templates/javascript/no-ui/chat/pkg/scripts.json create mode 100644 src/new/templates/javascript/no-ui/chat/send/Cargo.toml_ create mode 100644 src/new/templates/javascript/no-ui/chat/send/src/lib.rs create mode 100644 src/new/templates/javascript/no-ui/chat/send/src/{package_name}.wit create mode 100644 src/new/templates/javascript/no-ui/chat/{package_name}/src/{package_name}.wit create mode 100644 src/new/templates/python/no-ui/chat/pkg/scripts.json create mode 100644 src/new/templates/python/no-ui/chat/send/Cargo.toml_ create mode 100644 src/new/templates/python/no-ui/chat/send/src/lib.py create mode 100644 src/new/templates/python/no-ui/chat/send/src/{package_name}.wit diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 00000000..52e3207a --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,3631 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloy-consensus" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=cad7935#cad7935d69f433e45d190902e58b1c996b35adfa" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "serde", + "sha2", +] + +[[package]] +name = "alloy-eips" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=cad7935#cad7935d69f433e45d190902e58b1c996b35adfa" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "once_cell", + "serde", +] + +[[package]] +name = "alloy-genesis" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=cad7935#cad7935d69f433e45d190902e58b1c996b35adfa" +dependencies = [ + "alloy-primitives", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=cad7935#cad7935d69f433e45d190902e58b1c996b35adfa" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "alloy-primitives" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525448f6afc1b70dd0f9d0a8145631bf2f5e434678ab23ab18409ca264cae6b3" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "k256", + "keccak-asm", + "proptest", + "rand", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +dependencies = [ + "alloy-rlp-derive", + "arrayvec", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.62", +] + +[[package]] +name = "alloy-rpc-types" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=cad7935#cad7935d69f433e45d190902e58b1c996b35adfa" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "itertools 0.12.1", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "alloy-serde" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=cad7935#cad7935d69f433e45d190902e58b1c996b35adfa" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89c80a2cb97e7aa48611cbb63950336f9824a174cdf670527cc6465078a26ea1" +dependencies = [ + "alloy-sol-macro-input", + "const-hex", + "heck 0.4.1", + "indexmap", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.62", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c58894b58ac50979eeac6249661991ac40b9d541830d9a725f7714cc9ef08c23" +dependencies = [ + "const-hex", + "dunce", + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.62", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-types" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "399287f68d1081ed8b1f4903c49687658b95b142207d7cb4ae2f4813915343ef" +dependencies = [ + "alloy-primitives", + "alloy-sol-macro", + "const-hex", +] + +[[package]] +name = "alloy-transport" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=cad7935#cad7935d69f433e45d190902e58b1c996b35adfa" +dependencies = [ + "alloy-json-rpc", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "url", + "wasm-bindgen-futures", +] + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.0", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.62", +] + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "backtrace" +version = "0.3.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "blst" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c94087b935a822949d3291a9989ad2b2051ea141eda0fd4e478a75f6aa3e604b" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +dependencies = [ + "serde", +] + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "c-kzg" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf100c4cea8f207e883ff91ca886d621d8a166cb04971dfaa9bb8fd99ed95df" +dependencies = [ + "blst", + "cc", + "glob", + "hex", + "libc", + "serde", +] + +[[package]] +name = "cc" +version = "1.0.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" +dependencies = [ + "jobserver", + "libc", + "once_cell", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "clap" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "color-eyre" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5" +dependencies = [ + "backtrace", + "color-spantrace", + "eyre", + "indenter", + "once_cell", + "owo-colors", + "tracing-error", +] + +[[package]] +name = "color-spantrace" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2" +dependencies = [ + "once_cell", + "owo-colors", + "tracing-core", + "tracing-error", +] + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "const-hex" +version = "1.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version 0.4.0", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "either" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "flate2" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs-err" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.62", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-core", + "futures-macro", + "futures-sink", + "futures-task", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "futures-utils-wasm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "git2" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" +dependencies = [ + "bitflags 2.5.0", + "libc", + "libgit2-sys", + "log", + "openssl-probe", + "openssl-sys", + "url", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http 0.2.12", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "id-arena" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown", + "serde", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", +] + +[[package]] +name = "keccak-asm" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47a3633291834c4fbebf8673acbc1b04ec9d151418ff9b8e26dcd79129928758" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + +[[package]] +name = "kinode_process_lib" +version = "0.7.0" +source = "git+https://github.com/kinode-dao/process_lib.git?rev=2aa3a1a#2aa3a1a22e8a88e46864d474d777422eb1f1b60b" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-rpc-types", + "alloy-transport", + "anyhow", + "bincode", + "http 1.1.0", + "mime_guess", + "rand", + "rmp-serde", + "serde", + "serde_json", + "thiserror", + "url", + "wit-bindgen", +] + +[[package]] +name = "kit" +version = "0.3.1" +dependencies = [ + "anyhow", + "base64 0.21.7", + "clap", + "color-eyre", + "dirs", + "fs-err", + "futures-util", + "git2", + "hex", + "kinode_process_lib", + "nix", + "regex", + "reqwest", + "rmp-serde", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-tungstenite", + "toml", + "tracing", + "tracing-appender", + "tracing-error", + "tracing-subscriber", + "walkdir", + "zip", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "leb128" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" + +[[package]] +name = "libc" +version = "0.2.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" + +[[package]] +name = "libgit2-sys" +version = "0.16.2+1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" +dependencies = [ + "cc", + "libc", + "libssh2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", +] + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.5.0", + "libc", +] + +[[package]] +name = "libssh2-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "libz-sys" +version = "1.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "miniz_oxide" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "libc", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-bigint" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "openssl" +version = "0.10.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.62", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "owo-colors" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" + +[[package]] +name = "parity-scale-codec" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.62", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.5.0", + "lazy_static", + "num-traits", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax 0.8.3", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core", +] + +[[package]] +name = "redox_users" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http 0.2.12", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "rmp" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" +dependencies = [ + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmp-serde" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + +[[package]] +name = "ruint" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f308135fef9fc398342da5472ce7c484529df23743fb7c734e0f3d472971e62" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver 1.0.23", +] + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "security-framework" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +dependencies = [ + "bitflags 2.5.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.201" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.201" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.62", +] + +[[package]] +name = "serde_json" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3-asm" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9b57fd861253bff08bb1919e995f90ba8f4889de2726091c8876f3a4e823b40" +dependencies = [ + "cc", + "cfg-if", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "spdx" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29ef1a0fa1e39ac22972c8db23ff89aea700ab96aa87114e1fb55937a631a0c9" +dependencies = [ + "smallvec", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f660c3bfcefb88c538776b6685a0c472e3128b51e74d48793dc2a488196e8eb" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn-solidity" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa0cefd02f532035d83cfec82647c6eb53140b0485220760e669f4bad489e36" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.62", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "thiserror" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.62", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.62", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite", +] + +[[package]] +name = "tokio-util" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.12", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow 0.6.8", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-appender" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +dependencies = [ + "crossbeam-channel", + "thiserror", + "time", + "tracing-subscriber", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.62", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-error" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" +dependencies = [ + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.1.0", + "httparse", + "log", + "rand", + "sha1", + "thiserror", + "url", + "utf-8", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicase" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.62", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.62", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "wasm-encoder" +version = "0.202.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfd106365a7f5f7aa3c1916a98cbb3ad477f5ff96ddb130285a91c6e7429e67a" +dependencies = [ + "leb128", +] + +[[package]] +name = "wasm-metadata" +version = "0.202.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "094aea3cb90e09f16ee25a4c0e324b3e8c934e7fd838bfa039aef5352f44a917" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.202.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6998515d3cf3f8b980ef7c11b29a9b1017d4cf86b99ae93b546992df9931413" +dependencies = [ + "bitflags 2.5.0", + "indexmap", + "semver 1.0.23", +] + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" +dependencies = [ + "wit-bindgen-rt", + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" +dependencies = [ + "anyhow", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0780cf7046630ed70f689a098cd8d56c5c3b22f2a7379bbdb088879963ff96" +dependencies = [ + "bitflags 2.5.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30acbe8fb708c3a830a33c4cb705df82659bf831b492ec6ca1a17a369cfeeafb" +dependencies = [ + "anyhow", + "heck 0.4.1", + "indexmap", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b1b06eae85feaecdf9f2854f7cac124e00d5a6e5014bfb02eb1ecdeb5f265b9" +dependencies = [ + "anyhow", + "proc-macro2", + "quote", + "syn 2.0.62", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.202.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c836b1fd9932de0431c1758d8be08212071b6bba0151f7bac826dbc4312a2a9" +dependencies = [ + "anyhow", + "bitflags 2.5.0", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.202.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "744237b488352f4f27bca05a10acb79474415951c450e52ebd0da784c1df2bcc" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.23", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.62", +] + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2", + "sha1", + "time", + "zstd", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.10+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/src/new/templates/javascript/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit b/src/new/templates/javascript/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit new file mode 100644 index 00000000..0e4fd006 --- /dev/null +++ b/src/new/templates/javascript/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit @@ -0,0 +1,22 @@ +interface {package_name}-{publisher_dotted_kebab}-api-v0 { + variant chat-request { + send(send-request), + /// history of chat with given node + history(string), + } + + variant chat-response { + send, + history(list), + } + + record send-request { + target: string, + message: string, + } + + record chat-message { + author: string, + content: string, + } +} diff --git a/src/new/templates/javascript/no-ui/chat/pkg/scripts.json b/src/new/templates/javascript/no-ui/chat/pkg/scripts.json new file mode 100644 index 00000000..ba63df9e --- /dev/null +++ b/src/new/templates/javascript/no-ui/chat/pkg/scripts.json @@ -0,0 +1,13 @@ +{ + "send.wasm": { + "root": false, + "public": false, + "request_networking": false, + "request_capabilities": [ + "{package_name}:{package_name}:{publisher}" + ], + "grant_capabilities": [ + "{package_name}:{package_name}:{publisher}" + ] + } +} diff --git a/src/new/templates/javascript/no-ui/chat/send/Cargo.toml_ b/src/new/templates/javascript/no-ui/chat/send/Cargo.toml_ new file mode 100644 index 00000000..efa24945 --- /dev/null +++ b/src/new/templates/javascript/no-ui/chat/send/Cargo.toml_ @@ -0,0 +1,17 @@ +[package] +name = "send" +version = "0.1.0" +edition = "2021" + +[dependencies] +anyhow = "1.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 = "0.24.0" + +[lib] +crate-type = ["cdylib"] + +[package.metadata.component] +package = "kinode:process" diff --git a/src/new/templates/javascript/no-ui/chat/send/src/lib.rs b/src/new/templates/javascript/no-ui/chat/send/src/lib.rs new file mode 100644 index 00000000..24d86b1e --- /dev/null +++ b/src/new/templates/javascript/no-ui/chat/send/src/lib.rs @@ -0,0 +1,46 @@ +use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{ChatRequest, ChatResponse, SendRequest}; +use kinode_process_lib::{ + await_next_message_body, call_init, println, Address, Message, Request, +}; + +wit_bindgen::generate!({ + path: "target/wit", + world: "{package_name}", + generate_unused_types: true, + additional_derives: [serde::Deserialize, serde::Serialize], +}); + +call_init!(init); +fn init(our: Address) { + let Ok(body) = await_next_message_body() else { + println!("failed to get args!"); + return; + }; + + let args = String::from_utf8(body).unwrap_or_default(); + + let Some((target, message)) = args.split_once(" ") else { + println!("usage:\nsend:{package_name}:{publisher} target message"); + return; + }; + + let Ok(Ok(Message::Response { body, .. })) = + Request::to((our.node(), ("{package_name}", "{package_name}", "{publisher}"))) + .body( + serde_json::to_vec(&ChatRequest::Send(SendRequest { + target: target.into(), + message: message.into(), + })) + .unwrap(), + ) + .send_and_await_response(5) + else { + println!("did not receive expected Response from {package_name}:{package_name}:{publisher}"); + return; + }; + + let Ok(ChatResponse::Send) = serde_json::from_slice(&body) else { + println!("did not receive expected Ack from {package_name}:{package_name}:{publisher}"); + return; + }; +} diff --git a/src/new/templates/javascript/no-ui/chat/send/src/{package_name}.wit b/src/new/templates/javascript/no-ui/chat/send/src/{package_name}.wit new file mode 100644 index 00000000..b4cc5591 --- /dev/null +++ b/src/new/templates/javascript/no-ui/chat/send/src/{package_name}.wit @@ -0,0 +1,4 @@ +world {package_name} { + import {package_name}-{publisher_dotted_kebab}-api-v0; + include process; +} diff --git a/src/new/templates/javascript/no-ui/chat/{package_name}/src/lib.js b/src/new/templates/javascript/no-ui/chat/{package_name}/src/lib.js index 71d49c6f..fe9c171d 100644 --- a/src/new/templates/javascript/no-ui/chat/{package_name}/src/lib.js +++ b/src/new/templates/javascript/no-ui/chat/{package_name}/src/lib.js @@ -22,6 +22,19 @@ function inputBytesToString(byteObject) { return { bytes: byteArray, string: string }; } +function addToArchive(conversation, author, content, messageArchive) { + const message = { + author: author, + content: content + }; + if (messageArchive.hasOwnProperty(conversation)) { + messageArchive[conversation].push(message); + } else { + messageArchive[conversation] = [message]; + } + return messageArchive; +} + function handleMessage(ourNode, messageArchive) { const [source, message] = receive(); @@ -35,7 +48,12 @@ function handleMessage(ourNode, messageArchive) { const { target, message: messageText } = body.Send; if (target === ourNode) { printToTerminal(0, `{package_name}|${source.node}: ${messageText}`); - messageArchive[source.node] = messageText; + messageArchive = addToArchive( + source.node, + source.node, + messageText, + messageArchive, + ); } else { sendAndAwaitResponse( { @@ -54,6 +72,12 @@ function handleMessage(ourNode, messageArchive) { }, null ); + messageArchive = addToArchive( + target, + ourNode, + messageText, + messageArchive, + ); } sendResponse( { diff --git a/src/new/templates/javascript/no-ui/chat/{package_name}/src/{package_name}.wit b/src/new/templates/javascript/no-ui/chat/{package_name}/src/{package_name}.wit new file mode 100644 index 00000000..b4cc5591 --- /dev/null +++ b/src/new/templates/javascript/no-ui/chat/{package_name}/src/{package_name}.wit @@ -0,0 +1,4 @@ +world {package_name} { + import {package_name}-{publisher_dotted_kebab}-api-v0; + include process; +} diff --git a/src/new/templates/python/no-ui/chat/pkg/scripts.json b/src/new/templates/python/no-ui/chat/pkg/scripts.json new file mode 100644 index 00000000..ba63df9e --- /dev/null +++ b/src/new/templates/python/no-ui/chat/pkg/scripts.json @@ -0,0 +1,13 @@ +{ + "send.wasm": { + "root": false, + "public": false, + "request_networking": false, + "request_capabilities": [ + "{package_name}:{package_name}:{publisher}" + ], + "grant_capabilities": [ + "{package_name}:{package_name}:{publisher}" + ] + } +} diff --git a/src/new/templates/python/no-ui/chat/send/Cargo.toml_ b/src/new/templates/python/no-ui/chat/send/Cargo.toml_ new file mode 100644 index 00000000..efa24945 --- /dev/null +++ b/src/new/templates/python/no-ui/chat/send/Cargo.toml_ @@ -0,0 +1,17 @@ +[package] +name = "send" +version = "0.1.0" +edition = "2021" + +[dependencies] +anyhow = "1.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 = "0.24.0" + +[lib] +crate-type = ["cdylib"] + +[package.metadata.component] +package = "kinode:process" diff --git a/src/new/templates/python/no-ui/chat/send/src/lib.py b/src/new/templates/python/no-ui/chat/send/src/lib.py new file mode 100644 index 00000000..686216c2 --- /dev/null +++ b/src/new/templates/python/no-ui/chat/send/src/lib.py @@ -0,0 +1,63 @@ +import json + +import {package_name} +from {package_name}.imports.standard import ( + Address, + MessageRequest, + MessageResponse, + ProcessId, + Request, + receive, + send_and_await_response, +) +from {package_name}.types import Err + +def parse_address(address_string): + node, _, rest = address_string.partition("@") + process, _, rest = rest.partition(":") + package, _, rest = rest.partition(":") + publisher, _, rest = rest.partition(":") + + return node, process, package, publisher + +class {package_name_upper_camel}({package_name}.{package_name_upper_camel}): + def init(self, our): + our_node, _, _, _ = parse_address(our) + result = receive() + if isinstance(result, Err): + raise Exception(f"{result}") + source, message = result + + match message: + case MessageResponse(): + raise Exception(f"unexpected Response: {message}") + case MessageRequest(): + args = message.value.body.decode("utf-8") + target, message = args.split() + + request = { + "Send": { + "target": target, + "message": message, + } + } + response = send_and_await_response( + Address( + our_node, + ProcessId("{package_name}", "{package_name}", "{publisher}"), + ), + Request(False, 5, json.dumps(request).encode("utf-8"), None, []), + None, + ) + if isinstance(response, Err): + raise Exception(f"{response}") + source, message = response + match message: + case MessageRequest(): + raise Exception(f"unexpected Request: {message}") + case MessageResponse(): + message = message.value + message, _ = message + body = json.loads(message.body.decode("utf-8")) + if "Send" not in body: + raise Exception(f"unexpected Response: {body}") diff --git a/src/new/templates/python/no-ui/chat/send/src/{package_name}.wit b/src/new/templates/python/no-ui/chat/send/src/{package_name}.wit new file mode 100644 index 00000000..b4cc5591 --- /dev/null +++ b/src/new/templates/python/no-ui/chat/send/src/{package_name}.wit @@ -0,0 +1,4 @@ +world {package_name} { + import {package_name}-{publisher_dotted_kebab}-api-v0; + include process; +} diff --git a/src/new/templates/python/no-ui/chat/{package_name}/src/lib.py b/src/new/templates/python/no-ui/chat/{package_name}/src/lib.py index cbdc7d83..67ada7bf 100644 --- a/src/new/templates/python/no-ui/chat/{package_name}/src/lib.py +++ b/src/new/templates/python/no-ui/chat/{package_name}/src/lib.py @@ -28,7 +28,7 @@ def add_to_archive(conversation, author, content, message_archive): "author": author, "content": content, } - if conversation in message_archive[conversation]: + if conversation in message_archive: message_archive[conversation].append(message) else: message_archive[conversation] = [message] @@ -37,7 +37,7 @@ def add_to_archive(conversation, author, content, message_archive): def handle_message(our_node, message_archive): result = receive() if isinstance(result, Err): - raise Exception(f"{result}") + raise Exception(f"got error: {result}") source, message = result match message: @@ -71,7 +71,7 @@ def handle_message(our_node, message_archive): message_archive, ) send_response( - Response(False, json.dumps({"Ack": None}).encode("utf-8"), None, []), + Response(False, json.dumps({"Send": None}).encode("utf-8"), None, []), None, ) elif "History" in body: From b905fd70441b74db514ee0a25111cd85d2b15214 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Mon, 13 May 2024 14:39:00 -0700 Subject: [PATCH 14/33] remove unused Cargo.toml --- .../python/no-ui/chat/send/Cargo.toml_ | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 src/new/templates/python/no-ui/chat/send/Cargo.toml_ diff --git a/src/new/templates/python/no-ui/chat/send/Cargo.toml_ b/src/new/templates/python/no-ui/chat/send/Cargo.toml_ deleted file mode 100644 index efa24945..00000000 --- a/src/new/templates/python/no-ui/chat/send/Cargo.toml_ +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "send" -version = "0.1.0" -edition = "2021" - -[dependencies] -anyhow = "1.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 = "0.24.0" - -[lib] -crate-type = ["cdylib"] - -[package.metadata.component] -package = "kinode:process" From 9ad80d25db1c0fd137ef236f26e506e89470b0ad Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Wed, 15 May 2024 18:23:00 -0700 Subject: [PATCH 15/33] change convention to: interface <-> process; world <-> package --- Cargo.lock | 3646 +++++++++++++++++ src/build/mod.rs | 27 +- src/new/mod.rs | 2 + ....wit => {package_name}:{publisher}-v0.wit} | 11 +- .../javascript/no-ui/chat/send/src/lib.rs | 4 +- .../no-ui/chat/send/src/{package_name}.wit | 4 - .../{package_name}/src/{package_name}.wit | 4 - .../api/{package_name}:{publisher}-v0.wit} | 11 +- .../python/no-ui/chat/send/src/lib.py | 8 +- .../no-ui/chat/send/src/{package_name}.wit | 4 - .../no-ui/chat/{package_name}/src/lib.py | 8 +- .../{package_name}/src/{package_name}.wit | 4 - .../api/{package_name}:{publisher}-v0.wit} | 11 +- .../templates/rust/no-ui/chat/send/src/lib.rs | 4 +- .../no-ui/chat/send/src/{package_name}.wit | 4 - .../rust/no-ui/chat/{package_name}/src/lib.rs | 4 +- .../{package_name}/src/{package_name}.wit | 4 - .../api/{package_name}:{publisher}-api-v0.wit | 11 - .../api/{package_name}:{publisher}-v0.wit | 16 + .../rust/no-ui/fibonacci/number/src/lib.rs | 4 +- .../fibonacci/number/src/{package_name}.wit | 4 - .../no-ui/fibonacci/{package_name}/src/lib.rs | 4 +- .../{package_name}/src/{package_name}.wit | 4 - ....wit => {package_name}:{publisher}-v0.wit} | 11 +- .../no-ui/file_transfer/download/src/lib.rs | 4 +- .../download/src/{package_name}.wit | 4 - .../no-ui/file_transfer/list_files/src/lib.rs | 4 +- .../list_files/src/{package_name}.wit | 4 - .../no-ui/file_transfer/worker/src/lib.rs | 4 +- .../worker/src/{package_name}.wit | 4 - .../file_transfer/{package_name}/src/lib.rs | 4 +- .../{package_name}/src/{package_name}.wit | 4 - 32 files changed, 3735 insertions(+), 111 deletions(-) create mode 100644 Cargo.lock rename src/new/templates/javascript/no-ui/chat/api/{{package_name}:{publisher}-api-v0.wit => {package_name}:{publisher}-v0.wit} (65%) delete mode 100644 src/new/templates/javascript/no-ui/chat/send/src/{package_name}.wit delete mode 100644 src/new/templates/javascript/no-ui/chat/{package_name}/src/{package_name}.wit rename src/new/templates/{rust/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit => python/no-ui/chat/api/{package_name}:{publisher}-v0.wit} (65%) delete mode 100644 src/new/templates/python/no-ui/chat/send/src/{package_name}.wit delete mode 100644 src/new/templates/python/no-ui/chat/{package_name}/src/{package_name}.wit rename src/new/templates/{python/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit => rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit} (65%) delete mode 100644 src/new/templates/rust/no-ui/chat/send/src/{package_name}.wit delete mode 100644 src/new/templates/rust/no-ui/chat/{package_name}/src/{package_name}.wit delete mode 100644 src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-api-v0.wit create mode 100644 src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-v0.wit delete mode 100644 src/new/templates/rust/no-ui/fibonacci/number/src/{package_name}.wit delete mode 100644 src/new/templates/rust/no-ui/fibonacci/{package_name}/src/{package_name}.wit rename src/new/templates/rust/no-ui/file_transfer/api/{{package_name}:{publisher}-api-v0.wit => {package_name}:{publisher}-v0.wit} (81%) delete mode 100644 src/new/templates/rust/no-ui/file_transfer/download/src/{package_name}.wit delete mode 100644 src/new/templates/rust/no-ui/file_transfer/list_files/src/{package_name}.wit delete mode 100644 src/new/templates/rust/no-ui/file_transfer/worker/src/{package_name}.wit delete mode 100644 src/new/templates/rust/no-ui/file_transfer/{package_name}/src/{package_name}.wit diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 00000000..223249a4 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,3646 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloy-consensus" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=cad7935#cad7935d69f433e45d190902e58b1c996b35adfa" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "serde", + "sha2", +] + +[[package]] +name = "alloy-eips" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=cad7935#cad7935d69f433e45d190902e58b1c996b35adfa" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "once_cell", + "serde", +] + +[[package]] +name = "alloy-genesis" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=cad7935#cad7935d69f433e45d190902e58b1c996b35adfa" +dependencies = [ + "alloy-primitives", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=cad7935#cad7935d69f433e45d190902e58b1c996b35adfa" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "alloy-primitives" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8aa973e647ec336810a9356af8aea787249c9d00b1525359f3db29a68d231b" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "k256", + "keccak-asm", + "proptest", + "rand", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +dependencies = [ + "alloy-rlp-derive", + "arrayvec", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "alloy-rpc-types" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=cad7935#cad7935d69f433e45d190902e58b1c996b35adfa" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "itertools 0.12.1", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "alloy-serde" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=cad7935#cad7935d69f433e45d190902e58b1c996b35adfa" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dbd17d67f3e89478c8a634416358e539e577899666c927bc3d2b1328ee9b6ca" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6da95adcf4760bb4b108fefa51d50096c5e5fdd29ee72fed3e86ee414f2e34" +dependencies = [ + "alloy-sol-macro-input", + "const-hex", + "heck 0.4.1", + "indexmap", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.63", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32c8da04c1343871fb6ce5a489218f9c85323c8340a36e9106b5fc98d4dd59d5" +dependencies = [ + "const-hex", + "dunce", + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.63", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-types" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40a64d2d2395c1ac636b62419a7b17ec39031d6b2367e66e9acbf566e6055e9c" +dependencies = [ + "alloy-primitives", + "alloy-sol-macro", + "const-hex", +] + +[[package]] +name = "alloy-transport" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy.git?rev=cad7935#cad7935d69f433e45d190902e58b1c996b35adfa" +dependencies = [ + "alloy-json-rpc", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "url", + "wasm-bindgen-futures", +] + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.0", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "backtrace" +version = "0.3.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "blst" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c94087b935a822949d3291a9989ad2b2051ea141eda0fd4e478a75f6aa3e604b" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +dependencies = [ + "serde", +] + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "c-kzg" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf100c4cea8f207e883ff91ca886d621d8a166cb04971dfaa9bb8fd99ed95df" +dependencies = [ + "blst", + "cc", + "glob", + "hex", + "libc", + "serde", +] + +[[package]] +name = "cc" +version = "1.0.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" +dependencies = [ + "jobserver", + "libc", + "once_cell", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "clap" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "color-eyre" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5" +dependencies = [ + "backtrace", + "color-spantrace", + "eyre", + "indenter", + "once_cell", + "owo-colors", + "tracing-error", +] + +[[package]] +name = "color-spantrace" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2" +dependencies = [ + "once_cell", + "owo-colors", + "tracing-core", + "tracing-error", +] + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "const-hex" +version = "1.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ff96486ccc291d36a958107caf2c0af8c78c0af7d31ae2f35ce055130de1a6" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version 0.4.0", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "either" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "flate2" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs-err" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-core", + "futures-macro", + "futures-sink", + "futures-task", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "futures-utils-wasm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "git2" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" +dependencies = [ + "bitflags 2.5.0", + "libc", + "libgit2-sys", + "log", + "openssl-probe", + "openssl-sys", + "url", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http 0.2.12", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "id-arena" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown", + "serde", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", +] + +[[package]] +name = "keccak-asm" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47a3633291834c4fbebf8673acbc1b04ec9d151418ff9b8e26dcd79129928758" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + +[[package]] +name = "kinode_process_lib" +version = "0.7.0" +source = "git+https://github.com/kinode-dao/process_lib.git?rev=2aa3a1a#2aa3a1a22e8a88e46864d474d777422eb1f1b60b" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-rpc-types", + "alloy-transport", + "anyhow", + "bincode", + "http 1.1.0", + "mime_guess", + "rand", + "rmp-serde", + "serde", + "serde_json", + "thiserror", + "url", + "wit-bindgen", +] + +[[package]] +name = "kit" +version = "0.4.1" +dependencies = [ + "anyhow", + "base64 0.21.7", + "clap", + "color-eyre", + "dirs", + "fs-err", + "futures-util", + "git2", + "hex", + "kinode_process_lib", + "nix", + "regex", + "reqwest", + "rmp-serde", + "semver 1.0.23", + "serde", + "serde_json", + "sha2", + "thiserror", + "tokio", + "tokio-tungstenite", + "toml", + "tracing", + "tracing-appender", + "tracing-error", + "tracing-subscriber", + "walkdir", + "zip", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "leb128" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" + +[[package]] +name = "libc" +version = "0.2.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" + +[[package]] +name = "libgit2-sys" +version = "0.16.2+1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" +dependencies = [ + "cc", + "libc", + "libssh2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", +] + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.5.0", + "libc", +] + +[[package]] +name = "libssh2-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "libz-sys" +version = "1.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "miniz_oxide" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "libc", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-bigint" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "openssl" +version = "0.10.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "owo-colors" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" + +[[package]] +name = "parity-scale-codec" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.5.0", + "lazy_static", + "num-traits", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax 0.8.3", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core", +] + +[[package]] +name = "redox_users" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http 0.2.12", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "rmp" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" +dependencies = [ + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmp-serde" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + +[[package]] +name = "ruint" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f308135fef9fc398342da5472ce7c484529df23743fb7c734e0f3d472971e62" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver 1.0.23", +] + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "security-framework" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +dependencies = [ + "bitflags 2.5.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.202" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.202" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "serde_json" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3-asm" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9b57fd861253bff08bb1919e995f90ba8f4889de2726091c8876f3a4e823b40" +dependencies = [ + "cc", + "cfg-if", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "spdx" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29ef1a0fa1e39ac22972c8db23ff89aea700ab96aa87114e1fb55937a631a0c9" +dependencies = [ + "smallvec", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf5be731623ca1a1fb7d8be6f261a3be6d3e2337b8a1f97be944d020c8fcb704" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn-solidity" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8db114c44cf843a8bacd37a146e37987a0b823a0e8bc4fdc610c9c72ab397a5" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "thiserror" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite", +] + +[[package]] +name = "tokio-util" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.13", +] + +[[package]] +name = "toml_datetime" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow 0.6.8", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-appender" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +dependencies = [ + "crossbeam-channel", + "thiserror", + "time", + "tracing-subscriber", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-error" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" +dependencies = [ + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.1.0", + "httparse", + "log", + "rand", + "sha1", + "thiserror", + "url", + "utf-8", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicase" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.63", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "wasm-encoder" +version = "0.202.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfd106365a7f5f7aa3c1916a98cbb3ad477f5ff96ddb130285a91c6e7429e67a" +dependencies = [ + "leb128", +] + +[[package]] +name = "wasm-metadata" +version = "0.202.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "094aea3cb90e09f16ee25a4c0e324b3e8c934e7fd838bfa039aef5352f44a917" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.202.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6998515d3cf3f8b980ef7c11b29a9b1017d4cf86b99ae93b546992df9931413" +dependencies = [ + "bitflags 2.5.0", + "indexmap", + "semver 1.0.23", +] + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb4e7653763780be47e38f479e9aa83c768aa6a3b2ed086dc2826fdbbb7e7f5" +dependencies = [ + "wit-bindgen-rt", + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b67e11c950041849a10828c7600ea62a4077c01e8af72e8593253575428f91b" +dependencies = [ + "anyhow", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0780cf7046630ed70f689a098cd8d56c5c3b22f2a7379bbdb088879963ff96" +dependencies = [ + "bitflags 2.5.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30acbe8fb708c3a830a33c4cb705df82659bf831b492ec6ca1a17a369cfeeafb" +dependencies = [ + "anyhow", + "heck 0.4.1", + "indexmap", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b1b06eae85feaecdf9f2854f7cac124e00d5a6e5014bfb02eb1ecdeb5f265b9" +dependencies = [ + "anyhow", + "proc-macro2", + "quote", + "syn 2.0.63", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.202.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c836b1fd9932de0431c1758d8be08212071b6bba0151f7bac826dbc4312a2a9" +dependencies = [ + "anyhow", + "bitflags 2.5.0", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.202.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "744237b488352f4f27bca05a10acb79474415951c450e52ebd0da784c1df2bcc" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.23", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2", + "sha1", + "time", + "zstd", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.10+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/src/build/mod.rs b/src/build/mod.rs index 8bae3e1b..8c18fc7e 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -110,7 +110,7 @@ pub fn read_metadata(package_dir: &Path) -> Result { /// Regex to dynamically capture the world name after 'world' #[instrument(level = "trace", skip_all)] fn extract_world(data: &str) -> Option { - let re = regex::Regex::new(r"world\s+(\w+)\s*\{").unwrap(); + let re = regex::Regex::new(r"world\s+([^\s\{]+)").unwrap(); re.captures(data).and_then(|caps| caps.get(1).map(|match_| match_.as_str().to_string())) } @@ -433,16 +433,16 @@ async fn build_wit_dir(process_dir: &Path, apis: &HashMap>) -> R fs::write(wit_dir.join(file_name), contents)?; } - let src_dir = process_dir.join("src"); - for entry in src_dir.read_dir()? { - let entry = entry?; - let path = entry.path(); - if Some("wit") == path.extension().and_then(|s| s.to_str()) { - if let Some(file_name) = path.file_name().and_then(|s| s.to_str()) { - fs::copy(&path, wit_dir.join(file_name))?; - } - } - } + //let src_dir = process_dir.join("src"); + //for entry in src_dir.read_dir()? { + // let entry = entry?; + // let path = entry.path(); + // if Some("wit") == path.extension().and_then(|s| s.to_str()) { + // if let Some(file_name) = path.file_name().and_then(|s| s.to_str()) { + // fs::copy(&path, wit_dir.join(file_name))?; + // } + // } + //} Ok(()) } @@ -503,7 +503,7 @@ async fn fetch_dependencies( /// ``` /// metadata.json /// api/ <- optional -/// my_package:publisher.os-v0-api.wit +/// my_package:publisher.os-v0.wit /// pkg/ /// api.zip <- built /// manifest.json @@ -512,7 +512,6 @@ async fn fetch_dependencies( /// process_i/ /// src/ /// lib.rs -/// process_i.wit <- optional /// target/ <- built /// api/ /// wit/ @@ -571,7 +570,7 @@ async fn compile_package( continue; }; if file_name.starts_with(&format!( - "{}:{}-api", + "{}:{}", metadata.properties.package_name, metadata.properties.publisher, )) { diff --git a/src/new/mod.rs b/src/new/mod.rs index 9ae3a6ed..1152c225 100644 --- a/src/new/mod.rs +++ b/src/new/mod.rs @@ -107,12 +107,14 @@ fn replace_dots(input: &str) -> (String, String) { fn replace_vars(input: &str, package_name: &str, publisher: &str) -> String { let (publisher_dotted_snake, publisher_dotted_kebab) = replace_dots(publisher); let package_name_upper_camel = snake_to_upper_camel_case(package_name); + let publisher_dotted_upper_camel = snake_to_upper_camel_case(&publisher_dotted_snake); input .replace("{package_name}", package_name) .replace("{package_name_upper_camel}", &package_name_upper_camel) .replace("{publisher}", publisher) .replace("{publisher_dotted_snake}", &publisher_dotted_snake) .replace("{publisher_dotted_kebab}", &publisher_dotted_kebab) + .replace("{publisher_dotted_upper_camel}", &publisher_dotted_upper_camel) .replace("Cargo.toml_", "Cargo.toml") .to_string() } diff --git a/src/new/templates/javascript/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit b/src/new/templates/javascript/no-ui/chat/api/{package_name}:{publisher}-v0.wit similarity index 65% rename from src/new/templates/javascript/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit rename to src/new/templates/javascript/no-ui/chat/api/{package_name}:{publisher}-v0.wit index 0e4fd006..2aaac95d 100644 --- a/src/new/templates/javascript/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit +++ b/src/new/templates/javascript/no-ui/chat/api/{package_name}:{publisher}-v0.wit @@ -1,11 +1,11 @@ -interface {package_name}-{publisher_dotted_kebab}-api-v0 { - variant chat-request { +interface {package_name} { + variant request { send(send-request), /// history of chat with given node history(string), } - variant chat-response { + variant response { send, history(list), } @@ -20,3 +20,8 @@ interface {package_name}-{publisher_dotted_kebab}-api-v0 { content: string, } } + +world {package_name}-{publisher_dotted_kebab}-v0 { + import {package_name}; + include process; +} diff --git a/src/new/templates/javascript/no-ui/chat/send/src/lib.rs b/src/new/templates/javascript/no-ui/chat/send/src/lib.rs index 24d86b1e..508f8b28 100644 --- a/src/new/templates/javascript/no-ui/chat/send/src/lib.rs +++ b/src/new/templates/javascript/no-ui/chat/send/src/lib.rs @@ -1,11 +1,11 @@ -use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{ChatRequest, ChatResponse, SendRequest}; +use crate::kinode::process::{package_name}::{Request as ChatRequest, Response as ChatResponse, SendRequest}; use kinode_process_lib::{ await_next_message_body, call_init, println, Address, Message, Request, }; wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}", + world: "{package_name}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); diff --git a/src/new/templates/javascript/no-ui/chat/send/src/{package_name}.wit b/src/new/templates/javascript/no-ui/chat/send/src/{package_name}.wit deleted file mode 100644 index b4cc5591..00000000 --- a/src/new/templates/javascript/no-ui/chat/send/src/{package_name}.wit +++ /dev/null @@ -1,4 +0,0 @@ -world {package_name} { - import {package_name}-{publisher_dotted_kebab}-api-v0; - include process; -} diff --git a/src/new/templates/javascript/no-ui/chat/{package_name}/src/{package_name}.wit b/src/new/templates/javascript/no-ui/chat/{package_name}/src/{package_name}.wit deleted file mode 100644 index b4cc5591..00000000 --- a/src/new/templates/javascript/no-ui/chat/{package_name}/src/{package_name}.wit +++ /dev/null @@ -1,4 +0,0 @@ -world {package_name} { - import {package_name}-{publisher_dotted_kebab}-api-v0; - include process; -} diff --git a/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit b/src/new/templates/python/no-ui/chat/api/{package_name}:{publisher}-v0.wit similarity index 65% rename from src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit rename to src/new/templates/python/no-ui/chat/api/{package_name}:{publisher}-v0.wit index 0e4fd006..2aaac95d 100644 --- a/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit +++ b/src/new/templates/python/no-ui/chat/api/{package_name}:{publisher}-v0.wit @@ -1,11 +1,11 @@ -interface {package_name}-{publisher_dotted_kebab}-api-v0 { - variant chat-request { +interface {package_name} { + variant request { send(send-request), /// history of chat with given node history(string), } - variant chat-response { + variant response { send, history(list), } @@ -20,3 +20,8 @@ interface {package_name}-{publisher_dotted_kebab}-api-v0 { content: string, } } + +world {package_name}-{publisher_dotted_kebab}-v0 { + import {package_name}; + include process; +} diff --git a/src/new/templates/python/no-ui/chat/send/src/lib.py b/src/new/templates/python/no-ui/chat/send/src/lib.py index 686216c2..d441f955 100644 --- a/src/new/templates/python/no-ui/chat/send/src/lib.py +++ b/src/new/templates/python/no-ui/chat/send/src/lib.py @@ -1,7 +1,7 @@ import json -import {package_name} -from {package_name}.imports.standard import ( +import {package_name}_{publisher_dotted_snake}_v0 +from {package_name}_{publisher_dotted_snake}_v0.imports.standard import ( Address, MessageRequest, MessageResponse, @@ -10,7 +10,7 @@ receive, send_and_await_response, ) -from {package_name}.types import Err +from {package_name}_{publisher_dotted_snake}_v0.types import Err def parse_address(address_string): node, _, rest = address_string.partition("@") @@ -20,7 +20,7 @@ def parse_address(address_string): return node, process, package, publisher -class {package_name_upper_camel}({package_name}.{package_name_upper_camel}): +class {package_name_upper_camel}{publisher_dotted_upper_camel}V0({package_name}_{publisher_dotted_snake}_v0.{package_name_upper_camel}{publisher_dotted_upper_camel}V0): def init(self, our): our_node, _, _, _ = parse_address(our) result = receive() diff --git a/src/new/templates/python/no-ui/chat/send/src/{package_name}.wit b/src/new/templates/python/no-ui/chat/send/src/{package_name}.wit deleted file mode 100644 index b4cc5591..00000000 --- a/src/new/templates/python/no-ui/chat/send/src/{package_name}.wit +++ /dev/null @@ -1,4 +0,0 @@ -world {package_name} { - import {package_name}-{publisher_dotted_kebab}-api-v0; - include process; -} diff --git a/src/new/templates/python/no-ui/chat/{package_name}/src/lib.py b/src/new/templates/python/no-ui/chat/{package_name}/src/lib.py index 67ada7bf..45beadbc 100644 --- a/src/new/templates/python/no-ui/chat/{package_name}/src/lib.py +++ b/src/new/templates/python/no-ui/chat/{package_name}/src/lib.py @@ -1,7 +1,7 @@ import json -import {package_name} -from {package_name}.imports.standard import ( +import {package_name}_{publisher_dotted_snake}_v0 +from {package_name}_{publisher_dotted_snake}_v0.imports.standard import ( Address, MessageRequest, MessageResponse, @@ -13,7 +13,7 @@ send_and_await_response, send_response, ) -from {package_name}.types import Err +from {package_name}_{publisher_dotted_snake}_v0.types import Err def parse_address(address_string): node, _, rest = address_string.partition("@") @@ -90,7 +90,7 @@ def handle_message(our_node, message_archive): return message_archive -class {package_name_upper_camel}({package_name}.{package_name_upper_camel}): +class {package_name_upper_camel}{publisher_dotted_upper_camel}V0({package_name}_{publisher_dotted_snake}_v0.{package_name_upper_camel}{publisher_dotted_upper_camel}V0): def init(self, our): print_to_terminal(0, "{package_name}: begin (python)") diff --git a/src/new/templates/python/no-ui/chat/{package_name}/src/{package_name}.wit b/src/new/templates/python/no-ui/chat/{package_name}/src/{package_name}.wit deleted file mode 100644 index b4cc5591..00000000 --- a/src/new/templates/python/no-ui/chat/{package_name}/src/{package_name}.wit +++ /dev/null @@ -1,4 +0,0 @@ -world {package_name} { - import {package_name}-{publisher_dotted_kebab}-api-v0; - include process; -} diff --git a/src/new/templates/python/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit b/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit similarity index 65% rename from src/new/templates/python/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit rename to src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit index 0e4fd006..2aaac95d 100644 --- a/src/new/templates/python/no-ui/chat/api/{package_name}:{publisher}-api-v0.wit +++ b/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit @@ -1,11 +1,11 @@ -interface {package_name}-{publisher_dotted_kebab}-api-v0 { - variant chat-request { +interface {package_name} { + variant request { send(send-request), /// history of chat with given node history(string), } - variant chat-response { + variant response { send, history(list), } @@ -20,3 +20,8 @@ interface {package_name}-{publisher_dotted_kebab}-api-v0 { content: string, } } + +world {package_name}-{publisher_dotted_kebab}-v0 { + import {package_name}; + include process; +} diff --git a/src/new/templates/rust/no-ui/chat/send/src/lib.rs b/src/new/templates/rust/no-ui/chat/send/src/lib.rs index 24d86b1e..508f8b28 100644 --- a/src/new/templates/rust/no-ui/chat/send/src/lib.rs +++ b/src/new/templates/rust/no-ui/chat/send/src/lib.rs @@ -1,11 +1,11 @@ -use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{ChatRequest, ChatResponse, SendRequest}; +use crate::kinode::process::{package_name}::{Request as ChatRequest, Response as ChatResponse, SendRequest}; use kinode_process_lib::{ await_next_message_body, call_init, println, Address, Message, Request, }; wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}", + world: "{package_name}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); diff --git a/src/new/templates/rust/no-ui/chat/send/src/{package_name}.wit b/src/new/templates/rust/no-ui/chat/send/src/{package_name}.wit deleted file mode 100644 index b4cc5591..00000000 --- a/src/new/templates/rust/no-ui/chat/send/src/{package_name}.wit +++ /dev/null @@ -1,4 +0,0 @@ -world {package_name} { - import {package_name}-{publisher_dotted_kebab}-api-v0; - include process; -} diff --git a/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs index 42db2528..c85a523f 100644 --- a/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs @@ -1,12 +1,12 @@ use std::collections::HashMap; use std::str::FromStr; -use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{ChatMessage, ChatRequest, ChatResponse, SendRequest}; +use crate::kinode::process::{package_name}::{ChatMessage, Request as ChatRequest, Response as ChatResponse, SendRequest}; use kinode_process_lib::{await_message, call_init, println, Address, ProcessId, Request, Response}; wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}", + world: "{package_name}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); diff --git a/src/new/templates/rust/no-ui/chat/{package_name}/src/{package_name}.wit b/src/new/templates/rust/no-ui/chat/{package_name}/src/{package_name}.wit deleted file mode 100644 index b4cc5591..00000000 --- a/src/new/templates/rust/no-ui/chat/{package_name}/src/{package_name}.wit +++ /dev/null @@ -1,4 +0,0 @@ -world {package_name} { - import {package_name}-{publisher_dotted_kebab}-api-v0; - include process; -} diff --git a/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-api-v0.wit b/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-api-v0.wit deleted file mode 100644 index 74be9210..00000000 --- a/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-api-v0.wit +++ /dev/null @@ -1,11 +0,0 @@ -interface {package_name}-{publisher_dotted_kebab}-api-v0 { - variant fibonacci-request { - number(u32), - numbers(tuple), - } - - variant fibonacci-response { - number(u64), - numbers(tuple), - } -} diff --git a/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-v0.wit b/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-v0.wit new file mode 100644 index 00000000..f13211a8 --- /dev/null +++ b/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-v0.wit @@ -0,0 +1,16 @@ +interface {package_name} { + variant request { + number(u32), + numbers(tuple), + } + + variant response { + number(u64), + numbers(tuple), + } +} + +world {package_name}-{publisher_dotted_kebab}-v0 { + import {package_name}; + include process; +} diff --git a/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs b/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs index 69d7d4a5..96b20e74 100644 --- a/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs +++ b/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs @@ -1,11 +1,11 @@ -use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{FibonacciRequest, FibonacciResponse}; +use crate::kinode::process::{package_name}::{Request as FibonacciRequest, Response as FibonacciResponse}; use kinode_process_lib::{ await_next_message_body, call_init, println, Address, Message, Request, }; wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}", + world: "{package_name}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); diff --git a/src/new/templates/rust/no-ui/fibonacci/number/src/{package_name}.wit b/src/new/templates/rust/no-ui/fibonacci/number/src/{package_name}.wit deleted file mode 100644 index b4cc5591..00000000 --- a/src/new/templates/rust/no-ui/fibonacci/number/src/{package_name}.wit +++ /dev/null @@ -1,4 +0,0 @@ -world {package_name} { - import {package_name}-{publisher_dotted_kebab}-api-v0; - include process; -} diff --git a/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs index 7aba17e0..35386e63 100644 --- a/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs @@ -1,9 +1,9 @@ -use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{FibonacciRequest, FibonacciResponse}; +use crate::kinode::process::{package_name}::{Request as FibonacciRequest, Response as FibonacciResponse}; use kinode_process_lib::{await_message, call_init, println, Address, Response}; wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}", + world: "{package_name}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); diff --git a/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/{package_name}.wit b/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/{package_name}.wit deleted file mode 100644 index b4cc5591..00000000 --- a/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/{package_name}.wit +++ /dev/null @@ -1,4 +0,0 @@ -world {package_name} { - import {package_name}-{publisher_dotted_kebab}-api-v0; - include process; -} diff --git a/src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-api-v0.wit b/src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-v0.wit similarity index 81% rename from src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-api-v0.wit rename to src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-v0.wit index ba25d35d..9e958956 100644 --- a/src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-api-v0.wit +++ b/src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-v0.wit @@ -1,13 +1,13 @@ -interface {package_name}-{publisher_dotted_kebab}-api-v0 { +interface {package_name} { use standard.{address}; - variant transfer-request { + variant request { list-files, download(download-request), progress(progress-request), } - variant transfer-response { + variant response { list-files(list), download, done, @@ -46,3 +46,8 @@ interface {package_name}-{publisher_dotted_kebab}-api-v0 { length: u64, } } + +world {package_name}-{publisher_dotted_kebab}-v0 { + import {package_name}; + include process; +} diff --git a/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs index 06d142f8..fd44bc44 100644 --- a/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs @@ -1,11 +1,11 @@ -use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{Address as WitAddress, TransferRequest, DownloadRequest}; +use crate::kinode::process::{package_name}::{Address as WitAddress, Request as TransferRequest, DownloadRequest}; use kinode_process_lib::{ await_next_message_body, call_init, println, Address, Message, Request, }; wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}", + world: "{package_name}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); diff --git a/src/new/templates/rust/no-ui/file_transfer/download/src/{package_name}.wit b/src/new/templates/rust/no-ui/file_transfer/download/src/{package_name}.wit deleted file mode 100644 index b4cc5591..00000000 --- a/src/new/templates/rust/no-ui/file_transfer/download/src/{package_name}.wit +++ /dev/null @@ -1,4 +0,0 @@ -world {package_name} { - import {package_name}-{publisher_dotted_kebab}-api-v0; - include process; -} diff --git a/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs index 57916742..271703d7 100644 --- a/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs @@ -1,11 +1,11 @@ -use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{TransferRequest, TransferResponse}; +use crate::kinode::process::{package_name}::{Request as TransferRequest, Response as TransferResponse}; use kinode_process_lib::{ await_next_message_body, call_init, println, Address, Message, Request, }; wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}", + world: "{package_name}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); diff --git a/src/new/templates/rust/no-ui/file_transfer/list_files/src/{package_name}.wit b/src/new/templates/rust/no-ui/file_transfer/list_files/src/{package_name}.wit deleted file mode 100644 index b4cc5591..00000000 --- a/src/new/templates/rust/no-ui/file_transfer/list_files/src/{package_name}.wit +++ /dev/null @@ -1,4 +0,0 @@ -world {package_name} { - import {package_name}-{publisher_dotted_kebab}-api-v0; - include process; -} diff --git a/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs index ae4abd5a..9701c94d 100644 --- a/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs @@ -1,6 +1,6 @@ use std::str::FromStr; -use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{TransferRequest, WorkerRequest, ProgressRequest, InitializeRequest, ChunkRequest}; +use crate::kinode::process::{package_name}::{Request as TransferRequest, WorkerRequest, ProgressRequest, InitializeRequest, ChunkRequest}; use kinode_process_lib::{ await_message, call_init, get_blob, println, vfs::{open_dir, open_file, Directory, File, SeekFrom}, @@ -9,7 +9,7 @@ use kinode_process_lib::{ wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}", + world: "{package_name}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); diff --git a/src/new/templates/rust/no-ui/file_transfer/worker/src/{package_name}.wit b/src/new/templates/rust/no-ui/file_transfer/worker/src/{package_name}.wit deleted file mode 100644 index b4cc5591..00000000 --- a/src/new/templates/rust/no-ui/file_transfer/worker/src/{package_name}.wit +++ /dev/null @@ -1,4 +0,0 @@ -world {package_name} { - import {package_name}-{publisher_dotted_kebab}-api-v0; - include process; -} diff --git a/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs index 6731e4b7..5481d61d 100644 --- a/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs @@ -1,4 +1,4 @@ -use crate::kinode::process::{package_name}_{publisher_dotted_snake}_api_v0::{Address as WitAddress, TransferRequest, TransferResponse, WorkerRequest, DownloadRequest, ProgressRequest, FileInfo, InitializeRequest, ChunkRequest}; +use crate::kinode::process::{package_name}::{Address as WitAddress, Request as TransferRequest, Response as TransferResponse, WorkerRequest, DownloadRequest, ProgressRequest, FileInfo, InitializeRequest, ChunkRequest}; use kinode_process_lib::{ await_message, call_init, our_capabilities, println, spawn, vfs::{create_drive, metadata, open_dir, Directory, FileType}, @@ -7,7 +7,7 @@ use kinode_process_lib::{ wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}", + world: "{package_name}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); diff --git a/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/{package_name}.wit b/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/{package_name}.wit deleted file mode 100644 index b4cc5591..00000000 --- a/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/{package_name}.wit +++ /dev/null @@ -1,4 +0,0 @@ -world {package_name} { - import {package_name}-{publisher_dotted_kebab}-api-v0; - include process; -} From 75c6fd286f352eaaaf1c6c1852941c74bb41ab89 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Thu, 16 May 2024 13:23:02 -0700 Subject: [PATCH 16/33] use develop process_lib --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 675e787a..1d7482cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ dirs = "5.0" fs-err = "2.11" futures-util = "0.3" hex = "0.4" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "2aa3a1a" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "e7d7798" } nix = { version = "0.27", features = ["process", "signal", "term"] } regex = "1" reqwest = { version = "0.11", features = ["json"] } From f3ca46f8b95cfb11b5e5d9b0aba9733a35c3bb95 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Thu, 16 May 2024 13:57:14 -0700 Subject: [PATCH 17/33] use most recent process_lib --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1d7482cf..8cafe58f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ dirs = "5.0" fs-err = "2.11" futures-util = "0.3" hex = "0.4" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "e7d7798" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "7eb3a04" } nix = { version = "0.27", features = ["process", "signal", "term"] } regex = "1" reqwest = { version = "0.11", features = ["json"] } From b78201c2c54a1f7447004e1d66ad674597df7073 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Thu, 16 May 2024 14:43:48 -0700 Subject: [PATCH 18/33] fix deps --- Cargo.lock | 4 ++-- src/build/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 223249a4..8e8c1eed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1478,8 +1478,8 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.7.0" -source = "git+https://github.com/kinode-dao/process_lib.git?rev=2aa3a1a#2aa3a1a22e8a88e46864d474d777422eb1f1b60b" +version = "0.8.0" +source = "git+https://github.com/kinode-dao/process_lib.git?rev=7eb3a04#7eb3a04f9be79d1cc3a52fa460faeea7ba3008ed" dependencies = [ "alloy-json-rpc", "alloy-primitives", diff --git a/src/build/mod.rs b/src/build/mod.rs index 8c18fc7e..7298bb53 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -581,13 +581,13 @@ async fn compile_package( } // fetch dependency apis: to be used in build - if !metadata.properties.dependencies.is_empty() { + if let Some(ref dependencies) = metadata.properties.dependencies { let Some(ref url) = url else { // TODO: can we use kit-cached deps? return Err(eyre!("Need a node to be able to fetch dependencies")); }; fetch_dependencies( - &metadata.properties.dependencies, + dependencies, &mut apis, url.clone(), ).await?; From 49093a07bd9af62f2a62f96fb82dbefa51e79a71 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Thu, 16 May 2024 14:50:22 -0700 Subject: [PATCH 19/33] fix deps again --- src/build/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/build/mod.rs b/src/build/mod.rs index 7298bb53..da13935a 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -582,6 +582,9 @@ async fn compile_package( // fetch dependency apis: to be used in build if let Some(ref dependencies) = metadata.properties.dependencies { + if dependencies.is_empty() { + continue; + } let Some(ref url) = url else { // TODO: can we use kit-cached deps? return Err(eyre!("Need a node to be able to fetch dependencies")); From d5e1143e7a58a3c10ac590f90f4d0de8aa5477ea Mon Sep 17 00:00:00 2001 From: dr-frmr Date: Thu, 16 May 2024 17:00:51 -0600 Subject: [PATCH 20/33] feat: add world switching and wit switching --- src/build/mod.rs | 82 ++++++++++++++++++++++++++++-------------------- 1 file changed, 48 insertions(+), 34 deletions(-) diff --git a/src/build/mod.rs b/src/build/mod.rs index da13935a..89e1a868 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -5,14 +5,14 @@ use std::process::Command; use color_eyre::{eyre::{eyre, WrapErr}, Result}; use fs_err as fs; use serde::{Deserialize, Serialize}; -use tracing::{info, warn, instrument}; +use tracing::{info, instrument, warn}; use kinode_process_lib::kernel_types::Erc721Metadata; use crate::KIT_CACHE; use crate::setup::{ - check_js_deps, check_py_deps, check_rust_deps, get_deps, get_newest_valid_node_version, get_python_version, - REQUIRED_PY_PACKAGE, + check_js_deps, check_py_deps, check_rust_deps, get_deps, get_newest_valid_node_version, + get_python_version, REQUIRED_PY_PACKAGE, }; use crate::start_package::zip_directory; use crate::view_api; @@ -21,10 +21,13 @@ const PY_VENV_NAME: &str = "process_env"; const JAVASCRIPT_SRC_PATH: &str = "src/lib.js"; const PYTHON_SRC_PATH: &str = "src/lib.py"; const RUST_SRC_PATH: &str = "src/lib.rs"; -const KINODE_WIT_URL: &str = +const KINODE_WIT_0_7_0_URL: &str = "https://raw.githubusercontent.com/kinode-dao/kinode-wit/aa2c8b11c9171b949d1991c32f58591c0e881f85/kinode.wit"; +const KINODE_WIT_0_8_0_URL: &str = + "https://raw.githubusercontent.com/kinode-dao/kinode-wit/v0.8/kinode.wit"; const WASI_VERSION: &str = "19.0.1"; // TODO: un-hardcode -const DEFAULT_WORLD: &str = "process"; +const DEFAULT_WORLD_0_7_0: &str = "process"; +const DEFAULT_WORLD_0_8_0: &str = "process-v0"; #[derive(Debug, Clone, Serialize, Deserialize)] struct CargoFile { @@ -141,12 +144,11 @@ fn extract_worlds_from_files(directory: &Path) -> Vec { } #[instrument(level = "trace", skip_all)] -fn get_world_or_default(directory: &Path, default_world: Option) -> String { +fn get_world_or_default(directory: &Path, default_world: String) -> String { let worlds = extract_worlds_from_files(directory); if worlds.len() == 1 { return worlds[0].clone(); } - let default_world = default_world.unwrap_or_else(|| DEFAULT_WORLD.to_string()); warn!("Found {} worlds in {directory:?}; defaulting to {default_world}", worlds.len()); default_world } @@ -155,7 +157,7 @@ fn get_world_or_default(directory: &Path, default_world: Option) -> Stri async fn compile_javascript_wasm_process( process_dir: &Path, valid_node: Option, - default_world: Option, + world: String, ) -> Result<()> { info!( "Compiling Javascript Kinode process in {:?}...", @@ -163,7 +165,7 @@ async fn compile_javascript_wasm_process( ); let wasm_file_name = process_dir.file_name().and_then(|s| s.to_str()).unwrap(); - let world_name = get_world_or_default(&process_dir.join("target").join("wit"), default_world); + let world_name = get_world_or_default(&process_dir.join("target").join("wit"), world); let install = "npm install".to_string(); let componentize = format!("node componentize.mjs {wasm_file_name} {world_name}"); @@ -205,12 +207,12 @@ async fn compile_javascript_wasm_process( async fn compile_python_wasm_process( process_dir: &Path, python: &str, - default_world: Option, + world: String, ) -> Result<()> { info!("Compiling Python Kinode process in {:?}...", process_dir); let wasm_file_name = process_dir.file_name().and_then(|s| s.to_str()).unwrap(); - let world_name = get_world_or_default(&process_dir.join("target").join("wit"), default_world); + let world_name = get_world_or_default(&process_dir.join("target").join("wit"), world); let source = format!("source ../{PY_VENV_NAME}/bin/activate"); let install = format!("pip install {REQUIRED_PY_PACKAGE}"); @@ -238,6 +240,7 @@ async fn compile_python_wasm_process( async fn compile_rust_wasm_process( process_dir: &Path, features: &str, + world: String, ) -> Result<()> { info!("Compiling Rust Kinode process in {:?}...", process_dir); @@ -282,15 +285,15 @@ async fn compile_rust_wasm_process( // Build the module using Cargo let mut args = vec![ - "+nightly", - "build", - "--release", - "--no-default-features", - "--target", - "wasm32-wasi", - "--target-dir", - "target", - "--color=always" + "+nightly", + "build", + "--release", + "--no-default-features", + "--target", + "wasm32-wasi", + "--target-dir", + "target", + "--color=always" ]; if !features.is_empty() { args.push("--features"); @@ -344,7 +347,7 @@ async fn compile_rust_wasm_process( "embed", wit_dir.strip_prefix(process_dir).unwrap().to_str().unwrap(), "--world", - "process", + &world, adapted_wasm_file.to_str().unwrap(), "-o", wasm_path.to_str().unwrap(), @@ -426,9 +429,17 @@ async fn compile_package_and_ui( } #[instrument(level = "trace", skip_all)] -async fn build_wit_dir(process_dir: &Path, apis: &HashMap>) -> Result<()> { +async fn build_wit_dir( + process_dir: &Path, + apis: &HashMap>, + wit_version: Option, +) -> Result<()> { let wit_dir = process_dir.join("target").join("wit"); - download_file(KINODE_WIT_URL, &wit_dir.join("kinode.wit")).await?; + let wit_url = match wit_version { + None => KINODE_WIT_0_7_0_URL, + Some(0) | _ => KINODE_WIT_0_8_0_URL, + }; + download_file(wit_url, &wit_dir.join("kinode.wit")).await?; for (file_name, contents) in apis { fs::write(wit_dir.join(file_name), contents)?; } @@ -451,7 +462,8 @@ async fn compile_package_item( entry: std::io::Result, features: String, apis: HashMap>, - default_world: Option, + world: String, + wit_version: Option, ) -> Result<()> { let entry = entry?; let path = entry.path(); @@ -460,18 +472,18 @@ async fn compile_package_item( let is_py_process = path.join(PYTHON_SRC_PATH).exists(); let is_js_process = path.join(JAVASCRIPT_SRC_PATH).exists(); if is_rust_process || is_py_process || is_js_process { - build_wit_dir(&path, &apis).await?; + build_wit_dir(&path, &apis, wit_version).await?; } if is_rust_process { - compile_rust_wasm_process(&path, &features).await?; + compile_rust_wasm_process(&path, &features, world).await?; } else if is_py_process { let python = get_python_version(None, None)? .ok_or_else(|| eyre!("kit requires Python 3.10 or newer"))?; - compile_python_wasm_process(&path, &python, default_world).await?; + compile_python_wasm_process(&path, &python, world).await?; } else if is_js_process { let valid_node = get_newest_valid_node_version(None, None)?; - compile_javascript_wasm_process(&path, valid_node, default_world).await?; + compile_javascript_wasm_process(&path, valid_node, world).await?; } } Ok(()) @@ -589,16 +601,17 @@ async fn compile_package( // TODO: can we use kit-cached deps? return Err(eyre!("Need a node to be able to fetch dependencies")); }; - fetch_dependencies( - dependencies, - &mut apis, - url.clone(), - ).await?; + fetch_dependencies(dependencies, &mut apis, url.clone()).await?; } } } } + let wit_world = default_world.unwrap_or_else(|| match metadata.properties.wit_version { + None => DEFAULT_WORLD_0_7_0.to_string(), + Some(0) | _ => DEFAULT_WORLD_0_8_0.to_string(), + }); + let mut tasks = tokio::task::JoinSet::new(); let features = features.to_string(); for entry in package_dir.read_dir()? { @@ -606,7 +619,8 @@ async fn compile_package( entry, features.clone(), apis.clone(), - default_world.clone(), + wit_world.clone(), + metadata.properties.wit_version, )); } while let Some(res) = tasks.join_next().await { From f4a54a818ab52ed134c58933763e1d759f20a474 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Thu, 23 May 2024 16:48:48 -0700 Subject: [PATCH 21/33] get rid of a compile warning --- Cargo.lock | 2 +- src/start_package/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8e8c1eed..71694e2e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1500,7 +1500,7 @@ dependencies = [ [[package]] name = "kit" -version = "0.4.1" +version = "0.4.2" dependencies = [ "anyhow", "base64 0.21.7", diff --git a/src/start_package/mod.rs b/src/start_package/mod.rs index 2d0103f5..900ae306 100644 --- a/src/start_package/mod.rs +++ b/src/start_package/mod.rs @@ -2,7 +2,7 @@ use sha2::{Sha256, Digest}; use std::io::{Read, Write}; use std::path::Path; -use color_eyre::{Result, eyre::{eyre, WrapErr}}; +use color_eyre::{Result, eyre::eyre}; use fs_err as fs; use serde_json::json; use tracing::{info, instrument}; From facdb98b6ac438393f3643bb804f73471a60a4f5 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Tue, 28 May 2024 17:28:55 -0700 Subject: [PATCH 22/33] build: relax api copying constraint till dependencies fully cooked --- src/build/mod.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/build/mod.rs b/src/build/mod.rs index 89e1a868..9a53b7f6 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -581,14 +581,18 @@ async fn compile_package( let Some(file_name) = path.file_name().and_then(|s| s.to_str()) else { continue; }; - if file_name.starts_with(&format!( - "{}:{}", - metadata.properties.package_name, - metadata.properties.publisher, - )) { - if let Ok(api_contents) = fs::read(&path) { - apis.insert(file_name.to_string(), api_contents); - } + // TODO: reenable check once deps are working + // if file_name.starts_with(&format!( + // "{}:{}", + // metadata.properties.package_name, + // metadata.properties.publisher, + // )) { + // if let Ok(api_contents) = fs::read(&path) { + // apis.insert(file_name.to_string(), api_contents); + // } + // } + if let Ok(api_contents) = fs::read(&path) { + apis.insert(file_name.to_string(), api_contents); } } From e2007c325a0d1d712137df9e249a6002d328521e Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Tue, 28 May 2024 17:29:41 -0700 Subject: [PATCH 23/33] improve cleanup: less erroneous error prints --- src/run_tests/cleanup.rs | 42 ++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/src/run_tests/cleanup.rs b/src/run_tests/cleanup.rs index dac428e4..b4372d85 100644 --- a/src/run_tests/cleanup.rs +++ b/src/run_tests/cleanup.rs @@ -34,14 +34,22 @@ pub async fn cleanup_on_signal( send_to_cleanup: SendBool, mut recv_kill_in_cos: BroadcastRecvBool, ) { - let mut sigalrm = signal(SignalKind::alarm()).expect("kit run-tests: failed to set up SIGALRM handler"); - let mut sighup = signal(SignalKind::hangup()).expect("kit run-tests: failed to set up SIGHUP handler"); - let mut sigint = signal(SignalKind::interrupt()).expect("kit run-tests: failed to set up SIGINT handler"); - let mut sigpipe = signal(SignalKind::pipe()).expect("kit run-tests: failed to set up SIGPIPE handler"); - let mut sigquit = signal(SignalKind::quit()).expect("kit run-tests: failed to set up SIGQUIT handler"); - let mut sigterm = signal(SignalKind::terminate()).expect("kit run-tests: failed to set up SIGTERM handler"); - let mut sigusr1 = signal(SignalKind::user_defined1()).expect("kit run-tests: failed to set up SIGUSR1 handler"); - let mut sigusr2 = signal(SignalKind::user_defined2()).expect("kit run-tests: failed to set up SIGUSR2 handler"); + let mut sigalrm = signal(SignalKind::alarm()) + .expect("kit run-tests: failed to set up SIGALRM handler"); + let mut sighup = signal(SignalKind::hangup()) + .expect("kit run-tests: failed to set up SIGHUP handler"); + let mut sigint = signal(SignalKind::interrupt()) + .expect("kit run-tests: failed to set up SIGINT handler"); + let mut sigpipe = signal(SignalKind::pipe()) + .expect("kit run-tests: failed to set up SIGPIPE handler"); + let mut sigquit = signal(SignalKind::quit()) + .expect("kit run-tests: failed to set up SIGQUIT handler"); + let mut sigterm = signal(SignalKind::terminate()) + .expect("kit run-tests: failed to set up SIGTERM handler"); + let mut sigusr1 = signal(SignalKind::user_defined1()) + .expect("kit run-tests: failed to set up SIGUSR1 handler"); + let mut sigusr2 = signal(SignalKind::user_defined2()) + .expect("kit run-tests: failed to set up SIGUSR2 handler"); tokio::select! { _ = sigalrm.recv() => error!("kit cleanup got SIGALRM\r"), @@ -76,11 +84,16 @@ pub async fn cleanup( Some(nh) => { let mut nh = nh.lock().await; let nh_vec = std::mem::replace(&mut *nh, Vec::new()); - Some(nh_vec.into_iter()) + Some(nh_vec.into_iter().rev()) }, }; - for NodeCleanupInfo { master_fd, process_id, home, anvil_process } in node_cleanup_infos.iter_mut() { + for NodeCleanupInfo { + master_fd, + process_id, + home, + anvil_process, + } in node_cleanup_infos.iter_mut().rev() { // Send Ctrl-C to the process info!("Cleaning up {:?}...\r", home); @@ -107,14 +120,6 @@ pub async fn cleanup( if let Some(mut node_handle) = nh.next() { node_handle.wait().await.ok(); } - //if should_print_std.is_some_and(|b| b) { - // let output = nh.next().and_then(|n| n.wait_with_output().ok()).unwrap(); - // let stdout = remove_repeated_newlines(&String::from_utf8_lossy(&output.stdout)); - // let stderr = remove_repeated_newlines(&String::from_utf8_lossy(&output.stderr)); - // println!("stdout:\n{}\nstderr:\n{}", stdout, stderr); - //} else { - // nh.next().and_then(|mut n| n.wait().ok()).unwrap(); - //} } if remove_node_files && home.exists() { @@ -152,7 +157,6 @@ pub async fn drain_print_runtime( stderr_buffer.push('\n'); } Ok(should_print_std) = recv_kill.recv() => { - println!("len stdout, stderr: {} {}", stdout_buffer.len(), stderr_buffer.len()); if should_print_std { let stdout = remove_repeated_newlines(&stdout_buffer); let stderr = remove_repeated_newlines(&stderr_buffer); From fae56ed71c5972d949fe984238a1813ed5d1fe45 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Tue, 28 May 2024 17:30:16 -0700 Subject: [PATCH 24/33] use tester types --- Cargo.lock | 1 + Cargo.toml | 1 + src/lib.rs | 7 + src/run_tests/mod.rs | 16 +-- src/run_tests/wit/kinode.wit | 201 ++++++++++++++++++++++++++++ src/run_tests/wit/tester:sys-v0.wit | 27 ++++ 6 files changed, 244 insertions(+), 9 deletions(-) create mode 100644 src/run_tests/wit/kinode.wit create mode 100644 src/run_tests/wit/tester:sys-v0.wit diff --git a/Cargo.lock b/Cargo.lock index 17bc57c4..dd5accb6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1529,6 +1529,7 @@ dependencies = [ "tracing-error", "tracing-subscriber", "walkdir", + "wit-bindgen", "zip", ] diff --git a/Cargo.toml b/Cargo.toml index 5991e9db..c32d41d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,6 +41,7 @@ tracing-appender = "0.2" tracing-error = "0.2" tracing-subscriber = { version = "0.3", features = ["env-filter", "json", "std"] } walkdir = "2.4" +wit-bindgen = "0.24.0" zip = "0.6" [[bin]] diff --git a/src/lib.rs b/src/lib.rs index d929252f..3e22c782 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,3 +15,10 @@ pub mod view_api; pub const KIT_CACHE: &str = "/tmp/kinode-kit-cache"; pub const KIT_LOG_PATH_DEFAULT: &str = "/tmp/kinode-kit-cache/logs/log.log"; + +wit_bindgen::generate!({ + path: "src/run_tests/wit", + world: "tester-sys-v0", + generate_unused_types: true, + additional_derives: [serde::Deserialize, serde::Serialize], +}); diff --git a/src/run_tests/mod.rs b/src/run_tests/mod.rs index 823be07f..4cde1f1a 100644 --- a/src/run_tests/mod.rs +++ b/src/run_tests/mod.rs @@ -14,12 +14,12 @@ use crate::chain; use crate::inject_message; use crate::start_package; +use crate::kinode::process::tester::{Response as TesterResponse, FailResponse}; + pub mod cleanup; use cleanup::{cleanup, cleanup_on_signal, drain_print_runtime}; pub mod types; use types::*; -mod tester_types; -use tester_types as tt; fn get_basename(file_path: &Path) -> Option<&str> { file_path @@ -272,14 +272,12 @@ async fn run_tests( match inject_message::parse_response(response).await { Ok(inject_message::Response { ref body, .. }) => { - match serde_json::from_str(body)? { - tt::TesterResponse::Pass => info!("PASS"), - tt::TesterResponse::Fail { test, file, line, column } => { + let TesterResponse::Run(result) = serde_json::from_str(body)?; + match result { + Ok(()) => info!("PASS"), + Err(FailResponse { test, file, line, column }) => { return Err(eyre!("FAIL: {} {}:{}:{}", test, file, line, column)); - }, - tt::TesterResponse::GetFullMessage(_) => { - return Err(eyre!("FAIL: Unexpected Response")); - }, + } } }, Err(e) => { diff --git a/src/run_tests/wit/kinode.wit b/src/run_tests/wit/kinode.wit new file mode 100644 index 00000000..d7475411 --- /dev/null +++ b/src/run_tests/wit/kinode.wit @@ -0,0 +1,201 @@ +package kinode:process@0.8.0; + +interface standard { + // + // System types: + // + + // JSON is passed over WASM boundary as a string. + type json = string; + + type node-id = string; + + // Context, like a message body, is a protocol-defined serialized byte + // array. It is used when building a Request to save information that + // will not be part of a Response, in order to more easily handle + // ("contextualize") that Response. + type context = list; + + record process-id { + process-name: string, + package-name: string, + publisher-node: node-id, + } + + record package-id { + package-name: string, + publisher-node: node-id, + } + + record address { + node: node-id, + process: process-id, + } + + record lazy-load-blob { + mime: option, + bytes: list, + } + + record request { + // set in order to inherit lazy-load-blob from parent message, and if + // expects-response is none, direct response to source of parent. + // also carries forward certain aspects of parent message in kernel, + // see documentation for formal spec and examples. + inherit: bool, + // if some, request expects a response in the given number of seconds + expects-response: option, + body: list, + metadata: option, + capabilities: list, + // to grab lazy-load-blob, use get_blob() + } + + record response { + inherit: bool, + body: list, + metadata: option, + capabilities: list, + // to grab lazy-load-blob, use get_blob() + } + + // A message can be a request or a response. within a response, there is + // a result which surfaces any error that happened because of a request. + // A successful response will contain the context of the request it + // matches, if any was set. + variant message { + request(request), + response(tuple>), + } + + record capability { + issuer: address, + params: json, + } + + // On-exit is a setting that determines what happens when a process + // panics, completes, or otherwise "ends". NOTE: requests should have + // expects-response set to false, will always be set to that by kernel. + variant on-exit { + none, + restart, + requests(list>>), + } + + // Network errors come from trying to send a message to another node. + // A message can fail by timing out, or by the node being entirely + // unreachable (offline). In either case, the message is not delivered + // and the process that sent it receives that message along with any + // assigned context and/or lazy-load-blob, and is free to handle it as it + // sees fit. + record send-error { + kind: send-error-kind, + target: address, + message: message, + lazy-load-blob: option, + } + + enum send-error-kind { + offline, + timeout, + } + + enum spawn-error { + name-taken, + no-file-at-path, + } + + // + // System utils: + // + + print-to-terminal: func(verbosity: u8, message: string); + + // + // Process management: + // + + set-on-exit: func(on-exit: on-exit); + + get-on-exit: func() -> on-exit; + + get-state: func() -> option>; + + set-state: func(bytes: list); + + clear-state: func(); + + spawn: func( + name: option, + wasm-path: string, // must be located within package's drive + on-exit: on-exit, + request-capabilities: list, + // note that we are restricting granting to just messaging the + // newly spawned process + grant-capabilities: list, + public: bool + ) -> result; + + // + // Capabilities management: + // + + // Saves the capabilities to persisted process state. + save-capabilities: func(caps: list); + + // Deletes the capabilities from persisted process state. + drop-capabilities: func(caps: list); + + // Gets all capabilities from persisted process state. + our-capabilities: func() -> list; + + // + // Message I/O: + // + + // Ingest next message when it arrives along with its source. + // Almost all long-running processes will call this in a loop. + receive: func() -> + result, tuple>>; + + // Gets lazy-load-blob, if any, of the message we most recently received. + get-blob: func() -> option; + + // Send message(s) to target(s). + send-request: func( + target: address, + request: request, + context: option, + lazy-load-blob: option + ); + + send-requests: func( + requests: list, + option>> + ); + + send-response: func( + response: response, + lazy-load-blob: option + ); + + // Send a single request, then block (internally) until its response. The + // type returned is Message but will always contain Response. + send-and-await-response: func( + target: address, + request: request, + lazy-load-blob: option + ) -> result, send-error>; +} + +world lib { + import standard; +} + +world process-v0 { + include lib; + + export init: func(our: string); +} diff --git a/src/run_tests/wit/tester:sys-v0.wit b/src/run_tests/wit/tester:sys-v0.wit new file mode 100644 index 00000000..7fe0574b --- /dev/null +++ b/src/run_tests/wit/tester:sys-v0.wit @@ -0,0 +1,27 @@ +interface tester { + variant request { + run(run-request), + } + + variant response { + run(result<_, fail-response>) + } + + record run-request { + input-node-names: list, + test-names: list, + test-timeout: u64, + } + + record fail-response { + test: string, + file: string, + line: u32, + column: u32, + } +} + +world tester-sys-v0 { + import tester; + include process-v0; +} From 9e8faca5afb87eb9e0acdd06a31958fc527c4fd7 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Wed, 29 May 2024 14:44:11 -0700 Subject: [PATCH 25/33] new: fix bug: wit needs kebab-case --- src/new/mod.rs | 2 ++ .../no-ui/chat/api/{package_name}:{publisher}-v0.wit | 6 +++--- .../python/no-ui/chat/api/{package_name}:{publisher}-v0.wit | 6 +++--- .../rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit | 6 +++--- src/new/templates/rust/no-ui/chat/send/src/lib.rs | 2 +- src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs | 2 +- .../no-ui/fibonacci/api/{package_name}:{publisher}-v0.wit | 6 +++--- src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs | 2 +- .../rust/no-ui/fibonacci/{package_name}/src/lib.rs | 2 +- .../file_transfer/api/{package_name}:{publisher}-v0.wit | 6 +++--- .../templates/rust/no-ui/file_transfer/download/src/lib.rs | 2 +- .../rust/no-ui/file_transfer/list_files/src/lib.rs | 2 +- .../templates/rust/no-ui/file_transfer/worker/src/lib.rs | 2 +- .../rust/no-ui/file_transfer/{package_name}/src/lib.rs | 2 +- 14 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/new/mod.rs b/src/new/mod.rs index 1152c225..84db514b 100644 --- a/src/new/mod.rs +++ b/src/new/mod.rs @@ -105,11 +105,13 @@ fn replace_dots(input: &str) -> (String, String) { } fn replace_vars(input: &str, package_name: &str, publisher: &str) -> String { + let package_name_kebab = package_name.replace("_", "-"); let (publisher_dotted_snake, publisher_dotted_kebab) = replace_dots(publisher); let package_name_upper_camel = snake_to_upper_camel_case(package_name); let publisher_dotted_upper_camel = snake_to_upper_camel_case(&publisher_dotted_snake); input .replace("{package_name}", package_name) + .replace("{package_name_kebab}", &package_name_kebab) .replace("{package_name_upper_camel}", &package_name_upper_camel) .replace("{publisher}", publisher) .replace("{publisher_dotted_snake}", &publisher_dotted_snake) diff --git a/src/new/templates/javascript/no-ui/chat/api/{package_name}:{publisher}-v0.wit b/src/new/templates/javascript/no-ui/chat/api/{package_name}:{publisher}-v0.wit index 2aaac95d..32cee559 100644 --- a/src/new/templates/javascript/no-ui/chat/api/{package_name}:{publisher}-v0.wit +++ b/src/new/templates/javascript/no-ui/chat/api/{package_name}:{publisher}-v0.wit @@ -1,4 +1,4 @@ -interface {package_name} { +interface {package_name_kebab} { variant request { send(send-request), /// history of chat with given node @@ -21,7 +21,7 @@ interface {package_name} { } } -world {package_name}-{publisher_dotted_kebab}-v0 { - import {package_name}; +world {package_name_kebab}-{publisher_dotted_kebab}-v0 { + import {package_name_kebab}; include process; } diff --git a/src/new/templates/python/no-ui/chat/api/{package_name}:{publisher}-v0.wit b/src/new/templates/python/no-ui/chat/api/{package_name}:{publisher}-v0.wit index 2aaac95d..32cee559 100644 --- a/src/new/templates/python/no-ui/chat/api/{package_name}:{publisher}-v0.wit +++ b/src/new/templates/python/no-ui/chat/api/{package_name}:{publisher}-v0.wit @@ -1,4 +1,4 @@ -interface {package_name} { +interface {package_name_kebab} { variant request { send(send-request), /// history of chat with given node @@ -21,7 +21,7 @@ interface {package_name} { } } -world {package_name}-{publisher_dotted_kebab}-v0 { - import {package_name}; +world {package_name_kebab}-{publisher_dotted_kebab}-v0 { + import {package_name_kebab}; include process; } diff --git a/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit b/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit index 2aaac95d..32cee559 100644 --- a/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit +++ b/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit @@ -1,4 +1,4 @@ -interface {package_name} { +interface {package_name_kebab} { variant request { send(send-request), /// history of chat with given node @@ -21,7 +21,7 @@ interface {package_name} { } } -world {package_name}-{publisher_dotted_kebab}-v0 { - import {package_name}; +world {package_name_kebab}-{publisher_dotted_kebab}-v0 { + import {package_name_kebab}; include process; } diff --git a/src/new/templates/rust/no-ui/chat/send/src/lib.rs b/src/new/templates/rust/no-ui/chat/send/src/lib.rs index 508f8b28..0496bf49 100644 --- a/src/new/templates/rust/no-ui/chat/send/src/lib.rs +++ b/src/new/templates/rust/no-ui/chat/send/src/lib.rs @@ -5,7 +5,7 @@ use kinode_process_lib::{ wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}-{publisher_dotted_kebab}-v0", + world: "{package_name_kebab}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); diff --git a/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs index c85a523f..4550b7c9 100644 --- a/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/chat/{package_name}/src/lib.rs @@ -6,7 +6,7 @@ use kinode_process_lib::{await_message, call_init, println, Address, ProcessId, wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}-{publisher_dotted_kebab}-v0", + world: "{package_name_kebab}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); diff --git a/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-v0.wit b/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-v0.wit index f13211a8..107a39e0 100644 --- a/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-v0.wit +++ b/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-v0.wit @@ -1,4 +1,4 @@ -interface {package_name} { +interface {package_name_kebab} { variant request { number(u32), numbers(tuple), @@ -10,7 +10,7 @@ interface {package_name} { } } -world {package_name}-{publisher_dotted_kebab}-v0 { - import {package_name}; +world {package_name_kebab}-{publisher_dotted_kebab}-v0 { + import {package_name_kebab}; include process; } diff --git a/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs b/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs index 96b20e74..324f5cdf 100644 --- a/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs +++ b/src/new/templates/rust/no-ui/fibonacci/number/src/lib.rs @@ -5,7 +5,7 @@ use kinode_process_lib::{ wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}-{publisher_dotted_kebab}-v0", + world: "{package_name_kebab}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); diff --git a/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs index 35386e63..89b6952c 100644 --- a/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/fibonacci/{package_name}/src/lib.rs @@ -3,7 +3,7 @@ use kinode_process_lib::{await_message, call_init, println, Address, Response}; wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}-{publisher_dotted_kebab}-v0", + world: "{package_name_kebab}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); diff --git a/src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-v0.wit b/src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-v0.wit index 9e958956..f2c8e21c 100644 --- a/src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-v0.wit +++ b/src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-v0.wit @@ -1,4 +1,4 @@ -interface {package_name} { +interface {package_name_kebab} { use standard.{address}; variant request { @@ -47,7 +47,7 @@ interface {package_name} { } } -world {package_name}-{publisher_dotted_kebab}-v0 { - import {package_name}; +world {package_name_kebab}-{publisher_dotted_kebab}-v0 { + import {package_name_kebab}; include process; } diff --git a/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs index fd44bc44..aedcf1ee 100644 --- a/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs @@ -5,7 +5,7 @@ use kinode_process_lib::{ wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}-{publisher_dotted_kebab}-v0", + world: "{package_name_kebab}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); diff --git a/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs index 271703d7..68d093fb 100644 --- a/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs @@ -5,7 +5,7 @@ use kinode_process_lib::{ wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}-{publisher_dotted_kebab}-v0", + world: "{package_name_kebab}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); diff --git a/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs index 9701c94d..594ebb09 100644 --- a/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs @@ -9,7 +9,7 @@ use kinode_process_lib::{ wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}-{publisher_dotted_kebab}-v0", + world: "{package_name_kebab}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); diff --git a/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs index 5481d61d..53c4761c 100644 --- a/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs @@ -7,7 +7,7 @@ use kinode_process_lib::{ wit_bindgen::generate!({ path: "target/wit", - world: "{package_name}-{publisher_dotted_kebab}-v0", + world: "{package_name_kebab}-{publisher_dotted_kebab}-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize], }); From 25a738d912e087f34bd75399f51906d4d62cef57 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Wed, 29 May 2024 20:46:45 -0700 Subject: [PATCH 26/33] add `test/` to chat --- src/build/mod.rs | 7 +- src/new/mod.rs | 26 +++-- .../api/{package_name}:{publisher}-v0.wit | 2 +- .../templates/rust/no-ui/chat/metadata.json | 1 + .../rust/no-ui/chat/send/Cargo.toml_ | 2 +- .../no-ui/chat/{package_name}/Cargo.toml_ | 2 +- src/new/templates/test/chat/tests.toml | 24 ++++ .../test/chat/{package_name}_test/Cargo.toml_ | 10 ++ .../{package_name}_test/api/tester:sys-v0.wit | 27 +++++ .../api/{package_name}:{publisher}-v0.wit | 27 +++++ .../{package_name}_test:{publisher}-v0.wit | 5 + .../chat/{package_name}_test/metadata.json | 17 +++ .../{package_name}_test/pkg/manifest.json | 13 +++ .../{package_name}_test/Cargo.toml_ | 21 ++++ .../{package_name}_test/src/lib.rs | 108 ++++++++++++++++++ .../{package_name}_test/src/tester_lib.rs | 31 +++++ src/run_tests/mod.rs | 41 +++++-- src/run_tests/tester_types.rs | 91 --------------- 18 files changed, 343 insertions(+), 112 deletions(-) create mode 100644 src/new/templates/test/chat/tests.toml create mode 100644 src/new/templates/test/chat/{package_name}_test/Cargo.toml_ create mode 100644 src/new/templates/test/chat/{package_name}_test/api/tester:sys-v0.wit create mode 100644 src/new/templates/test/chat/{package_name}_test/api/{package_name}:{publisher}-v0.wit create mode 100644 src/new/templates/test/chat/{package_name}_test/api/{package_name}_test:{publisher}-v0.wit create mode 100644 src/new/templates/test/chat/{package_name}_test/metadata.json create mode 100644 src/new/templates/test/chat/{package_name}_test/pkg/manifest.json create mode 100644 src/new/templates/test/chat/{package_name}_test/{package_name}_test/Cargo.toml_ create mode 100644 src/new/templates/test/chat/{package_name}_test/{package_name}_test/src/lib.rs create mode 100644 src/new/templates/test/chat/{package_name}_test/{package_name}_test/src/tester_lib.rs delete mode 100644 src/run_tests/tester_types.rs diff --git a/src/build/mod.rs b/src/build/mod.rs index 9a53b7f6..6bc9bd31 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use std::path::Path; use std::process::Command; -use color_eyre::{eyre::{eyre, WrapErr}, Result}; +use color_eyre::{{eyre::{eyre, WrapErr}, Result}, Section}; use fs_err as fs; use serde::{Deserialize, Serialize}; use tracing::{info, instrument, warn}; @@ -650,9 +650,10 @@ pub async fn execute( return Ok(()); } return Err(eyre!( - "Required `pkg/` dir not found within given input dir {:?} (or cwd, if none given). Please re-run targeting a package.", + "Required `pkg/` dir not found within given input dir {:?} (or cwd, if none given).", package_dir, - )); + ).with_suggestion(|| "Please re-run targeting a package.") + ); } let ui_dir = package_dir.join("ui"); diff --git a/src/new/mod.rs b/src/new/mod.rs index 84db514b..e88b9b7a 100644 --- a/src/new/mod.rs +++ b/src/new/mod.rs @@ -200,16 +200,28 @@ pub fn execute( ui_infix, template.to_string(), ); + let test_prefix = format!( + "test/{}/", + template.to_string(), + ); let mut path_to_content: HashMap = PATH_TO_CONTENT .iter() - .filter_map(|(k, v)| { - k - .strip_prefix(&template_prefix) - .or_else(|| k.strip_prefix(&ui_prefix)) + .filter_map(|(path, content)| { + path.strip_prefix(&template_prefix) + .map(|p| p.to_string()) + .or_else(|| path.strip_prefix(&ui_prefix).map(|p| p.to_string())) + .or_else(|| path.strip_prefix(&test_prefix).map(|p| format!("test/{p}"))) + .or_else(|| { + if path.starts_with(&test_prefix) { + Some(path.to_string()) + } else { + None + } + }) .and_then(|stripped| { - let key = replace_vars(stripped, &package_name, &publisher); - let val = replace_vars(v, &package_name, &publisher); - Some((key, val)) + let modified_path = replace_vars(&stripped, &package_name, &publisher); + let modified_content = replace_vars(content, &package_name, &publisher); + Some((modified_path, modified_content)) }) }) .collect(); diff --git a/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit b/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit index 32cee559..c6eb7c36 100644 --- a/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit +++ b/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit @@ -23,5 +23,5 @@ interface {package_name_kebab} { world {package_name_kebab}-{publisher_dotted_kebab}-v0 { import {package_name_kebab}; - include process; + include process-v0; } diff --git a/src/new/templates/rust/no-ui/chat/metadata.json b/src/new/templates/rust/no-ui/chat/metadata.json index 944b2bb4..940b56a7 100644 --- a/src/new/templates/rust/no-ui/chat/metadata.json +++ b/src/new/templates/rust/no-ui/chat/metadata.json @@ -10,6 +10,7 @@ "code_hashes": { "0.1.0": "" }, + "wit_version": 0, "dependencies": [] }, "external_url": "", diff --git a/src/new/templates/rust/no-ui/chat/send/Cargo.toml_ b/src/new/templates/rust/no-ui/chat/send/Cargo.toml_ index efa24945..bedc0287 100644 --- a/src/new/templates/rust/no-ui/chat/send/Cargo.toml_ +++ b/src/new/templates/rust/no-ui/chat/send/Cargo.toml_ @@ -5,7 +5,7 @@ edition = "2021" [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "b492f3b" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" wit-bindgen = "0.24.0" diff --git a/src/new/templates/rust/no-ui/chat/{package_name}/Cargo.toml_ b/src/new/templates/rust/no-ui/chat/{package_name}/Cargo.toml_ index 084992fe..f644b051 100644 --- a/src/new/templates/rust/no-ui/chat/{package_name}/Cargo.toml_ +++ b/src/new/templates/rust/no-ui/chat/{package_name}/Cargo.toml_ @@ -6,7 +6,7 @@ edition = "2021" [dependencies] anyhow = "1.0" bincode = "1.3.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "b492f3b" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" wit-bindgen = "0.24.0" diff --git a/src/new/templates/test/chat/tests.toml b/src/new/templates/test/chat/tests.toml new file mode 100644 index 00000000..c08a7ee4 --- /dev/null +++ b/src/new/templates/test/chat/tests.toml @@ -0,0 +1,24 @@ +runtime = { FetchVersion = "latest" } +# runtime = { RepoPath = "~/git/kinode" } +runtime_build_release = false + + +[[tests]] +setup_package_paths = [".."] +test_packages = [ + { path = "{package_name}_test", grant_capabilities = ["{package_name}:{package_name}:template.os"] }, +] +timeout_secs = 5 +fakechain_router = 8545 + +[[tests.nodes]] +port = 8080 +home = "home/first" +fake_node_name = "first.dev" +runtime_verbosity = 0 + +[[tests.nodes]] +port = 8081 +home = "home/second" +fake_node_name = "second.dev" +runtime_verbosity = 0 diff --git a/src/new/templates/test/chat/{package_name}_test/Cargo.toml_ b/src/new/templates/test/chat/{package_name}_test/Cargo.toml_ new file mode 100644 index 00000000..6c797c34 --- /dev/null +++ b/src/new/templates/test/chat/{package_name}_test/Cargo.toml_ @@ -0,0 +1,10 @@ +[workspace] +resolver = "2" +members = [ + "{package_name}_test", +] + +[profile.release] +panic = "abort" +opt-level = "s" +lto = true diff --git a/src/new/templates/test/chat/{package_name}_test/api/tester:sys-v0.wit b/src/new/templates/test/chat/{package_name}_test/api/tester:sys-v0.wit new file mode 100644 index 00000000..7fe0574b --- /dev/null +++ b/src/new/templates/test/chat/{package_name}_test/api/tester:sys-v0.wit @@ -0,0 +1,27 @@ +interface tester { + variant request { + run(run-request), + } + + variant response { + run(result<_, fail-response>) + } + + record run-request { + input-node-names: list, + test-names: list, + test-timeout: u64, + } + + record fail-response { + test: string, + file: string, + line: u32, + column: u32, + } +} + +world tester-sys-v0 { + import tester; + include process-v0; +} diff --git a/src/new/templates/test/chat/{package_name}_test/api/{package_name}:{publisher}-v0.wit b/src/new/templates/test/chat/{package_name}_test/api/{package_name}:{publisher}-v0.wit new file mode 100644 index 00000000..c6eb7c36 --- /dev/null +++ b/src/new/templates/test/chat/{package_name}_test/api/{package_name}:{publisher}-v0.wit @@ -0,0 +1,27 @@ +interface {package_name_kebab} { + variant request { + send(send-request), + /// history of chat with given node + history(string), + } + + variant response { + send, + history(list), + } + + record send-request { + target: string, + message: string, + } + + record chat-message { + author: string, + content: string, + } +} + +world {package_name_kebab}-{publisher_dotted_kebab}-v0 { + import {package_name_kebab}; + include process-v0; +} diff --git a/src/new/templates/test/chat/{package_name}_test/api/{package_name}_test:{publisher}-v0.wit b/src/new/templates/test/chat/{package_name}_test/api/{package_name}_test:{publisher}-v0.wit new file mode 100644 index 00000000..79c71980 --- /dev/null +++ b/src/new/templates/test/chat/{package_name}_test/api/{package_name}_test:{publisher}-v0.wit @@ -0,0 +1,5 @@ +world {package_name_kebab}-test-{publisher_dotted_kebab}-v0 { + import {package_name_kebab}; + import tester; + include process-v0; +} diff --git a/src/new/templates/test/chat/{package_name}_test/metadata.json b/src/new/templates/test/chat/{package_name}_test/metadata.json new file mode 100644 index 00000000..cea44761 --- /dev/null +++ b/src/new/templates/test/chat/{package_name}_test/metadata.json @@ -0,0 +1,17 @@ +{ + "name": "{package_name} Test", + "description": "A test for {package_name}.", + "image": "", + "properties": { + "package_name": "{package_name}_test", + "current_version": "0.1.0", + "publisher": "{publisher}", + "mirrors": [], + "code_hashes": { + "0.1.0": "" + }, + "wit_version": 0 + }, + "external_url": "", + "animation_url": "" +} diff --git a/src/new/templates/test/chat/{package_name}_test/pkg/manifest.json b/src/new/templates/test/chat/{package_name}_test/pkg/manifest.json new file mode 100644 index 00000000..61ef3388 --- /dev/null +++ b/src/new/templates/test/chat/{package_name}_test/pkg/manifest.json @@ -0,0 +1,13 @@ +[ + { + "process_name": "{package_name}_test", + "process_wasm_path": "/{package_name}_test.wasm", + "on_exit": "Restart", + "request_networking": false, + "request_capabilities": [], + "grant_capabilities": [ + "{package_name}:{package_name}:{publisher}" + ], + "public": true + } +] diff --git a/src/new/templates/test/chat/{package_name}_test/{package_name}_test/Cargo.toml_ b/src/new/templates/test/chat/{package_name}_test/{package_name}_test/Cargo.toml_ new file mode 100644 index 00000000..402919e0 --- /dev/null +++ b/src/new/templates/test/chat/{package_name}_test/{package_name}_test/Cargo.toml_ @@ -0,0 +1,21 @@ +[package] +name = "{package_name}_test" +version = "0.1.0" +edition = "2021" + +[dependencies] +anyhow = "1.0" +bincode = "1.3" +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "b492f3b" } +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" + +[lib] +crate-type = ["cdylib"] + +[package.metadata.component] +package = "kinode:process" diff --git a/src/new/templates/test/chat/{package_name}_test/{package_name}_test/src/lib.rs b/src/new/templates/test/chat/{package_name}_test/{package_name}_test/src/lib.rs new file mode 100644 index 00000000..531bba95 --- /dev/null +++ b/src/new/templates/test/chat/{package_name}_test/{package_name}_test/src/lib.rs @@ -0,0 +1,108 @@ +use crate::kinode::process::{package_name}::{ChatMessage, Request as ChatRequest, Response as ChatResponse, SendRequest}; +use crate::kinode::process::tester::{Request as TesterRequest, Response as TesterResponse, RunRequest, FailResponse}; + +use kinode_process_lib::{await_message, call_init, print_to_terminal, println, Address, Message, ProcessId, Request, Response}; + +mod tester_lib; + +wit_bindgen::generate!({ + path: "target/wit", + world: "{package_name_kebab}-test-{publisher_dotted_kebab}-v0", + generate_unused_types: true, + additional_derives: [PartialEq, serde::Deserialize, serde::Serialize, process_macros::SerdeJsonInto], +}); + +fn handle_message (our: &Address) -> anyhow::Result<()> { + let message = await_message().unwrap(); + + match message { + Message::Response { .. } => { unimplemented!() }, + Message::Request { ref source, ref body, .. } => { + if our.node != source.node { + return Err(anyhow::anyhow!( + "rejecting foreign Message from {:?}", + source, + )); + } + match serde_json::from_slice(body)? { + TesterRequest::Run(RunRequest { input_node_names: node_names, .. }) => { + print_to_terminal(0, "{package_name}_test: a"); + assert!(node_names.len() >= 2); + if our.node != node_names[0] { + // we are not master node: return + Response::new() + .body(TesterResponse::Run(Ok(()))) + .send() + .unwrap(); + return Ok(()); + } + + // we are master node + + let our_chat_address = Address { + node: our.node.clone(), + process: ProcessId::new(Some("{package_name}"), "{package_name}", "{publisher}"), + }; + let their_chat_address = Address { + node: node_names[1].clone(), + process: ProcessId::new(Some("{package_name}"), "{package_name}", "{publisher}"), + }; + + // Send + print_to_terminal(0, "{package_name}_test: b"); + let message: String = "hello".into(); + let _ = Request::new() + .target(our_chat_address.clone()) + .body(ChatRequest::Send(SendRequest { + target: node_names[1].clone(), + message: message.clone(), + })) + .send_and_await_response(15)?.unwrap(); + + // Get history from receiver & test + print_to_terminal(0, "{package_name}_test: c"); + let response = Request::new() + .target(their_chat_address.clone()) + .body(ChatRequest::History(our.node.clone())) + .send_and_await_response(15)?.unwrap(); + if response.is_request() { panic!("") }; + let ChatResponse::History(messages) = response.body().try_into()? else { + fail!("{package_name}_test"); + }; + let expected_messages = vec![ChatMessage { + author: our.node.clone(), + content: message, + }]; + + if messages != expected_messages { + println!("{messages:?} != {expected_messages:?}"); + fail!("{package_name}_test"); + } + + Response::new() + .body(TesterResponse::Run(Ok(()))) + .send() + .unwrap(); + }, + } + + Ok(()) + }, + } +} + +call_init!(init); +fn init(our: Address) { + print_to_terminal(0, "begin"); + + loop { + match handle_message(&our) { + Ok(()) => {}, + Err(e) => { + print_to_terminal(0, format!("{package_name}_test: error: {e:?}").as_str()); + + fail!("{package_name}_test"); + }, + }; + } +} diff --git a/src/new/templates/test/chat/{package_name}_test/{package_name}_test/src/tester_lib.rs b/src/new/templates/test/chat/{package_name}_test/{package_name}_test/src/tester_lib.rs new file mode 100644 index 00000000..9b367d36 --- /dev/null +++ b/src/new/templates/test/chat/{package_name}_test/{package_name}_test/src/tester_lib.rs @@ -0,0 +1,31 @@ +use crate::kinode::process::tester::{ + Response as TesterResponse, FailResponse, +}; + +#[macro_export] +macro_rules! fail { + ($test:expr) => { + Response::new() + .body(TesterResponse::Run(Err(FailResponse { + test: $test.into(), + file: file!().into(), + line: line!(), + column: column!(), + }))) + .send() + .unwrap(); + panic!("") + }; + ($test:expr, $file:expr, $line:expr, $column:expr) => { + Response::new() + .body(TesterResponse::Run(Err(FailResponse { + test: $test.into(), + file: $file.into(), + line: $line, + column: $column, + }))) + .send() + .unwrap(); + panic!("") + }; +} diff --git a/src/run_tests/mod.rs b/src/run_tests/mod.rs index 4cde1f1a..34a260e3 100644 --- a/src/run_tests/mod.rs +++ b/src/run_tests/mod.rs @@ -289,12 +289,35 @@ async fn run_tests( } #[instrument(level = "trace", skip_all)] -async fn handle_test(detached: bool, runtime_path: &Path, test: Test) -> Result<()> { - for setup_package_path in &test.setup_package_paths { - build::execute(&setup_package_path, false, false, false, "", None, None).await?; // TODO +async fn handle_test( + detached: bool, + runtime_path: &Path, + test: Test, + test_dir_path: &Path, +) -> Result<()> { + let setup_package_paths: Vec = test.setup_package_paths + .iter() + .cloned() + .map(|p| test_dir_path.join(p).canonicalize().unwrap()) + .collect(); + let test_packages: Vec = test.test_packages + .iter() + .cloned() + .map(|tp| { + TestPackage { + path: test_dir_path.join(tp.path).canonicalize().unwrap(), + grant_capabilities: tp.grant_capabilities, + } + }) + .collect(); + //for setup_package_path in &test.setup_package_paths { + // let path = test_dir_path.join(setup_package_path).canonicalize()?; + for path in &setup_package_paths { + build::execute(&path, false, false, false, "", None, None).await?; // TODO } - for TestPackage { ref path, .. } in &test.test_packages { - build::execute(path, false, false, false, "", None, None).await?; // TODO + for TestPackage { ref path, .. } in &test_packages { + let path = test_dir_path.join(path).canonicalize()?; + build::execute(&path, false, false, false, "", None, None).await?; // TODO } // Initialize variables for master node and nodes list @@ -405,10 +428,10 @@ async fn handle_test(detached: bool, runtime_path: &Path, test: Test) -> Result< } for node in &test.nodes { - load_setups(&test.setup_package_paths, node.port.clone()).await?; + load_setups(&setup_package_paths, node.port.clone()).await?; } - load_tests(&test.test_packages, master_node_port.unwrap().clone()).await?; + load_tests(&test_packages, master_node_port.unwrap().clone()).await?; let ports = test.nodes.iter().map(|n| n.port).collect(); @@ -462,8 +485,10 @@ pub async fn execute(config_path: &str) -> Result<()> { }, }; + let test_dir_path = PathBuf::from(config_path).canonicalize()?; + let test_dir_path = test_dir_path.parent().unwrap(); for test in config.tests { - handle_test(detached, &runtime_path, test).await?; + handle_test(detached, &runtime_path, test, &test_dir_path).await?; } Ok(()) diff --git a/src/run_tests/tester_types.rs b/src/run_tests/tester_types.rs deleted file mode 100644 index 73c8c3c7..00000000 --- a/src/run_tests/tester_types.rs +++ /dev/null @@ -1,91 +0,0 @@ -use serde::{Deserialize, Serialize}; - -use kinode_process_lib::kernel_types as kt; -use kinode_process_lib::Address; - -type Rsvp = Option
; - -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct KernelMessage { - pub id: u64, - pub source: Address, - pub target: Address, - pub rsvp: Rsvp, - pub message: kt::Message, - pub lazy_load_blob: Option, -} - -#[derive(Debug, Serialize, Deserialize)] -pub enum TesterRequest { - Run { - input_node_names: Vec, - test_names: Vec, - test_timeout: u64, - }, - KernelMessage(KernelMessage), - GetFullMessage(kt::Message), -} - -#[derive(Debug, Serialize, Deserialize)] -pub struct TesterFail { - pub test: String, - pub file: String, - pub line: u32, - pub column: u32, -} - -#[derive(Debug, Serialize, Deserialize)] -pub enum TesterResponse { - Pass, - Fail { - test: String, - file: String, - line: u32, - column: u32, - }, - GetFullMessage(Option), -} - -#[derive(Debug, Serialize, Deserialize, thiserror::Error)] -pub enum TesterError { - #[error("RejectForeign")] - RejectForeign, - #[error("UnexpectedResponse")] - UnexpectedResponse, - #[error("FAIL {test} {message}")] - Fail { test: String, message: String }, -} - -#[macro_export] -macro_rules! fail { - ($test:expr) => { - Response::new() - .body( - serde_json::to_vec(&tt::TesterResponse::Fail { - test: $test.into(), - file: file!().into(), - line: line!(), - column: column!(), - }) - .unwrap(), - ) - .send() - .unwrap(); - panic!("") - }; - ($test:expr, $file:expr, $line:expr, $column:expr) => { - Response::new() - .body( - serde_json::to_vec(&tt::TesterResponse::Fail { - test: $test.into(), - file: $file.into(), - line: $line, - column: $column, - }) - .unwrap(), - ) - .send() - .unwrap(); - panic!("") - }; -} From 7df01c2b1b599e90ef341aedb4319e739575493b Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Thu, 30 May 2024 19:36:58 -0700 Subject: [PATCH 27/33] new: fix file_transfer --- .../no-ui/file_transfer/download/src/lib.rs | 29 ++++++++-- .../no-ui/file_transfer/list_files/src/lib.rs | 4 +- .../no-ui/file_transfer/worker/src/lib.rs | 44 +++++++++++++-- .../file_transfer/{package_name}/src/lib.rs | 53 +++++++++++++++---- 4 files changed, 111 insertions(+), 19 deletions(-) diff --git a/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs index aedcf1ee..5a10f6c4 100644 --- a/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/download/src/lib.rs @@ -1,6 +1,7 @@ +use crate::kinode::process::standard::{ProcessId as WitProcessId}; use crate::kinode::process::{package_name}::{Address as WitAddress, Request as TransferRequest, DownloadRequest}; use kinode_process_lib::{ - await_next_message_body, call_init, println, Address, Message, Request, + await_next_message_body, call_init, println, Address, Message, ProcessId, Request, }; wit_bindgen::generate!({ @@ -10,6 +11,25 @@ wit_bindgen::generate!({ additional_derives: [serde::Deserialize, serde::Serialize], }); +impl From
for WitAddress { + fn from(address: Address) -> Self { + WitAddress { + node: address.node, + process: address.process.into(), + } + } +} + +impl From for WitProcessId { + fn from(process: ProcessId) -> Self { + WitProcessId { + process_name: process.process_name, + package_name: process.package_name, + publisher_node: process.publisher_node, + } + } +} + call_init!(init); fn init(our: Address) { let Ok(body) = await_next_message_body() else { @@ -19,7 +39,7 @@ fn init(our: Address) { let args = String::from_utf8(body).unwrap_or_default(); let Some((name, who)) = args.split_once(" ") else { - println!("usage: {}@download:{package_name}:{publisher} file_name who", our.node()); + println!("usage: download:{package_name}:{publisher} file_name who"); return }; let our: Address = format!("{}@{package_name}:{package_name}:{publisher}", our.node()) @@ -29,17 +49,16 @@ fn init(our: Address) { let target: Address = format!("{}@{package_name}:{package_name}:{publisher}", who) .parse() .unwrap(); - let target: WitAddress = serde_json::from_str(&serde_json::to_string(&target).unwrap()).unwrap(); let Ok(Ok(Message::Response { .. })) = Request::to(our) .body(serde_json::to_vec(&TransferRequest::Download(DownloadRequest { name: name.into(), - target: target.clone(), + target: target.clone().into(), })).unwrap()) .send_and_await_response(5) else { - println!("did not receive expected Response from {target:?}"); + println!("download: did not receive expected Response from {target:?}"); return; }; } diff --git a/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs index 68d093fb..2ac66a02 100644 --- a/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/list_files/src/lib.rs @@ -11,7 +11,7 @@ wit_bindgen::generate!({ }); call_init!(init); -fn init(our: Address) { +fn init(_our: Address) { let Ok(body) = await_next_message_body() else { println!("failed to get args!"); return; @@ -19,7 +19,7 @@ fn init(our: Address) { let who = String::from_utf8(body).unwrap_or_default(); if who.is_empty() { - println!("usage: {}@list_files:{package_name}:{publisher} who", our); + println!("usage: list_files:{package_name}:{publisher} who"); return; } diff --git a/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs index 594ebb09..4eb9f0d2 100644 --- a/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/worker/src/lib.rs @@ -1,6 +1,7 @@ use std::str::FromStr; -use crate::kinode::process::{package_name}::{Request as TransferRequest, WorkerRequest, ProgressRequest, InitializeRequest, ChunkRequest}; +use crate::kinode::process::standard::{ProcessId as WitProcessId}; +use crate::kinode::process::{package_name}::{Address as WitAddress, Request as TransferRequest, WorkerRequest, ProgressRequest, InitializeRequest, ChunkRequest}; use kinode_process_lib::{ await_message, call_init, get_blob, println, vfs::{open_dir, open_file, Directory, File, SeekFrom}, @@ -14,6 +15,43 @@ wit_bindgen::generate!({ additional_derives: [serde::Deserialize, serde::Serialize], }); +impl From
for WitAddress { + fn from(address: Address) -> Self { + WitAddress { + node: address.node, + process: address.process.into(), + } + } +} + +impl From for WitProcessId { + fn from(process: ProcessId) -> Self { + WitProcessId { + process_name: process.process_name, + package_name: process.package_name, + publisher_node: process.publisher_node, + } + } +} +impl From for Address { + fn from(address: WitAddress) -> Self { + Address { + node: address.node, + process: address.process.into(), + } + } +} + +impl From for ProcessId { + fn from(process: WitProcessId) -> Self { + ProcessId { + process_name: process.process_name, + package_name: process.package_name, + publisher_node: process.publisher_node, + } + } +} + const CHUNK_SIZE: u64 = 1048576; // 1MB fn handle_message( @@ -43,8 +81,8 @@ fn handle_message( open_file(&format!("{}/{}", files_dir.path, &name), true, None)?; match target_worker { - Some(ref target_worker) => { - let target_worker: Address = serde_json::from_str(&serde_json::to_string(target_worker)?)?; + Some(target_worker) => { + let target_worker: Address = target_worker.into(); // we have a target, chunk the data, and send it. let size = active_file.metadata()?.len; let num_chunks = (size as f64 / CHUNK_SIZE as f64).ceil() as u64; diff --git a/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs index 53c4761c..06b9b17a 100644 --- a/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/file_transfer/{package_name}/src/lib.rs @@ -1,8 +1,9 @@ -use crate::kinode::process::{package_name}::{Address as WitAddress, Request as TransferRequest, Response as TransferResponse, WorkerRequest, DownloadRequest, ProgressRequest, FileInfo, InitializeRequest, ChunkRequest}; +use crate::kinode::process::standard::{ProcessId as WitProcessId}; +use crate::kinode::process::{package_name}::{Address as WitAddress, Request as TransferRequest, Response as TransferResponse, WorkerRequest, DownloadRequest, ProgressRequest, FileInfo, InitializeRequest}; use kinode_process_lib::{ await_message, call_init, our_capabilities, println, spawn, vfs::{create_drive, metadata, open_dir, Directory, FileType}, - Address, OnExit, Request, Response, + Address, OnExit, ProcessId, Request, Response, }; wit_bindgen::generate!({ @@ -12,6 +13,43 @@ wit_bindgen::generate!({ additional_derives: [serde::Deserialize, serde::Serialize], }); +impl From
for WitAddress { + fn from(address: Address) -> Self { + WitAddress { + node: address.node, + process: address.process.into(), + } + } +} + +impl From for WitProcessId { + fn from(process: ProcessId) -> Self { + WitProcessId { + process_name: process.process_name, + package_name: process.package_name, + publisher_node: process.publisher_node, + } + } +} +impl From for Address { + fn from(address: WitAddress) -> Self { + Address { + node: address.node, + process: address.process.into(), + } + } +} + +impl From for ProcessId { + fn from(process: WitProcessId) -> Self { + ProcessId { + process_name: process.process_name, + package_name: process.package_name, + publisher_node: process.publisher_node, + } + } +} + fn ls_files(files_dir: &Directory) -> anyhow::Result> { let entries = files_dir.read()?; let files: Vec = entries @@ -45,7 +83,7 @@ fn handle_transfer_request( .body(serde_json::to_vec(&TransferResponse::ListFiles(files))?) .send()?; } - TransferRequest::Download(DownloadRequest { name, ref target }) => { + TransferRequest::Download(DownloadRequest { name, target }) => { // spin up a worker, initialize based on whether it's a downloader or a sender. let our_worker = spawn( None, @@ -60,7 +98,6 @@ fn handle_transfer_request( node: our.node.clone(), process: our_worker, }; - let our_worker_wit_address = serde_json::from_str(&serde_json::to_string(&our_worker_address)?)?; if source.node == our.node { // we want to download a file @@ -73,21 +110,19 @@ fn handle_transfer_request( .send_and_await_response(5)??; // send our initialized worker address to the other node - let target = serde_json::from_str(&serde_json::to_string(target)?)?; Request::new() .body(serde_json::to_vec(&TransferRequest::Download(DownloadRequest { name: name.clone(), - target: our_worker_wit_address, + target: our_worker_address.into(), }))?) - .target(&target) - //.target(&target.into()) + .target::
(target.clone().into()) .send()?; } else { // they want to download a file Request::new() .body(serde_json::to_vec(&WorkerRequest::Initialize(InitializeRequest { name: name.clone(), - target_worker: Some(target.clone()), + target_worker: Some(target), }))?) .target(&our_worker_address) .send()?; From e391e50d04ae7f44942631950b9da0d2be4837c6 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Thu, 30 May 2024 21:56:10 -0700 Subject: [PATCH 28/33] new: add wit_version to chat --- .../rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit | 2 +- src/new/templates/rust/no-ui/chat/metadata.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit b/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit index 32cee559..c6eb7c36 100644 --- a/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit +++ b/src/new/templates/rust/no-ui/chat/api/{package_name}:{publisher}-v0.wit @@ -23,5 +23,5 @@ interface {package_name_kebab} { world {package_name_kebab}-{publisher_dotted_kebab}-v0 { import {package_name_kebab}; - include process; + include process-v0; } diff --git a/src/new/templates/rust/no-ui/chat/metadata.json b/src/new/templates/rust/no-ui/chat/metadata.json index 944b2bb4..940b56a7 100644 --- a/src/new/templates/rust/no-ui/chat/metadata.json +++ b/src/new/templates/rust/no-ui/chat/metadata.json @@ -10,6 +10,7 @@ "code_hashes": { "0.1.0": "" }, + "wit_version": 0, "dependencies": [] }, "external_url": "", From 065fb44b59ca74e26f3872dd503a17619687d74f Mon Sep 17 00:00:00 2001 From: dr-frmr Date: Wed, 5 Jun 2024 15:32:57 -0600 Subject: [PATCH 29/33] fix: serialize `NewPackage` request to app store the new way --- src/start_package/mod.rs | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/start_package/mod.rs b/src/start_package/mod.rs index 900ae306..d939d11d 100644 --- a/src/start_package/mod.rs +++ b/src/start_package/mod.rs @@ -23,8 +23,25 @@ fn new_package( ) -> Result { let message = json!({ "NewPackage": { - "package": {"package_name": package_name, "publisher_node": publisher_node}, - "metadata": metadata, + "package_id": {"package_name": package_name, "publisher_node": publisher_node}, + "metadata": { + "name": metadata.name, + "description": metadata.description, + "image": metadata.image, + "external_url": metadata.external_url, + "animation_url": metadata.animation_url, + "properties": { + "package_name": metadata.properties.package_name, + "publisher": metadata.properties.publisher, + "current_version": metadata.properties.current_version, + "mirrors": metadata.properties.mirrors, + "code_hashes": metadata.properties.code_hashes.clone().into_iter().collect::>(), + "license": metadata.properties.license, + "screenshots": metadata.properties.screenshots, + "wit_version": metadata.properties.wit_version, + "dependencies": metadata.properties.dependencies, + }, + }, "mirror": true } }); From bdf10aca0b4fb31b62255ef74a759b509c8c4eb1 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Thu, 6 Jun 2024 15:09:54 -0700 Subject: [PATCH 30/33] run-tests: allow `kit n foo && kit t foo` --- src/run_tests/mod.rs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/run_tests/mod.rs b/src/run_tests/mod.rs index 5da012d0..ebe435f6 100644 --- a/src/run_tests/mod.rs +++ b/src/run_tests/mod.rs @@ -457,8 +457,26 @@ async fn handle_test( pub async fn execute(config_path: &str) -> Result<()> { let detached = true; // TODO: to arg? - let config_content = fs::read_to_string(config_path)?; - let config = toml::from_str::(&config_content)?.expand_home_paths(); + let config_path = PathBuf::from(config_path); + if !config_path.exists() { + return Err(eyre!("given config path {config_path:?} does not exist")); + } + let config_path = if config_path.is_file() { + config_path + } else { + let config_path = config_path.join("test").join("tests.toml"); + if !config_path.exists() { + return Err(eyre!("given config path {config_path:?} does not exist")); + } + if config_path.is_file() { + config_path + } else { + return Err(eyre!("given config path {config_path:?} is not a file")); + } + }; + + let content = fs::read_to_string(&config_path)?; + let config = toml::from_str::(&content)?.expand_home_paths(); debug!("{:?}", config); From de3f5a52d1707633bf69c4e47ae485606dd08cfa Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Fri, 7 Jun 2024 13:18:24 -0700 Subject: [PATCH 31/33] update chat & add echo, fib tests --- src/new/templates/test/chat/tests.toml | 2 +- .../{package_name}_test/src/lib.rs | 135 +++++++++--------- src/new/templates/test/echo/tests.toml | 18 +++ .../test/echo/{package_name}_test/Cargo.toml_ | 10 ++ .../{package_name}_test/api/tester:sys-v0.wit | 27 ++++ .../echo/{package_name}_test/metadata.json | 17 +++ .../{package_name}_test/pkg/manifest.json | 13 ++ .../{package_name}_test/Cargo.toml_ | 21 +++ .../{package_name}_test/src/lib.rs | 75 ++++++++++ .../{package_name}_test/src/tester_lib.rs | 31 ++++ src/new/templates/test/fibonacci/tests.toml | 18 +++ .../fibonacci/{package_name}_test/Cargo.toml_ | 10 ++ .../{package_name}_test/api/tester:sys-v0.wit | 27 ++++ .../api/{package_name}:{publisher}-v0.wit | 16 +++ .../{package_name}_test:{publisher}-v0.wit | 5 + .../{package_name}_test/metadata.json | 17 +++ .../{package_name}_test/pkg/manifest.json | 13 ++ .../{package_name}_test/Cargo.toml_ | 21 +++ .../{package_name}_test/src/lib.rs | 104 ++++++++++++++ .../{package_name}_test/src/tester_lib.rs | 31 ++++ 20 files changed, 542 insertions(+), 69 deletions(-) create mode 100644 src/new/templates/test/echo/tests.toml create mode 100644 src/new/templates/test/echo/{package_name}_test/Cargo.toml_ create mode 100644 src/new/templates/test/echo/{package_name}_test/api/tester:sys-v0.wit create mode 100644 src/new/templates/test/echo/{package_name}_test/metadata.json create mode 100644 src/new/templates/test/echo/{package_name}_test/pkg/manifest.json create mode 100644 src/new/templates/test/echo/{package_name}_test/{package_name}_test/Cargo.toml_ create mode 100644 src/new/templates/test/echo/{package_name}_test/{package_name}_test/src/lib.rs create mode 100644 src/new/templates/test/echo/{package_name}_test/{package_name}_test/src/tester_lib.rs create mode 100644 src/new/templates/test/fibonacci/tests.toml create mode 100644 src/new/templates/test/fibonacci/{package_name}_test/Cargo.toml_ create mode 100644 src/new/templates/test/fibonacci/{package_name}_test/api/tester:sys-v0.wit create mode 100644 src/new/templates/test/fibonacci/{package_name}_test/api/{package_name}:{publisher}-v0.wit create mode 100644 src/new/templates/test/fibonacci/{package_name}_test/api/{package_name}_test:{publisher}-v0.wit create mode 100644 src/new/templates/test/fibonacci/{package_name}_test/metadata.json create mode 100644 src/new/templates/test/fibonacci/{package_name}_test/pkg/manifest.json create mode 100644 src/new/templates/test/fibonacci/{package_name}_test/{package_name}_test/Cargo.toml_ create mode 100644 src/new/templates/test/fibonacci/{package_name}_test/{package_name}_test/src/lib.rs create mode 100644 src/new/templates/test/fibonacci/{package_name}_test/{package_name}_test/src/tester_lib.rs diff --git a/src/new/templates/test/chat/tests.toml b/src/new/templates/test/chat/tests.toml index c08a7ee4..4dbc9824 100644 --- a/src/new/templates/test/chat/tests.toml +++ b/src/new/templates/test/chat/tests.toml @@ -6,7 +6,7 @@ runtime_build_release = false [[tests]] setup_package_paths = [".."] test_packages = [ - { path = "{package_name}_test", grant_capabilities = ["{package_name}:{package_name}:template.os"] }, + { path = "{package_name}_test", grant_capabilities = ["{package_name}:{package_name}:{publisher}"] }, ] timeout_secs = 5 fakechain_router = 8545 diff --git a/src/new/templates/test/chat/{package_name}_test/{package_name}_test/src/lib.rs b/src/new/templates/test/chat/{package_name}_test/{package_name}_test/src/lib.rs index 531bba95..c0637710 100644 --- a/src/new/templates/test/chat/{package_name}_test/{package_name}_test/src/lib.rs +++ b/src/new/templates/test/chat/{package_name}_test/{package_name}_test/src/lib.rs @@ -1,7 +1,7 @@ use crate::kinode::process::{package_name}::{ChatMessage, Request as ChatRequest, Response as ChatResponse, SendRequest}; use crate::kinode::process::tester::{Request as TesterRequest, Response as TesterResponse, RunRequest, FailResponse}; -use kinode_process_lib::{await_message, call_init, print_to_terminal, println, Address, Message, ProcessId, Request, Response}; +use kinode_process_lib::{await_message, call_init, print_to_terminal, println, Address, ProcessId, Request, Response}; mod tester_lib; @@ -15,80 +15,79 @@ wit_bindgen::generate!({ fn handle_message (our: &Address) -> anyhow::Result<()> { let message = await_message().unwrap(); - match message { - Message::Response { .. } => { unimplemented!() }, - Message::Request { ref source, ref body, .. } => { - if our.node != source.node { - return Err(anyhow::anyhow!( - "rejecting foreign Message from {:?}", - source, - )); - } - match serde_json::from_slice(body)? { - TesterRequest::Run(RunRequest { input_node_names: node_names, .. }) => { - print_to_terminal(0, "{package_name}_test: a"); - assert!(node_names.len() >= 2); - if our.node != node_names[0] { - // we are not master node: return - Response::new() - .body(TesterResponse::Run(Ok(()))) - .send() - .unwrap(); - return Ok(()); - } + if !message.is_request() { + unimplemented!(); + } + let source = message.source(); + if our.node != source.node { + return Err(anyhow::anyhow!( + "rejecting foreign Message from {:?}", + source, + )); + } + let TesterRequest::Run(RunRequest { + input_node_names: node_names, + .. + }) = message.body().try_into()?; + print_to_terminal(0, "{package_name}_test: a"); + assert!(node_names.len() >= 2); + if our.node != node_names[0] { + // we are not master node: return + Response::new() + .body(TesterResponse::Run(Ok(()))) + .send() + .unwrap(); + return Ok(()); + } - // we are master node + // we are master node - let our_chat_address = Address { - node: our.node.clone(), - process: ProcessId::new(Some("{package_name}"), "{package_name}", "{publisher}"), - }; - let their_chat_address = Address { - node: node_names[1].clone(), - process: ProcessId::new(Some("{package_name}"), "{package_name}", "{publisher}"), - }; + let our_chat_address = Address { + node: our.node.clone(), + process: ProcessId::new(Some("{package_name}"), "{package_name}", "{publisher}"), + }; + let their_chat_address = Address { + node: node_names[1].clone(), + process: ProcessId::new(Some("{package_name}"), "{package_name}", "{publisher}"), + }; - // Send - print_to_terminal(0, "{package_name}_test: b"); - let message: String = "hello".into(); - let _ = Request::new() - .target(our_chat_address.clone()) - .body(ChatRequest::Send(SendRequest { - target: node_names[1].clone(), - message: message.clone(), - })) - .send_and_await_response(15)?.unwrap(); + // Send + print_to_terminal(0, "{package_name}_test: b"); + let message: String = "hello".into(); + let _ = Request::new() + .target(our_chat_address.clone()) + .body(ChatRequest::Send(SendRequest { + target: node_names[1].clone(), + message: message.clone(), + })) + .send_and_await_response(15)?.unwrap(); - // Get history from receiver & test - print_to_terminal(0, "{package_name}_test: c"); - let response = Request::new() - .target(their_chat_address.clone()) - .body(ChatRequest::History(our.node.clone())) - .send_and_await_response(15)?.unwrap(); - if response.is_request() { panic!("") }; - let ChatResponse::History(messages) = response.body().try_into()? else { - fail!("{package_name}_test"); - }; - let expected_messages = vec![ChatMessage { - author: our.node.clone(), - content: message, - }]; + // Get history from receiver & test + print_to_terminal(0, "{package_name}_test: c"); + let response = Request::new() + .target(their_chat_address.clone()) + .body(ChatRequest::History(our.node.clone())) + .send_and_await_response(15)?.unwrap(); + if response.is_request() { fail!("{package_name}_test"); }; + let ChatResponse::History(messages) = response.body().try_into()? else { + fail!("{package_name}_test"); + }; + let expected_messages = vec![ChatMessage { + author: our.node.clone(), + content: message, + }]; - if messages != expected_messages { - println!("{messages:?} != {expected_messages:?}"); - fail!("{package_name}_test"); - } + if messages != expected_messages { + println!("{messages:?} != {expected_messages:?}"); + fail!("{package_name}_test"); + } - Response::new() - .body(TesterResponse::Run(Ok(()))) - .send() - .unwrap(); - }, - } + Response::new() + .body(TesterResponse::Run(Ok(()))) + .send() + .unwrap(); - Ok(()) - }, - } + Ok(()) } call_init!(init); diff --git a/src/new/templates/test/echo/tests.toml b/src/new/templates/test/echo/tests.toml new file mode 100644 index 00000000..e1172f01 --- /dev/null +++ b/src/new/templates/test/echo/tests.toml @@ -0,0 +1,18 @@ +runtime = { FetchVersion = "latest" } +# runtime = { RepoPath = "~/git/kinode" } +runtime_build_release = false + + +[[tests]] +setup_package_paths = [".."] +test_packages = [ + { path = "{package_name}_test", grant_capabilities = ["{package_name}:{package_name}:{publisher}"] }, +] +timeout_secs = 5 +fakechain_router = 8545 + +[[tests.nodes]] +port = 8080 +home = "home/first" +fake_node_name = "first.dev" +runtime_verbosity = 0 diff --git a/src/new/templates/test/echo/{package_name}_test/Cargo.toml_ b/src/new/templates/test/echo/{package_name}_test/Cargo.toml_ new file mode 100644 index 00000000..6c797c34 --- /dev/null +++ b/src/new/templates/test/echo/{package_name}_test/Cargo.toml_ @@ -0,0 +1,10 @@ +[workspace] +resolver = "2" +members = [ + "{package_name}_test", +] + +[profile.release] +panic = "abort" +opt-level = "s" +lto = true diff --git a/src/new/templates/test/echo/{package_name}_test/api/tester:sys-v0.wit b/src/new/templates/test/echo/{package_name}_test/api/tester:sys-v0.wit new file mode 100644 index 00000000..7fe0574b --- /dev/null +++ b/src/new/templates/test/echo/{package_name}_test/api/tester:sys-v0.wit @@ -0,0 +1,27 @@ +interface tester { + variant request { + run(run-request), + } + + variant response { + run(result<_, fail-response>) + } + + record run-request { + input-node-names: list, + test-names: list, + test-timeout: u64, + } + + record fail-response { + test: string, + file: string, + line: u32, + column: u32, + } +} + +world tester-sys-v0 { + import tester; + include process-v0; +} diff --git a/src/new/templates/test/echo/{package_name}_test/metadata.json b/src/new/templates/test/echo/{package_name}_test/metadata.json new file mode 100644 index 00000000..cea44761 --- /dev/null +++ b/src/new/templates/test/echo/{package_name}_test/metadata.json @@ -0,0 +1,17 @@ +{ + "name": "{package_name} Test", + "description": "A test for {package_name}.", + "image": "", + "properties": { + "package_name": "{package_name}_test", + "current_version": "0.1.0", + "publisher": "{publisher}", + "mirrors": [], + "code_hashes": { + "0.1.0": "" + }, + "wit_version": 0 + }, + "external_url": "", + "animation_url": "" +} diff --git a/src/new/templates/test/echo/{package_name}_test/pkg/manifest.json b/src/new/templates/test/echo/{package_name}_test/pkg/manifest.json new file mode 100644 index 00000000..61ef3388 --- /dev/null +++ b/src/new/templates/test/echo/{package_name}_test/pkg/manifest.json @@ -0,0 +1,13 @@ +[ + { + "process_name": "{package_name}_test", + "process_wasm_path": "/{package_name}_test.wasm", + "on_exit": "Restart", + "request_networking": false, + "request_capabilities": [], + "grant_capabilities": [ + "{package_name}:{package_name}:{publisher}" + ], + "public": true + } +] diff --git a/src/new/templates/test/echo/{package_name}_test/{package_name}_test/Cargo.toml_ b/src/new/templates/test/echo/{package_name}_test/{package_name}_test/Cargo.toml_ new file mode 100644 index 00000000..402919e0 --- /dev/null +++ b/src/new/templates/test/echo/{package_name}_test/{package_name}_test/Cargo.toml_ @@ -0,0 +1,21 @@ +[package] +name = "{package_name}_test" +version = "0.1.0" +edition = "2021" + +[dependencies] +anyhow = "1.0" +bincode = "1.3" +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "b492f3b" } +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" + +[lib] +crate-type = ["cdylib"] + +[package.metadata.component] +package = "kinode:process" diff --git a/src/new/templates/test/echo/{package_name}_test/{package_name}_test/src/lib.rs b/src/new/templates/test/echo/{package_name}_test/{package_name}_test/src/lib.rs new file mode 100644 index 00000000..7ef21508 --- /dev/null +++ b/src/new/templates/test/echo/{package_name}_test/{package_name}_test/src/lib.rs @@ -0,0 +1,75 @@ +use crate::kinode::process::tester::{Request as TesterRequest, Response as TesterResponse, RunRequest, FailResponse}; + +use kinode_process_lib::{await_message, call_init, print_to_terminal, println, Address, ProcessId, Request, Response}; + +mod tester_lib; + +wit_bindgen::generate!({ + path: "target/wit", + world: "tester-sys-v0", + generate_unused_types: true, + additional_derives: [PartialEq, serde::Deserialize, serde::Serialize, process_macros::SerdeJsonInto], +}); + +fn handle_message (our: &Address) -> anyhow::Result<()> { + let message = await_message().unwrap(); + + if !message.is_request() { + unimplemented!(); + } + let source = message.source(); + if our.node != source.node { + return Err(anyhow::anyhow!( + "rejecting foreign Message from {:?}", + source, + )); + } + let TesterRequest::Run(RunRequest { + input_node_names: node_names, + .. + }) = message.body().try_into()?; + print_to_terminal(0, "{package_name}_test: a"); + assert!(node_names.len() == 1); + + let our_echo_address = Address { + node: our.node.clone(), + process: ProcessId::new(Some("{package_name}"), "{package_name}", "{publisher}"), + }; + + // Send + print_to_terminal(0, "{package_name}_test: b"); + let message: String = "hello".into(); + let response = Request::new() + .target(our_echo_address) + .body(serde_json::to_vec("test")?) + .send_and_await_response(15)?.unwrap(); + if response.is_request() { fail!("{package_name}_test"); }; + if serde_json::json!("Ack") != serde_json::from_slice::( + response.body() + ) { + fail!("{package_name}_test"); + }; + + Response::new() + .body(TesterResponse::Run(Ok(()))) + .send() + .unwrap(); + + Ok(()) +} + +call_init!(init); +fn init(our: Address) { + print_to_terminal(0, "begin"); + + loop { + match handle_message(&our) { + Ok(()) => {}, + Err(e) => { + print_to_terminal(0, format!("{package_name}_test: error: {e:?}").as_str()); + + fail!("{package_name}_test"); + }, + }; + } +} diff --git a/src/new/templates/test/echo/{package_name}_test/{package_name}_test/src/tester_lib.rs b/src/new/templates/test/echo/{package_name}_test/{package_name}_test/src/tester_lib.rs new file mode 100644 index 00000000..9b367d36 --- /dev/null +++ b/src/new/templates/test/echo/{package_name}_test/{package_name}_test/src/tester_lib.rs @@ -0,0 +1,31 @@ +use crate::kinode::process::tester::{ + Response as TesterResponse, FailResponse, +}; + +#[macro_export] +macro_rules! fail { + ($test:expr) => { + Response::new() + .body(TesterResponse::Run(Err(FailResponse { + test: $test.into(), + file: file!().into(), + line: line!(), + column: column!(), + }))) + .send() + .unwrap(); + panic!("") + }; + ($test:expr, $file:expr, $line:expr, $column:expr) => { + Response::new() + .body(TesterResponse::Run(Err(FailResponse { + test: $test.into(), + file: $file.into(), + line: $line, + column: $column, + }))) + .send() + .unwrap(); + panic!("") + }; +} diff --git a/src/new/templates/test/fibonacci/tests.toml b/src/new/templates/test/fibonacci/tests.toml new file mode 100644 index 00000000..e1172f01 --- /dev/null +++ b/src/new/templates/test/fibonacci/tests.toml @@ -0,0 +1,18 @@ +runtime = { FetchVersion = "latest" } +# runtime = { RepoPath = "~/git/kinode" } +runtime_build_release = false + + +[[tests]] +setup_package_paths = [".."] +test_packages = [ + { path = "{package_name}_test", grant_capabilities = ["{package_name}:{package_name}:{publisher}"] }, +] +timeout_secs = 5 +fakechain_router = 8545 + +[[tests.nodes]] +port = 8080 +home = "home/first" +fake_node_name = "first.dev" +runtime_verbosity = 0 diff --git a/src/new/templates/test/fibonacci/{package_name}_test/Cargo.toml_ b/src/new/templates/test/fibonacci/{package_name}_test/Cargo.toml_ new file mode 100644 index 00000000..6c797c34 --- /dev/null +++ b/src/new/templates/test/fibonacci/{package_name}_test/Cargo.toml_ @@ -0,0 +1,10 @@ +[workspace] +resolver = "2" +members = [ + "{package_name}_test", +] + +[profile.release] +panic = "abort" +opt-level = "s" +lto = true diff --git a/src/new/templates/test/fibonacci/{package_name}_test/api/tester:sys-v0.wit b/src/new/templates/test/fibonacci/{package_name}_test/api/tester:sys-v0.wit new file mode 100644 index 00000000..7fe0574b --- /dev/null +++ b/src/new/templates/test/fibonacci/{package_name}_test/api/tester:sys-v0.wit @@ -0,0 +1,27 @@ +interface tester { + variant request { + run(run-request), + } + + variant response { + run(result<_, fail-response>) + } + + record run-request { + input-node-names: list, + test-names: list, + test-timeout: u64, + } + + record fail-response { + test: string, + file: string, + line: u32, + column: u32, + } +} + +world tester-sys-v0 { + import tester; + include process-v0; +} diff --git a/src/new/templates/test/fibonacci/{package_name}_test/api/{package_name}:{publisher}-v0.wit b/src/new/templates/test/fibonacci/{package_name}_test/api/{package_name}:{publisher}-v0.wit new file mode 100644 index 00000000..73615f3f --- /dev/null +++ b/src/new/templates/test/fibonacci/{package_name}_test/api/{package_name}:{publisher}-v0.wit @@ -0,0 +1,16 @@ +interface {package_name_kebab} { + variant request { + number(u32), + numbers(tuple), + } + + variant response { + number(u64), + numbers(tuple), + } +} + +world {package_name_kebab}-{publisher_dotted_kebab}-v0 { + import {package_name_kebab}; + include process-v0; +} diff --git a/src/new/templates/test/fibonacci/{package_name}_test/api/{package_name}_test:{publisher}-v0.wit b/src/new/templates/test/fibonacci/{package_name}_test/api/{package_name}_test:{publisher}-v0.wit new file mode 100644 index 00000000..79c71980 --- /dev/null +++ b/src/new/templates/test/fibonacci/{package_name}_test/api/{package_name}_test:{publisher}-v0.wit @@ -0,0 +1,5 @@ +world {package_name_kebab}-test-{publisher_dotted_kebab}-v0 { + import {package_name_kebab}; + import tester; + include process-v0; +} diff --git a/src/new/templates/test/fibonacci/{package_name}_test/metadata.json b/src/new/templates/test/fibonacci/{package_name}_test/metadata.json new file mode 100644 index 00000000..cea44761 --- /dev/null +++ b/src/new/templates/test/fibonacci/{package_name}_test/metadata.json @@ -0,0 +1,17 @@ +{ + "name": "{package_name} Test", + "description": "A test for {package_name}.", + "image": "", + "properties": { + "package_name": "{package_name}_test", + "current_version": "0.1.0", + "publisher": "{publisher}", + "mirrors": [], + "code_hashes": { + "0.1.0": "" + }, + "wit_version": 0 + }, + "external_url": "", + "animation_url": "" +} diff --git a/src/new/templates/test/fibonacci/{package_name}_test/pkg/manifest.json b/src/new/templates/test/fibonacci/{package_name}_test/pkg/manifest.json new file mode 100644 index 00000000..61ef3388 --- /dev/null +++ b/src/new/templates/test/fibonacci/{package_name}_test/pkg/manifest.json @@ -0,0 +1,13 @@ +[ + { + "process_name": "{package_name}_test", + "process_wasm_path": "/{package_name}_test.wasm", + "on_exit": "Restart", + "request_networking": false, + "request_capabilities": [], + "grant_capabilities": [ + "{package_name}:{package_name}:{publisher}" + ], + "public": true + } +] diff --git a/src/new/templates/test/fibonacci/{package_name}_test/{package_name}_test/Cargo.toml_ b/src/new/templates/test/fibonacci/{package_name}_test/{package_name}_test/Cargo.toml_ new file mode 100644 index 00000000..402919e0 --- /dev/null +++ b/src/new/templates/test/fibonacci/{package_name}_test/{package_name}_test/Cargo.toml_ @@ -0,0 +1,21 @@ +[package] +name = "{package_name}_test" +version = "0.1.0" +edition = "2021" + +[dependencies] +anyhow = "1.0" +bincode = "1.3" +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "b492f3b" } +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" + +[lib] +crate-type = ["cdylib"] + +[package.metadata.component] +package = "kinode:process" diff --git a/src/new/templates/test/fibonacci/{package_name}_test/{package_name}_test/src/lib.rs b/src/new/templates/test/fibonacci/{package_name}_test/{package_name}_test/src/lib.rs new file mode 100644 index 00000000..7e33be91 --- /dev/null +++ b/src/new/templates/test/fibonacci/{package_name}_test/{package_name}_test/src/lib.rs @@ -0,0 +1,104 @@ +use crate::kinode::process::{package_name}::{Request as FibRequest, Response as FibResponse}; +use crate::kinode::process::tester::{Request as TesterRequest, Response as TesterResponse, RunRequest, FailResponse}; + +use kinode_process_lib::{await_message, call_init, print_to_terminal, Address, ProcessId, Request, Response}; + +mod tester_lib; + +wit_bindgen::generate!({ + path: "target/wit", + world: "{package_name_kebab}-test-{publisher_dotted_kebab}-v0", + generate_unused_types: true, + additional_derives: [PartialEq, serde::Deserialize, serde::Serialize, process_macros::SerdeJsonInto], +}); + +fn test_number(n: u32, address: &Address) -> anyhow::Result { + let response = Request::new() + .target(address) + .body(FibRequest::Number(n)) + .send_and_await_response(15)?.unwrap(); + if response.is_request() { fail!("{package_name}_test"); }; + let FibResponse::Number(fib_number) = response.body().try_into()? else { + fail!("{package_name}_test"); + }; + Ok(fib_number) +} + +fn test_numbers(n: u32, n_trials: u32, address: &Address) -> anyhow::Result { + let response = Request::new() + .target(address) + .body(FibRequest::Numbers((n, n_trials))) + .send_and_await_response(15)?.unwrap(); + if response.is_request() { fail!("{package_name}_test"); }; + let FibResponse::Numbers((fib_number, _)) = response.body().try_into()? else { + fail!("{package_name}_test"); + }; + Ok(fib_number) +} + +fn handle_message (our: &Address) -> anyhow::Result<()> { + let message = await_message().unwrap(); + + if !message.is_request() { + unimplemented!(); + } + let source = message.source(); + if our.node != source.node { + return Err(anyhow::anyhow!( + "rejecting foreign Message from {:?}", + source, + )); + } + let TesterRequest::Run(RunRequest { + input_node_names: node_names, + .. + }) = message.body().try_into()?; + print_to_terminal(0, "{package_name}_test: a"); + assert!(node_names.len() == 1); + + let our_fib_address = Address { + node: our.node.clone(), + process: ProcessId::new(Some("{package_name}"), "{package_name}", "{publisher}"), + }; + + let numbers = vec![0, 1, 2, 5, 10, 20, 30, 47]; + let expecteds = vec![0, 1, 1, 5, 55, 6_765, 832_040, 2_971_215_073]; + for (number, expected) in numbers.iter().zip(expecteds.iter()) { + let result = test_number(number.clone(), &our_fib_address)?; + if &result != expected { + fail!("{package_name}_test"); + } + } + + let numbers = vec![0, 1, 2, 5, 10, 20, 30, 47]; + let expecteds = vec![0, 1, 1, 5, 55, 6_765, 832_040, 2_971_215_073]; + for (number, expected) in numbers.iter().zip(expecteds.iter()) { + let result = test_numbers(number.clone(), 5, &our_fib_address)?; + if &result != expected { + fail!("{package_name}_test"); + } + } + + Response::new() + .body(TesterResponse::Run(Ok(()))) + .send() + .unwrap(); + + Ok(()) +} + +call_init!(init); +fn init(our: Address) { + print_to_terminal(0, "begin"); + + loop { + match handle_message(&our) { + Ok(()) => {}, + Err(e) => { + print_to_terminal(0, format!("{package_name}_test: error: {e:?}").as_str()); + + fail!("{package_name}_test"); + }, + }; + } +} diff --git a/src/new/templates/test/fibonacci/{package_name}_test/{package_name}_test/src/tester_lib.rs b/src/new/templates/test/fibonacci/{package_name}_test/{package_name}_test/src/tester_lib.rs new file mode 100644 index 00000000..9b367d36 --- /dev/null +++ b/src/new/templates/test/fibonacci/{package_name}_test/{package_name}_test/src/tester_lib.rs @@ -0,0 +1,31 @@ +use crate::kinode::process::tester::{ + Response as TesterResponse, FailResponse, +}; + +#[macro_export] +macro_rules! fail { + ($test:expr) => { + Response::new() + .body(TesterResponse::Run(Err(FailResponse { + test: $test.into(), + file: file!().into(), + line: line!(), + column: column!(), + }))) + .send() + .unwrap(); + panic!("") + }; + ($test:expr, $file:expr, $line:expr, $column:expr) => { + Response::new() + .body(TesterResponse::Run(Err(FailResponse { + test: $test.into(), + file: $file.into(), + line: $line, + column: $column, + }))) + .send() + .unwrap(); + panic!("") + }; +} From a6d8369174854ce14716615cbe1e27af17facc9f Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Mon, 10 Jun 2024 10:57:43 -0700 Subject: [PATCH 32/33] fix templates --- .../rust/no-ui/chat/send/Cargo.toml_ | 2 +- .../no-ui/chat/{package_name}/Cargo.toml_ | 2 +- .../templates/rust/no-ui/echo/metadata.json | 1 + .../no-ui/echo/{package_name}/Cargo.toml_ | 2 +- .../rust/no-ui/echo/{package_name}/src/lib.rs | 2 +- .../api/{package_name}:{publisher}-v0.wit | 2 +- .../rust/no-ui/fibonacci/metadata.json | 1 + .../rust/no-ui/fibonacci/number/Cargo.toml_ | 2 +- .../fibonacci/{package_name}/Cargo.toml_ | 2 +- .../api/{package_name}:{publisher}-v0.wit | 2 +- .../no-ui/file_transfer/download/Cargo.toml_ | 2 +- .../file_transfer/list_files/Cargo.toml_ | 2 +- .../rust/no-ui/file_transfer/metadata.json | 1 + .../no-ui/file_transfer/worker/Cargo.toml_ | 2 +- .../file_transfer/{package_name}/Cargo.toml_ | 2 +- src/new/templates/rust/ui/chat/metadata.json | 1 + .../rust/ui/chat/{package_name}/Cargo.toml_ | 2 +- .../rust/ui/chat/{package_name}/src/lib.rs | 2 +- .../{package_name}_test/src/lib.rs | 2 +- .../templates/test/file_transfer/tests.toml | 24 ++++ .../{package_name}_test/Cargo.toml_ | 10 ++ .../{package_name}_test/api/tester:sys-v0.wit | 27 ++++ .../api/{package_name}:{publisher}-v0.wit | 53 +++++++ .../{package_name}_test:{publisher}-v0.wit | 5 + .../{package_name}_test/metadata.json | 17 +++ .../{package_name}_test/pkg/manifest.json | 13 ++ .../{package_name}_test/Cargo.toml_ | 21 +++ .../{package_name}_test/src/lib.rs | 135 ++++++++++++++++++ .../{package_name}_test/src/tester_lib.rs | 31 ++++ 29 files changed, 355 insertions(+), 15 deletions(-) create mode 100644 src/new/templates/test/file_transfer/tests.toml create mode 100644 src/new/templates/test/file_transfer/{package_name}_test/Cargo.toml_ create mode 100644 src/new/templates/test/file_transfer/{package_name}_test/api/tester:sys-v0.wit create mode 100644 src/new/templates/test/file_transfer/{package_name}_test/api/{package_name}:{publisher}-v0.wit create mode 100644 src/new/templates/test/file_transfer/{package_name}_test/api/{package_name}_test:{publisher}-v0.wit create mode 100644 src/new/templates/test/file_transfer/{package_name}_test/metadata.json create mode 100644 src/new/templates/test/file_transfer/{package_name}_test/pkg/manifest.json create mode 100644 src/new/templates/test/file_transfer/{package_name}_test/{package_name}_test/Cargo.toml_ create mode 100644 src/new/templates/test/file_transfer/{package_name}_test/{package_name}_test/src/lib.rs create mode 100644 src/new/templates/test/file_transfer/{package_name}_test/{package_name}_test/src/tester_lib.rs diff --git a/src/new/templates/rust/no-ui/chat/send/Cargo.toml_ b/src/new/templates/rust/no-ui/chat/send/Cargo.toml_ index bedc0287..a08adf79 100644 --- a/src/new/templates/rust/no-ui/chat/send/Cargo.toml_ +++ b/src/new/templates/rust/no-ui/chat/send/Cargo.toml_ @@ -5,7 +5,7 @@ edition = "2021" [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "b492f3b" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.0" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" wit-bindgen = "0.24.0" diff --git a/src/new/templates/rust/no-ui/chat/{package_name}/Cargo.toml_ b/src/new/templates/rust/no-ui/chat/{package_name}/Cargo.toml_ index f644b051..c73909b5 100644 --- a/src/new/templates/rust/no-ui/chat/{package_name}/Cargo.toml_ +++ b/src/new/templates/rust/no-ui/chat/{package_name}/Cargo.toml_ @@ -6,7 +6,7 @@ edition = "2021" [dependencies] anyhow = "1.0" bincode = "1.3.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "b492f3b" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.0" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" wit-bindgen = "0.24.0" diff --git a/src/new/templates/rust/no-ui/echo/metadata.json b/src/new/templates/rust/no-ui/echo/metadata.json index 944b2bb4..940b56a7 100644 --- a/src/new/templates/rust/no-ui/echo/metadata.json +++ b/src/new/templates/rust/no-ui/echo/metadata.json @@ -10,6 +10,7 @@ "code_hashes": { "0.1.0": "" }, + "wit_version": 0, "dependencies": [] }, "external_url": "", diff --git a/src/new/templates/rust/no-ui/echo/{package_name}/Cargo.toml_ b/src/new/templates/rust/no-ui/echo/{package_name}/Cargo.toml_ index 084992fe..c73909b5 100644 --- a/src/new/templates/rust/no-ui/echo/{package_name}/Cargo.toml_ +++ b/src/new/templates/rust/no-ui/echo/{package_name}/Cargo.toml_ @@ -6,7 +6,7 @@ edition = "2021" [dependencies] anyhow = "1.0" bincode = "1.3.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.0" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" wit-bindgen = "0.24.0" diff --git a/src/new/templates/rust/no-ui/echo/{package_name}/src/lib.rs b/src/new/templates/rust/no-ui/echo/{package_name}/src/lib.rs index 895a75e7..9b0137fe 100644 --- a/src/new/templates/rust/no-ui/echo/{package_name}/src/lib.rs +++ b/src/new/templates/rust/no-ui/echo/{package_name}/src/lib.rs @@ -2,7 +2,7 @@ use kinode_process_lib::{await_message, call_init, println, Address, Response}; wit_bindgen::generate!({ path: "target/wit", - world: "process", + world: "process-v0", }); fn handle_message(_our: &Address) -> anyhow::Result<()> { diff --git a/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-v0.wit b/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-v0.wit index 107a39e0..73615f3f 100644 --- a/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-v0.wit +++ b/src/new/templates/rust/no-ui/fibonacci/api/{package_name}:{publisher}-v0.wit @@ -12,5 +12,5 @@ interface {package_name_kebab} { world {package_name_kebab}-{publisher_dotted_kebab}-v0 { import {package_name_kebab}; - include process; + include process-v0; } diff --git a/src/new/templates/rust/no-ui/fibonacci/metadata.json b/src/new/templates/rust/no-ui/fibonacci/metadata.json index 944b2bb4..940b56a7 100644 --- a/src/new/templates/rust/no-ui/fibonacci/metadata.json +++ b/src/new/templates/rust/no-ui/fibonacci/metadata.json @@ -10,6 +10,7 @@ "code_hashes": { "0.1.0": "" }, + "wit_version": 0, "dependencies": [] }, "external_url": "", diff --git a/src/new/templates/rust/no-ui/fibonacci/number/Cargo.toml_ b/src/new/templates/rust/no-ui/fibonacci/number/Cargo.toml_ index fb7cb040..27b23008 100644 --- a/src/new/templates/rust/no-ui/fibonacci/number/Cargo.toml_ +++ b/src/new/templates/rust/no-ui/fibonacci/number/Cargo.toml_ @@ -5,7 +5,7 @@ edition = "2021" [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.0" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" wit-bindgen = "0.24.0" diff --git a/src/new/templates/rust/no-ui/fibonacci/{package_name}/Cargo.toml_ b/src/new/templates/rust/no-ui/fibonacci/{package_name}/Cargo.toml_ index 084992fe..c73909b5 100644 --- a/src/new/templates/rust/no-ui/fibonacci/{package_name}/Cargo.toml_ +++ b/src/new/templates/rust/no-ui/fibonacci/{package_name}/Cargo.toml_ @@ -6,7 +6,7 @@ edition = "2021" [dependencies] anyhow = "1.0" bincode = "1.3.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.0" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" wit-bindgen = "0.24.0" diff --git a/src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-v0.wit b/src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-v0.wit index f2c8e21c..3ae9a97c 100644 --- a/src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-v0.wit +++ b/src/new/templates/rust/no-ui/file_transfer/api/{package_name}:{publisher}-v0.wit @@ -49,5 +49,5 @@ interface {package_name_kebab} { world {package_name_kebab}-{publisher_dotted_kebab}-v0 { import {package_name_kebab}; - include process; + include process-v0; } diff --git a/src/new/templates/rust/no-ui/file_transfer/download/Cargo.toml_ b/src/new/templates/rust/no-ui/file_transfer/download/Cargo.toml_ index 6f709749..9355a413 100644 --- a/src/new/templates/rust/no-ui/file_transfer/download/Cargo.toml_ +++ b/src/new/templates/rust/no-ui/file_transfer/download/Cargo.toml_ @@ -5,7 +5,7 @@ edition = "2021" [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "2aa3a1a" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.0" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" wit-bindgen = "0.24.0" diff --git a/src/new/templates/rust/no-ui/file_transfer/list_files/Cargo.toml_ b/src/new/templates/rust/no-ui/file_transfer/list_files/Cargo.toml_ index 719c8c3f..68392bdf 100644 --- a/src/new/templates/rust/no-ui/file_transfer/list_files/Cargo.toml_ +++ b/src/new/templates/rust/no-ui/file_transfer/list_files/Cargo.toml_ @@ -5,7 +5,7 @@ edition = "2021" [dependencies] anyhow = "1.0" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "2aa3a1a" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.0" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" wit-bindgen = "0.24.0" diff --git a/src/new/templates/rust/no-ui/file_transfer/metadata.json b/src/new/templates/rust/no-ui/file_transfer/metadata.json index 944b2bb4..940b56a7 100644 --- a/src/new/templates/rust/no-ui/file_transfer/metadata.json +++ b/src/new/templates/rust/no-ui/file_transfer/metadata.json @@ -10,6 +10,7 @@ "code_hashes": { "0.1.0": "" }, + "wit_version": 0, "dependencies": [] }, "external_url": "", diff --git a/src/new/templates/rust/no-ui/file_transfer/worker/Cargo.toml_ b/src/new/templates/rust/no-ui/file_transfer/worker/Cargo.toml_ index 24838943..65d818ba 100644 --- a/src/new/templates/rust/no-ui/file_transfer/worker/Cargo.toml_ +++ b/src/new/templates/rust/no-ui/file_transfer/worker/Cargo.toml_ @@ -6,7 +6,7 @@ edition = "2021" [dependencies] anyhow = "1.0" bincode = "1.3.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "2aa3a1a" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.0" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" wit-bindgen = "0.24.0" diff --git a/src/new/templates/rust/no-ui/file_transfer/{package_name}/Cargo.toml_ b/src/new/templates/rust/no-ui/file_transfer/{package_name}/Cargo.toml_ index b8884cf5..660e74db 100644 --- a/src/new/templates/rust/no-ui/file_transfer/{package_name}/Cargo.toml_ +++ b/src/new/templates/rust/no-ui/file_transfer/{package_name}/Cargo.toml_ @@ -6,7 +6,7 @@ edition = "2021" [dependencies] anyhow = "1.0" bincode = "1.3.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "2aa3a1a" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.0" } multipart = "0.18.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/src/new/templates/rust/ui/chat/metadata.json b/src/new/templates/rust/ui/chat/metadata.json index 944b2bb4..940b56a7 100644 --- a/src/new/templates/rust/ui/chat/metadata.json +++ b/src/new/templates/rust/ui/chat/metadata.json @@ -10,6 +10,7 @@ "code_hashes": { "0.1.0": "" }, + "wit_version": 0, "dependencies": [] }, "external_url": "", diff --git a/src/new/templates/rust/ui/chat/{package_name}/Cargo.toml_ b/src/new/templates/rust/ui/chat/{package_name}/Cargo.toml_ index 084992fe..c73909b5 100644 --- a/src/new/templates/rust/ui/chat/{package_name}/Cargo.toml_ +++ b/src/new/templates/rust/ui/chat/{package_name}/Cargo.toml_ @@ -6,7 +6,7 @@ edition = "2021" [dependencies] anyhow = "1.0" bincode = "1.3.3" -kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "84b3d84" } +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.0" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" wit-bindgen = "0.24.0" diff --git a/src/new/templates/rust/ui/chat/{package_name}/src/lib.rs b/src/new/templates/rust/ui/chat/{package_name}/src/lib.rs index 209dca43..5522ece5 100644 --- a/src/new/templates/rust/ui/chat/{package_name}/src/lib.rs +++ b/src/new/templates/rust/ui/chat/{package_name}/src/lib.rs @@ -13,7 +13,7 @@ use serde::{Deserialize, Serialize}; wit_bindgen::generate!({ path: "target/wit", - world: "process", + world: "process-v0", }); #[derive(Debug, Serialize, Deserialize)] diff --git a/src/new/templates/test/echo/{package_name}_test/{package_name}_test/src/lib.rs b/src/new/templates/test/echo/{package_name}_test/{package_name}_test/src/lib.rs index 7ef21508..304ca069 100644 --- a/src/new/templates/test/echo/{package_name}_test/{package_name}_test/src/lib.rs +++ b/src/new/templates/test/echo/{package_name}_test/{package_name}_test/src/lib.rs @@ -46,7 +46,7 @@ fn handle_message (our: &Address) -> anyhow::Result<()> { if response.is_request() { fail!("{package_name}_test"); }; if serde_json::json!("Ack") != serde_json::from_slice::( response.body() - ) { + )? { fail!("{package_name}_test"); }; diff --git a/src/new/templates/test/file_transfer/tests.toml b/src/new/templates/test/file_transfer/tests.toml new file mode 100644 index 00000000..4dbc9824 --- /dev/null +++ b/src/new/templates/test/file_transfer/tests.toml @@ -0,0 +1,24 @@ +runtime = { FetchVersion = "latest" } +# runtime = { RepoPath = "~/git/kinode" } +runtime_build_release = false + + +[[tests]] +setup_package_paths = [".."] +test_packages = [ + { path = "{package_name}_test", grant_capabilities = ["{package_name}:{package_name}:{publisher}"] }, +] +timeout_secs = 5 +fakechain_router = 8545 + +[[tests.nodes]] +port = 8080 +home = "home/first" +fake_node_name = "first.dev" +runtime_verbosity = 0 + +[[tests.nodes]] +port = 8081 +home = "home/second" +fake_node_name = "second.dev" +runtime_verbosity = 0 diff --git a/src/new/templates/test/file_transfer/{package_name}_test/Cargo.toml_ b/src/new/templates/test/file_transfer/{package_name}_test/Cargo.toml_ new file mode 100644 index 00000000..6c797c34 --- /dev/null +++ b/src/new/templates/test/file_transfer/{package_name}_test/Cargo.toml_ @@ -0,0 +1,10 @@ +[workspace] +resolver = "2" +members = [ + "{package_name}_test", +] + +[profile.release] +panic = "abort" +opt-level = "s" +lto = true diff --git a/src/new/templates/test/file_transfer/{package_name}_test/api/tester:sys-v0.wit b/src/new/templates/test/file_transfer/{package_name}_test/api/tester:sys-v0.wit new file mode 100644 index 00000000..7fe0574b --- /dev/null +++ b/src/new/templates/test/file_transfer/{package_name}_test/api/tester:sys-v0.wit @@ -0,0 +1,27 @@ +interface tester { + variant request { + run(run-request), + } + + variant response { + run(result<_, fail-response>) + } + + record run-request { + input-node-names: list, + test-names: list, + test-timeout: u64, + } + + record fail-response { + test: string, + file: string, + line: u32, + column: u32, + } +} + +world tester-sys-v0 { + import tester; + include process-v0; +} diff --git a/src/new/templates/test/file_transfer/{package_name}_test/api/{package_name}:{publisher}-v0.wit b/src/new/templates/test/file_transfer/{package_name}_test/api/{package_name}:{publisher}-v0.wit new file mode 100644 index 00000000..3ae9a97c --- /dev/null +++ b/src/new/templates/test/file_transfer/{package_name}_test/api/{package_name}:{publisher}-v0.wit @@ -0,0 +1,53 @@ +interface {package_name_kebab} { + use standard.{address}; + + variant request { + list-files, + download(download-request), + progress(progress-request), + } + + variant response { + list-files(list), + download, + done, + started, + } + + variant worker-request { + initialize(initialize-request), + chunk(chunk-request), + size(u64), + } + + record download-request { + name: string, + target: address, + } + + record progress-request { + name: string, + progress: u64, + } + + record file-info { + name: string, + size: u64, + } + + record initialize-request { + name: string, + target-worker: option
, + } + + record chunk-request { + name: string, + offset: u64, + length: u64, + } +} + +world {package_name_kebab}-{publisher_dotted_kebab}-v0 { + import {package_name_kebab}; + include process-v0; +} diff --git a/src/new/templates/test/file_transfer/{package_name}_test/api/{package_name}_test:{publisher}-v0.wit b/src/new/templates/test/file_transfer/{package_name}_test/api/{package_name}_test:{publisher}-v0.wit new file mode 100644 index 00000000..79c71980 --- /dev/null +++ b/src/new/templates/test/file_transfer/{package_name}_test/api/{package_name}_test:{publisher}-v0.wit @@ -0,0 +1,5 @@ +world {package_name_kebab}-test-{publisher_dotted_kebab}-v0 { + import {package_name_kebab}; + import tester; + include process-v0; +} diff --git a/src/new/templates/test/file_transfer/{package_name}_test/metadata.json b/src/new/templates/test/file_transfer/{package_name}_test/metadata.json new file mode 100644 index 00000000..cea44761 --- /dev/null +++ b/src/new/templates/test/file_transfer/{package_name}_test/metadata.json @@ -0,0 +1,17 @@ +{ + "name": "{package_name} Test", + "description": "A test for {package_name}.", + "image": "", + "properties": { + "package_name": "{package_name}_test", + "current_version": "0.1.0", + "publisher": "{publisher}", + "mirrors": [], + "code_hashes": { + "0.1.0": "" + }, + "wit_version": 0 + }, + "external_url": "", + "animation_url": "" +} diff --git a/src/new/templates/test/file_transfer/{package_name}_test/pkg/manifest.json b/src/new/templates/test/file_transfer/{package_name}_test/pkg/manifest.json new file mode 100644 index 00000000..61ef3388 --- /dev/null +++ b/src/new/templates/test/file_transfer/{package_name}_test/pkg/manifest.json @@ -0,0 +1,13 @@ +[ + { + "process_name": "{package_name}_test", + "process_wasm_path": "/{package_name}_test.wasm", + "on_exit": "Restart", + "request_networking": false, + "request_capabilities": [], + "grant_capabilities": [ + "{package_name}:{package_name}:{publisher}" + ], + "public": true + } +] diff --git a/src/new/templates/test/file_transfer/{package_name}_test/{package_name}_test/Cargo.toml_ b/src/new/templates/test/file_transfer/{package_name}_test/{package_name}_test/Cargo.toml_ new file mode 100644 index 00000000..402919e0 --- /dev/null +++ b/src/new/templates/test/file_transfer/{package_name}_test/{package_name}_test/Cargo.toml_ @@ -0,0 +1,21 @@ +[package] +name = "{package_name}_test" +version = "0.1.0" +edition = "2021" + +[dependencies] +anyhow = "1.0" +bincode = "1.3" +kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "b492f3b" } +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" + +[lib] +crate-type = ["cdylib"] + +[package.metadata.component] +package = "kinode:process" diff --git a/src/new/templates/test/file_transfer/{package_name}_test/{package_name}_test/src/lib.rs b/src/new/templates/test/file_transfer/{package_name}_test/{package_name}_test/src/lib.rs new file mode 100644 index 00000000..c8672e78 --- /dev/null +++ b/src/new/templates/test/file_transfer/{package_name}_test/{package_name}_test/src/lib.rs @@ -0,0 +1,135 @@ +use crate::kinode::process::standard::{ProcessId as WitProcessId}; +use crate::kinode::process::{package_name}::{Address as WitAddress, Request as TransferRequest, Response as TransferResponse, WorkerRequest, DownloadRequest, ProgressRequest, FileInfo, InitializeRequest}; +use crate::kinode::process::tester::{Request as TesterRequest, Response as TesterResponse, RunRequest, FailResponse}; + +use kinode_process_lib::{await_message, call_init, print_to_terminal, println, Address, ProcessId, Request, Response}; + +mod tester_lib; + +wit_bindgen::generate!({ + path: "target/wit", + world: "{package_name_kebab}-test-{publisher_dotted_kebab}-v0", + generate_unused_types: true, + additional_derives: [PartialEq, serde::Deserialize, serde::Serialize, process_macros::SerdeJsonInto], +}); + +fn test_list_files(address: &Address) -> anyhow::Result> { + let response = Request::new() + .target(address) + .body(TransferRequest::ListFiles) + .send_and_await_response(15)?.unwrap(); + if response.is_request() { fail!("{package_name}_test"); }; + let TransferResponse::ListFiles(files) = response.body().try_into()? else { + fail!("{package_name}_test"); + }; + Ok(files) +} + +fn test_download(name: String, our: &Address, address: &Address) -> anyhow::Result<()> { + let response = Request::new() + .target(our) + .body(TransferRequest::Download(DownloadRequest { + name, + target: address, + })) + .send_and_await_response(15)?.unwrap(); + if response.is_request() { fail!("{package_name}_test"); }; + let TransferResponse::Download = response.body().try_into()? else { + fail!("{package_name}_test"); + }; + Ok(()) +} + +fn handle_message (our: &Address) -> anyhow::Result<()> { + let message = await_message().unwrap(); + + if !message.is_request() { + unimplemented!(); + } + let source = message.source(); + if our.node != source.node { + return Err(anyhow::anyhow!( + "rejecting foreign Message from {:?}", + source, + )); + } + let TesterRequest::Run(RunRequest { + input_node_names: node_names, + .. + }) = message.body().try_into()?; + print_to_terminal(0, "{package_name}_test: a"); + assert!(node_names.len() >= 2); + if our.node != node_names[0] { + // we are not master node: return + Response::new() + .body(TesterResponse::Run(Ok(()))) + .send() + .unwrap(); + return Ok(()); + } + + // we are master node + + let our_ft_address = Address { + node: our.node.clone(), + process: ProcessId::new(Some("{package_name}"), "{package_name}", "{publisher}"), + }; + let their_ft_address = Address { + node: node_names[1].clone(), + process: ProcessId::new(Some("{package_name}"), "{package_name}", "{publisher}"), + }; + + // Send + print_to_terminal(0, "{package_name}_test: b"); + let message: String = "hello".into(); + let _ = Request::new() + .target(our_ft_address.clone()) + .body(ChatRequest::Send(SendRequest { + target: node_names[1].clone(), + message: message.clone(), + })) + .send_and_await_response(15)?.unwrap(); + + // Get history from receiver & test + print_to_terminal(0, "{package_name}_test: c"); + let response = Request::new() + .target(their_ft_address.clone()) + .body(ChatRequest::History(our.node.clone())) + .send_and_await_response(15)?.unwrap(); + if response.is_request() { fail!("{package_name}_test"); }; + let ChatResponse::History(messages) = response.body().try_into()? else { + fail!("{package_name}_test"); + }; + let expected_messages = vec![ChatMessage { + author: our.node.clone(), + content: message, + }]; + + if messages != expected_messages { + println!("{messages:?} != {expected_messages:?}"); + fail!("{package_name}_test"); + } + + Response::new() + .body(TesterResponse::Run(Ok(()))) + .send() + .unwrap(); + + Ok(()) +} + +call_init!(init); +fn init(our: Address) { + print_to_terminal(0, "begin"); + + loop { + match handle_message(&our) { + Ok(()) => {}, + Err(e) => { + print_to_terminal(0, format!("{package_name}_test: error: {e:?}").as_str()); + + fail!("{package_name}_test"); + }, + }; + } +} diff --git a/src/new/templates/test/file_transfer/{package_name}_test/{package_name}_test/src/tester_lib.rs b/src/new/templates/test/file_transfer/{package_name}_test/{package_name}_test/src/tester_lib.rs new file mode 100644 index 00000000..9b367d36 --- /dev/null +++ b/src/new/templates/test/file_transfer/{package_name}_test/{package_name}_test/src/tester_lib.rs @@ -0,0 +1,31 @@ +use crate::kinode::process::tester::{ + Response as TesterResponse, FailResponse, +}; + +#[macro_export] +macro_rules! fail { + ($test:expr) => { + Response::new() + .body(TesterResponse::Run(Err(FailResponse { + test: $test.into(), + file: file!().into(), + line: line!(), + column: column!(), + }))) + .send() + .unwrap(); + panic!("") + }; + ($test:expr, $file:expr, $line:expr, $column:expr) => { + Response::new() + .body(TesterResponse::Run(Err(FailResponse { + test: $test.into(), + file: $file.into(), + line: $line, + column: $column, + }))) + .send() + .unwrap(); + panic!("") + }; +} From 6e3c4daed06c0876b2be26933fe11b56d2f26046 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Mon, 10 Jun 2024 11:02:24 -0700 Subject: [PATCH 33/33] bump version --- Cargo.lock | 363 +++++++++++++++++++++++++++++++++++++++++++---------- Cargo.toml | 2 +- 2 files changed, 295 insertions(+), 70 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 43fc2e0d..30361bbd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -88,9 +88,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5277af0cbcc483ee6ad2c1e818090b5928d27f04fd6580680f31c1cf8068bcc2" +checksum = "f783611babedbbe90db3478c120fb5f5daacceffc210b39adc0af4fe0da70bad" dependencies = [ "alloy-rlp", "bytes", @@ -160,9 +160,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30708a79919b082f2692423c8cc72fc250477e4a2ecb0d4a7244cd3cdb299965" +checksum = "4bad41a7c19498e3f6079f7744656328699f8ea3e783bdd10d85788cd439f572" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", @@ -174,9 +174,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a679ac01774ab7e00a567a918d4231ae692c5c8cedaf4e16956c3116d7896" +checksum = "fd9899da7d011b4fe4c406a524ed3e3f963797dbc93b45479d60341d3a27b252" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -192,9 +192,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "356da0c2228aa6675a5faaa08a3e4061b967f924753983d72b9a18d9a3fad44e" +checksum = "d32d595768fdc61331a132b6f65db41afae41b9b97d36c21eb1b955c422a7e60" dependencies = [ "const-hex", "dunce", @@ -207,9 +207,9 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eb5e6234c0b62514992589fe1578f64d418dbc8ef5cd1ab2d7f2f568f599698" +checksum = "a49042c6d3b66a9fe6b2b5a8bf0d39fc2ae1ee0310a2a26ffedd79fb097878dd" dependencies = [ "alloy-primitives", "alloy-sol-macro", @@ -608,9 +608,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" dependencies = [ "jobserver", "libc", @@ -635,18 +635,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" dependencies = [ "anstream", "anstyle", @@ -656,9 +656,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "color-eyre" @@ -892,6 +892,17 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "dunce" version = "1.0.4" @@ -1290,9 +1301,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "9f3935c160d00ac752e09787e6e6bfc26494c2183cc922f1bc678a60d4733bc2" [[package]] name = "httpdate" @@ -1337,6 +1348,124 @@ dependencies = [ "tokio-native-tls", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f8ac670d7422d7f76b32e17a5db556510825b29ec9154f235977c9caba61036" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "id-arena" version = "2.2.1" @@ -1345,12 +1474,14 @@ checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "4716a3a0933a1d01c2f72450e89596eb51dd34ef3c211ccd875acdf1f8fe47ed" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", + "smallvec", + "utf8_iter", ] [[package]] @@ -1500,7 +1631,7 @@ dependencies = [ [[package]] name = "kit" -version = "0.5.3" +version = "0.6.0" dependencies = [ "anyhow", "base64 0.21.7", @@ -1613,6 +1744,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "log" version = "0.4.21" @@ -2029,7 +2166,7 @@ dependencies = [ "rand", "rand_chacha", "rand_xorshift", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", "rusty-fork", "tempfile", "unarray", @@ -2108,14 +2245,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -2129,13 +2266,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] [[package]] @@ -2146,9 +2283,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" @@ -2567,6 +2704,12 @@ dependencies = [ "der", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -2609,9 +2752,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6fe08d08d84f2c0a77f1e7c46518789d745c2e87a2721791ed7c3c9bc78df28" +checksum = "8d71e19bca02c807c9faa67b5a47673ff231b6e7449b251695188522f1dc44b2" dependencies = [ "paste", "proc-macro2", @@ -2625,6 +2768,17 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "system-configuration" version = "0.5.1" @@ -2744,20 +2898,15 @@ dependencies = [ ] [[package]] -name = "tinyvec" -version = "1.6.0" +name = "tinystr" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ - "tinyvec_macros", + "displaydoc", + "zerovec", ] -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" version = "1.38.0" @@ -2864,7 +3013,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.11", + "winnow 0.6.13", ] [[package]] @@ -3054,27 +3203,12 @@ dependencies = [ "version_check", ] -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" version = "1.11.0" @@ -3089,9 +3223,9 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "url" -version = "2.5.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "f7c25da092f0a868cdf09e8674cd3b7ef3a7d92a24253e663a2fb85e2496de56" dependencies = [ "form_urlencoded", "idna", @@ -3104,11 +3238,23 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "valuable" @@ -3455,9 +3601,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.11" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c52728401e1dc672a56e81e593e912aa54c78f40246869f78359a2bf24d29d" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" dependencies = [ "memchr", ] @@ -3566,6 +3712,18 @@ dependencies = [ "wasmparser", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wyz" version = "0.5.1" @@ -3575,6 +3733,51 @@ dependencies = [ "tap", ] +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" @@ -3595,6 +3798,28 @@ dependencies = [ "syn 2.0.66", ] +[[package]] +name = "zerovec" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb2cc8827d6c0994478a15c53f374f46fbd41bea663d809b14744bc42e6b109c" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97cf56601ee5052b4417d90c8755c6683473c926039908196cf35d99f893ebe7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "zip" version = "0.6.6" diff --git a/Cargo.toml b/Cargo.toml index 71696d5f..79e2650e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kit" -version = "0.5.3" +version = "0.6.0" edition = "2021" [build-dependencies]