From 3158048ad1d0c33518cb647d08f927606afcecd0 Mon Sep 17 00:00:00 2001 From: Jarrod Overson Date: Mon, 31 Jul 2023 15:58:09 -0400 Subject: [PATCH] WIP: Added `wick install` (#388) * feat: added `wick install` * fix: using batch and ps1 files vs links on windows * ci: increment wick version * test: added wick install test for local app --------- Co-authored-by: fawadasaurus <99134191+fawadasaurus@users.noreply.github.com> --- Cargo.lock | 4 +- Cargo.toml | 1 + crates/bins/wick/Cargo.toml | 4 +- crates/bins/wick/src/commands.rs | 5 + crates/bins/wick/src/commands/install.rs | 182 ++ crates/bins/wick/src/commands/query.rs | 11 +- .../bins/wick/src/commands/registry/pull.rs | 43 +- crates/bins/wick/src/commands/show/env.rs | 6 +- crates/bins/wick/src/main.rs | 1 + crates/bins/wick/src/oci.rs | 22 + crates/bins/wick/src/options.rs | 27 + crates/wick/flow-expression-parser/src/ast.rs | 2 +- .../src/asset_reference.rs | 15 +- .../src/adapters/binary/interleaved_pairs.rs | 17 +- crates/wick/wick-package/Cargo.toml | 1 + crates/wick/wick-package/src/package.rs | 24 +- examples/components/cli-trigger/.cargo/config | 0 examples/components/cli-trigger/.gitignore | 2 + .../cli-trigger/.vscode/settings.json | 6 + examples/components/cli-trigger/Cargo.lock | 2745 +++++++++++++++++ examples/components/cli-trigger/Cargo.toml | 28 + examples/components/cli-trigger/app.wick | 19 + examples/components/cli-trigger/build.rs | 7 + .../components/cli-trigger/component.wick | 28 + examples/components/cli-trigger/justfile | 49 + examples/components/cli-trigger/src/lib.rs | 10 + examples/components/wasi-fs/src/lib copy.rs | 49 - rust-toolchain.toml | 4 +- tests/cli-tests/src/lib.rs | 14 + .../tests/cmd/install/hello-world.trycmd | 4 + .../cli-tests/tests/cmd/run/hello-world.toml | 5 + 31 files changed, 3209 insertions(+), 126 deletions(-) create mode 100644 crates/bins/wick/src/commands/install.rs create mode 100644 examples/components/cli-trigger/.cargo/config create mode 100644 examples/components/cli-trigger/.gitignore create mode 100644 examples/components/cli-trigger/.vscode/settings.json create mode 100644 examples/components/cli-trigger/Cargo.lock create mode 100644 examples/components/cli-trigger/Cargo.toml create mode 100644 examples/components/cli-trigger/app.wick create mode 100644 examples/components/cli-trigger/build.rs create mode 100644 examples/components/cli-trigger/component.wick create mode 100644 examples/components/cli-trigger/justfile create mode 100644 examples/components/cli-trigger/src/lib.rs delete mode 100644 examples/components/wasi-fs/src/lib copy.rs create mode 100644 tests/cli-tests/tests/cmd/install/hello-world.trycmd create mode 100644 tests/cli-tests/tests/cmd/run/hello-world.toml diff --git a/Cargo.lock b/Cargo.lock index ecfa45c5a..0ee258052 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5090,6 +5090,7 @@ name = "test-codegen-bin" version = "0.1.0" dependencies = [ "wick-component-codegen", + "wick-logger", ] [[package]] @@ -6596,7 +6597,7 @@ dependencies = [ [[package]] name = "wick-cli" -version = "0.10.0" +version = "0.11.0" dependencies = [ "anyhow", "atty", @@ -6972,6 +6973,7 @@ dependencies = [ "clap", "env_logger 0.10.0", "flate2", + "normpath", "serde_json", "sha256", "tar", diff --git a/Cargo.toml b/Cargo.toml index 1c678677b..8d561b2f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -127,6 +127,7 @@ lazy_static = "1.4" liquid = "0.26" liquid-json = "0.5" markup-converter = "0.2" +mslnk = "0.1.8" nkeys = "0.2" nom = "7.1" normpath = "1.1" diff --git a/crates/bins/wick/Cargo.toml b/crates/bins/wick/Cargo.toml index b8059fbde..bc9e07b22 100644 --- a/crates/bins/wick/Cargo.toml +++ b/crates/bins/wick/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wick-cli" -version = "0.10.0" +version = "0.11.0" edition = "2021" default-run = "wick" license = "Elastic-2.0" @@ -13,7 +13,7 @@ cross = ["openssl/vendored"] console = [ "wick-logger/console", "tokio/full", - "tokio/tracing" + "tokio/tracing", ] # Build with RUSTFLAGS="--cfg tokio_unstable" mem-profiler = ["dhat"] diff --git a/crates/bins/wick/src/commands.rs b/crates/bins/wick/src/commands.rs index de6d3f6f8..b94207d6b 100644 --- a/crates/bins/wick/src/commands.rs +++ b/crates/bins/wick/src/commands.rs @@ -1,4 +1,5 @@ pub(crate) mod config; +pub(crate) mod install; pub(crate) mod invoke; pub(crate) mod key; pub(crate) mod list; @@ -55,6 +56,10 @@ pub(crate) enum CliCommand { #[clap(subcommand, name = "new")] New(new::SubCommands), + /// Install a wick app to the local system. + #[clap(name = "install")] + Install(install::Options), + /// Show information about wick's configuration or manifest details. #[clap(subcommand, name = "show")] Show(show::SubCommands), diff --git a/crates/bins/wick/src/commands/install.rs b/crates/bins/wick/src/commands/install.rs new file mode 100644 index 000000000..42c94511e --- /dev/null +++ b/crates/bins/wick/src/commands/install.rs @@ -0,0 +1,182 @@ +use std::path::PathBuf; + +use anyhow::Result; +use clap::Args; +use structured_output::StructuredOutput; +use wick_config::WickConfiguration; +use wick_package::WickPackage; + +use crate::options::reconcile_fetch_options; + +#[derive(Debug, Clone, Args)] +#[clap(rename_all = "kebab-case")] +#[group(skip)] +pub(crate) struct Options { + #[clap(flatten)] + pub(crate) oci: crate::oci::Options, + + /// Alternate path to install to. + #[clap(long = "path", action)] + pub(crate) path: Option, + + /// Path or OCI url to application manifest file. + #[clap(action)] + application: String, +} + +#[allow(clippy::unused_async)] +pub(crate) async fn handle( + opts: Options, + settings: wick_settings::Settings, + span: tracing::Span, +) -> Result { + let xdg = wick_xdg::Settings::new(); + let bin_dir = opts.path.unwrap_or_else(|| xdg.global().root().join("bin")); + std::fs::create_dir_all(&bin_dir)?; + + span.in_scope(|| info!(app = opts.application, path = %bin_dir.display(), "installing wick app")); + + let oci_opts = reconcile_fetch_options(&opts.application, &settings, opts.oci, false, None); + let app_as_path = PathBuf::from(&opts.application); + let package = if app_as_path.exists() { + WickPackage::from_path(&app_as_path).await? + } else { + crate::oci::pull(opts.application, oci_opts).await? + }; + + let path = package.path(); + let config = WickConfiguration::fetch(path.to_string_lossy(), Default::default()) + .await? + .into_inner(); + + let config = match config { + WickConfiguration::App(config) => config, + _ => anyhow::bail!( + "{} is not a wick application, it's a {} configuration", + path.display(), + config.kind() + ), + }; + + let bin_path = bin_dir.join(config.name()); + + #[cfg(not(target_os = "windows"))] + { + std::fs::write(&bin_path, make_sh(path.to_str().unwrap()))?; + + use std::os::unix::fs::PermissionsExt; + + let mut perms = std::fs::metadata(path)?.permissions(); + perms.set_mode(0o755); + + info!(target=%path.to_string_lossy(),bin=%bin_path.to_string_lossy(), "installing"); + std::fs::set_permissions(&bin_path, perms)?; + } + #[cfg(target_os = "windows")] + { + let mut ps1_path = bin_path.clone(); + ps1_path.set_extension("ps1"); + let mut cmd_path = bin_path.clone(); + cmd_path.set_extension("cmd"); + info!(target=%path.to_string_lossy(),cmd=%cmd_path.to_string_lossy(),ps1=%ps1_path.to_string_lossy(), "installing"); + std::fs::write(&cmd_path, make_bat(&path.to_str().unwrap()))?; + std::fs::write(&ps1_path, make_ps1(&path.to_str().unwrap()))?; + } + + let text = format!("installed {} to {}", config.name(), bin_path.display()); + let json = serde_json::json!({ + "name": config.name(), + "path": bin_path, + }); + + let output = StructuredOutput::new(text, json); + + Ok(output) +} + +#[cfg(not(target_os = "windows"))] +fn make_sh(target: &str) -> String { + format!( + r#"#!/bin/sh +basename=$(echo "$0" | sed -e 's,\\\\,/,g') +basedir=$(dirname "$basename") + +case uname in + CYGWIN|MINGW|MSYS) basedir=cygpath -w "$basedir";; +esac + +app_path="{}" + +if [ -x "$basedir/wick" ]; then + exec "$basedir/wick" "run" "$app_path" "$@" +else + exec wick "run" "$app_path" "$@" +fi + "#, + target + ) +} + +#[cfg(target_os = "windows")] +fn make_ps1(target: &str) -> String { + format!( + r#"#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {{ + # Fix case when both the Windows and Linux builds of wick + # are installed in the same directory + $exe=".exe" +}} +$app_path="{}" +$ret=0 +if (Test-Path "$basedir\wick$exe") {{ + # Support pipeline input + if ($MyInvocation.ExpectingInput) {{ + $input | & "$basedir\wick$exe" "run" "$app_path" $args + }} else {{ + & "$basedir\wick$exe" "run" "$app_path" $args + }} + $ret=$LASTEXITCODE +}} else {{ + # Support pipeline input + if ($MyInvocation.ExpectingInput) {{ + $input | & "wick$exe" "run" "$app_path" $args + }} else {{ + & "wick$exe" "run" "$app_path" $args + }} + $ret=$LASTEXITCODE +}} +exit $ret +"#, + target, + ) +} + +#[cfg(target_os = "windows")] +fn make_bat(target: &str) -> String { + format!( + r#"@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +ECHO "%dp0%\wick.exe" + +IF EXIST "%dp0%\wick.exe" ( + SET "_prog=%dp0%\wick.exe" +) ELSE ( + SET "_prog=wick" + SET PATHEXT=%PATHEXT:;.WICK;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "run" "{}" %* +"#, + target + ) +} diff --git a/crates/bins/wick/src/commands/query.rs b/crates/bins/wick/src/commands/query.rs index aa3e1cc70..6d5ac0efc 100644 --- a/crates/bins/wick/src/commands/query.rs +++ b/crates/bins/wick/src/commands/query.rs @@ -115,7 +115,16 @@ pub(crate) async fn handle( match val { Ok(result) => { let result: Value = result.into(); - lines.push(result.to_string()); + if let Value::String(v) = &result { + if opts.raw_output { + lines.push(v.clone()); + } else { + lines.push(result.to_string()); + } + } else { + lines.push(result.to_string()); + } + json.push(result); } Err(e) => error!("Error: {}", e), diff --git a/crates/bins/wick/src/commands/registry/pull.rs b/crates/bins/wick/src/commands/registry/pull.rs index bce310b01..dca218aff 100644 --- a/crates/bins/wick/src/commands/registry/pull.rs +++ b/crates/bins/wick/src/commands/registry/pull.rs @@ -4,9 +4,9 @@ use anyhow::Result; use clap::Args; use structured_output::StructuredOutput; use tracing::Instrument; -use wick_oci_utils::OciOptions; -use crate::options::get_auth_for_scope; +use crate::oci::pull; +use crate::options::reconcile_fetch_options; #[derive(Debug, Clone, Args)] #[clap(rename_all = "kebab-case")] #[group(skip)] @@ -27,50 +27,13 @@ pub(crate) struct Options { pub(crate) oci_opts: crate::oci::Options, } -pub(crate) async fn pull(reference: String, oci_opts: OciOptions) -> Result { - let pull_result = match wick_package::WickPackage::pull(&reference, &oci_opts).await { - Ok(pull_result) => pull_result, - Err(e) => { - if let wick_package::Error::Oci(wick_oci_utils::error::OciError::WouldOverwrite(files)) = &e { - warn!("Pulling {} will overwrite the following files", &reference); - for file in files { - warn!("{}", file.display()); - } - error!("Refusing to overwrite files, pass --force to ignore."); - return Err(anyhow!("Pull failed")); - } - error!("Failed to pull {}: {}", &reference, e); - return Err(anyhow!("Pull failed")); - } - }; - Ok(pull_result) -} - #[allow(clippy::unused_async)] pub(crate) async fn handle( opts: Options, settings: wick_settings::Settings, span: tracing::Span, ) -> Result { - let configured_creds = settings - .credentials - .iter() - .find(|c| opts.reference.starts_with(&c.scope)); - - let (username, password) = get_auth_for_scope( - configured_creds, - opts.oci_opts.username.as_deref(), - opts.oci_opts.password.as_deref(), - ); - - let mut oci_opts = wick_oci_utils::OciOptions::default(); - oci_opts - .set_allow_insecure(opts.oci_opts.insecure_registries) - .set_allow_latest(true) - .set_username(username) - .set_password(password) - .set_overwrite(opts.force) - .set_cache_dir(opts.output); + let oci_opts = reconcile_fetch_options(&opts.reference, &settings, opts.oci_opts, opts.force, Some(opts.output)); span.in_scope(|| debug!(options=?oci_opts, reference= opts.reference, "pulling reference")); diff --git a/crates/bins/wick/src/commands/show/env.rs b/crates/bins/wick/src/commands/show/env.rs index e4b1abc5c..a71046013 100644 --- a/crates/bins/wick/src/commands/show/env.rs +++ b/crates/bins/wick/src/commands/show/env.rs @@ -14,16 +14,14 @@ pub(crate) async fn handle( _span: tracing::Span, ) -> Result { let settings_text = serde_yaml::to_string(&settings)?; - let settings_json = serde_json::to_string(&settings)?; let xdg = wick_xdg::Settings::new(); let env_text = serde_yaml::to_string(&xdg)?; - let env_json = serde_json::to_string(&xdg)?; let json = serde_json::json!({ - "settings": settings_json, - "env": env_json, + "settings": &settings, + "env": &xdg, }); let text = format!( diff --git a/crates/bins/wick/src/main.rs b/crates/bins/wick/src/main.rs index d20fb765f..322dc484f 100644 --- a/crates/bins/wick/src/main.rs +++ b/crates/bins/wick/src/main.rs @@ -265,6 +265,7 @@ async fn async_main(cli: Cli, settings: wick_settings::Settings) -> Result commands::rpc::stats::handle(cmd, settings, span).await, }, CliCommand::Query(cmd) => commands::query::handle(cmd, settings, span).await, + CliCommand::Install(cmd) => commands::install::handle(cmd, settings, span).await, CliCommand::New(cmd) => match cmd { new::SubCommands::Component(cmd) => match cmd { new::component::SubCommands::Http(cmd) => new::component::http::handle(cmd, settings, span).await, diff --git a/crates/bins/wick/src/oci.rs b/crates/bins/wick/src/oci.rs index e71e6802d..58e2a8900 100644 --- a/crates/bins/wick/src/oci.rs +++ b/crates/bins/wick/src/oci.rs @@ -32,3 +32,25 @@ impl From for wick_config::FetchOptions { fetch_options } } + +pub(crate) async fn pull( + reference: String, + oci_opts: wick_oci_utils::OciOptions, +) -> Result { + let pull_result = match wick_package::WickPackage::pull(&reference, &oci_opts).await { + Ok(pull_result) => pull_result, + Err(e) => { + if let wick_package::Error::Oci(wick_oci_utils::error::OciError::WouldOverwrite(files)) = &e { + warn!("Pulling {} will overwrite the following files", &reference); + for file in files { + warn!("{}", file.display()); + } + error!("Refusing to overwrite files, pass --force to ignore."); + return Err(anyhow!("Pull failed")); + } + error!("Failed to pull {}: {}", &reference, e); + return Err(anyhow!("Pull failed")); + } + }; + Ok(pull_result) +} diff --git a/crates/bins/wick/src/options.rs b/crates/bins/wick/src/options.rs index 34858e4d6..aa2bc945b 100644 --- a/crates/bins/wick/src/options.rs +++ b/crates/bins/wick/src/options.rs @@ -1,4 +1,7 @@ +use std::path::PathBuf; + use clap::Args; +use wick_oci_utils::OciOptions; use wick_settings::Credential; #[derive(Args, Debug, Default, Clone)] @@ -126,3 +129,27 @@ pub(crate) fn get_auth_for_scope( (username, password) } + +pub(crate) fn reconcile_fetch_options( + reference: &str, + settings: &wick_settings::Settings, + opts: crate::oci::Options, + force: bool, + output: Option, +) -> OciOptions { + let configured_creds = settings.credentials.iter().find(|c| reference.starts_with(&c.scope)); + + let (username, password) = get_auth_for_scope(configured_creds, opts.username.as_deref(), opts.password.as_deref()); + + let mut oci_opts = OciOptions::default(); + oci_opts + .set_allow_insecure(opts.insecure_registries) + .set_allow_latest(true) + .set_username(username) + .set_password(password) + .set_overwrite(force); + if let Some(output) = output { + oci_opts.set_cache_dir(output); + } + oci_opts +} diff --git a/crates/wick/flow-expression-parser/src/ast.rs b/crates/wick/flow-expression-parser/src/ast.rs index 667517158..e1d284717 100644 --- a/crates/wick/flow-expression-parser/src/ast.rs +++ b/crates/wick/flow-expression-parser/src/ast.rs @@ -466,7 +466,7 @@ impl std::fmt::Display for ConnectionTargetExpression { #[allow(clippy::option_if_let_else)] if let Some(_data) = &self.data { // TODO: Implement data syntax. There's no way of stringifying this yet. - Err(std::fmt::Error::default()) + Err(std::fmt::Error) } else { write!(f, "{}.{}", self.instance, self.port) } diff --git a/crates/wick/wick-asset-reference/src/asset_reference.rs b/crates/wick/wick-asset-reference/src/asset_reference.rs index baff86e06..3435883ff 100644 --- a/crates/wick/wick-asset-reference/src/asset_reference.rs +++ b/crates/wick/wick-asset-reference/src/asset_reference.rs @@ -91,8 +91,8 @@ impl AssetReference { let base_dir = base_dir.normalize().map_err(|_| Error::NotFound(path.clone()))?; let mut base_dir = base_dir.as_path().to_string_lossy().to_string(); - if !base_dir.ends_with('/') { - base_dir.push('/'); + if !base_dir.ends_with(std::path::MAIN_SEPARATOR_STR) { + base_dir.push_str(std::path::MAIN_SEPARATOR_STR); } path.strip_prefix(&base_dir).map_or_else( @@ -188,7 +188,7 @@ impl Asset for AssetReference { return Err(assets::Error::IsDirectory(path.clone())); } - debug!(path = ?path, "fetching local asset"); + debug!(path = %path.display(), "fetching local asset"); let mut file = tokio::fs::File::open(&path) .await .map_err(|err| assets::Error::FileOpen(path.clone(), err.to_string()))?; @@ -198,7 +198,7 @@ impl Asset for AssetReference { Ok(bytes) } else { let path = location; - debug!(path = ?path, "fetching remote asset"); + debug!(%path, "fetching remote asset"); let (cache_loc, bytes) = retrieve_remote(&path, options) .await .map_err(|err| assets::Error::RemoteFetch(path, err.to_string()))?; @@ -305,11 +305,12 @@ mod test { location.set_baseurl(&crate_dir); println!("crate_dir: {}", crate_dir.to_string_lossy()); println!("actual: {:#?}", location); - let mut expected = PathBuf::from(&crate_dir); - expected.push("../src/utils.rs"); + let expected = PathBuf::from(&crate_dir); + let expected = expected.join("..").join("src").join("utils.rs"); println!("expected: {}", expected.to_string_lossy()); + println!("actual: {}", location.path()?.to_string_lossy()); - let expected = expected.canonicalize()?; + let expected = expected.normalize()?; assert_eq!(location.path()?, expected); Ok(()) diff --git a/crates/wick/wick-component/src/adapters/binary/interleaved_pairs.rs b/crates/wick/wick-component/src/adapters/binary/interleaved_pairs.rs index 6caebb693..70f1e993e 100644 --- a/crates/wick/wick-component/src/adapters/binary/interleaved_pairs.rs +++ b/crates/wick/wick-component/src/adapters/binary/interleaved_pairs.rs @@ -1,4 +1,5 @@ use tokio_stream::StreamExt; +use wasmrs_runtime::BoxFuture; use wick_packet::Packet; use crate::adapters::encode; @@ -27,7 +28,7 @@ macro_rules! binary_interleaved_pairs { mut outputs: Self::Outputs, ctx: Context, ) -> Result<(), Self::Error> { - wick_component::binary::interleaved_pairs(left, right, &mut outputs, &ctx, $name).await?; + wick_component::binary::interleaved_pairs(left, right, &mut outputs, &ctx, &$name).await?; Ok(()) } @@ -41,18 +42,18 @@ pub async fn interleaved_pairs<'c, LEFT, RIGHT, OUTPUT, CONTEXT, OUTPORT, F, E>( right: WickStream, outputs: &mut OUTPORT, ctx: &'c CONTEXT, - func: F, + func: &'static F, ) -> Result<(), E> where CONTEXT: Clone + wasmrs_runtime::ConditionallySendSync, - F: Fn(LEFT, RIGHT, CONTEXT) -> Result + wasmrs_runtime::ConditionallySendSync, + F: Fn(LEFT, RIGHT, CONTEXT) -> BoxFuture> + wasmrs_runtime::ConditionallySendSync, OUTPORT: SingleOutput + wasmrs_runtime::ConditionallySendSync, LEFT: serde::de::DeserializeOwned + Clone + wasmrs_runtime::ConditionallySendSync, RIGHT: serde::de::DeserializeOwned + Clone + wasmrs_runtime::ConditionallySendSync, OUTPUT: serde::Serialize + wasmrs_runtime::ConditionallySendSync, E: std::fmt::Display + wasmrs_runtime::ConditionallySendSync, { - let (_, _) = inner::(None, None, left, right, outputs, ctx, &func).await; + let (_, _) = inner::(None, None, left, right, outputs, ctx, func).await; outputs.single_output().done(); Ok(()) @@ -71,7 +72,7 @@ async fn inner<'f, 'out, 'c, LEFT, RIGHT, OUTPUT, CONTEXT, OUTPORT, F, E>( ) -> (WickStream, WickStream) where CONTEXT: Clone + wasmrs_runtime::ConditionallySendSync, - F: Fn(LEFT, RIGHT, CONTEXT) -> Result + wasmrs_runtime::ConditionallySendSync, + F: Fn(LEFT, RIGHT, CONTEXT) -> BoxFuture> + wasmrs_runtime::ConditionallySendSync, OUTPORT: SingleOutput + wasmrs_runtime::ConditionallySendSync, LEFT: serde::de::DeserializeOwned + Clone + wasmrs_runtime::ConditionallySendSync, RIGHT: serde::de::DeserializeOwned + Clone + wasmrs_runtime::ConditionallySendSync, @@ -92,7 +93,7 @@ where let right: RIGHT = propagate_if_error!(right.decode(), outputs, continue); outputs .single_output() - .send_raw_payload(encode(func(left.clone(), right, ctx.clone()))); + .send_raw_payload(encode(func(left.clone(), right, ctx.clone()).await)); } } (None, Some(right)) => { @@ -107,7 +108,7 @@ where let left: LEFT = propagate_if_error!(left.decode(), outputs, continue); outputs .single_output() - .send_raw_payload(encode(func(left, right.clone(), ctx.clone()))); + .send_raw_payload(encode(func(left, right.clone(), ctx.clone()).await)); } } (None, None) => { @@ -142,7 +143,7 @@ where let right: RIGHT = propagate_if_error!(right.decode(), outputs, continue); outputs .single_output() - .send_raw_payload(encode(func(left, right, ctx.clone()))); + .send_raw_payload(encode(func(left, right, ctx.clone()).await)); } } } diff --git a/crates/wick/wick-package/Cargo.toml b/crates/wick/wick-package/Cargo.toml index 57913198d..80cedf722 100644 --- a/crates/wick/wick-package/Cargo.toml +++ b/crates/wick/wick-package/Cargo.toml @@ -18,6 +18,7 @@ sha256 = { workspace = true } tar = { workspace = true } flate2 = { workspace = true } tracing = { workspace = true } +normpath = { workspace = true } [dev-dependencies] tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } diff --git a/crates/wick/wick-package/src/package.rs b/crates/wick/wick-package/src/package.rs index 8658990be..13076d0da 100644 --- a/crates/wick/wick-package/src/package.rs +++ b/crates/wick/wick-package/src/package.rs @@ -3,6 +3,7 @@ use std::future::Future; use std::path::{Path, PathBuf}; use asset_container::{Asset, AssetFlags, AssetManager, Assets}; +use normpath::PathExt; use sha256::digest; use tokio::fs; use tracing::trace; @@ -142,13 +143,14 @@ impl WickPackage { ) { return Err(Error::InvalidWickConfig(path.to_string_lossy().to_string())); } - let full_path = tokio::fs::canonicalize(path) - .await - .map_err(|e| Error::ReadFile(path.to_path_buf(), e))?; + let full_path = path + .normalize() + .map_err(|e| Error::ReadFile(path.to_path_buf(), e))? + .into_path_buf(); + let parent_dir = full_path .parent() .map_or_else(|| PathBuf::from("/"), |v| v.to_path_buf()); - let extra_files; if config.metadata().is_none() { return Err(Error::NoMetadata(path.to_string_lossy().to_string())); @@ -165,27 +167,27 @@ impl WickPackage { }; let registry = config.package().and_then(|package| package.registry().cloned()); - let (version, parent_dir) = match &config { + let (version, extra_files) = match &config { WickConfiguration::App(config) => { let version = config.version(); - extra_files = config.package_files().to_owned(); + let extra_files = config.package_files().to_owned(); - (version, parent_dir) + (version, extra_files) } WickConfiguration::Component(config) => { let version = config.version(); - extra_files = config.package_files().map_or_else(Vec::new, |files| files.to_owned()); + let extra_files = config.package_files().map_or_else(Vec::new, |files| files.to_owned()); - (version, parent_dir) + (version, extra_files) } WickConfiguration::Types(config) => { let version = config.version(); - extra_files = config.package_files().map_or_else(Vec::new, |files| files.to_owned()); + let extra_files = config.package_files().map_or_else(Vec::new, |files| files.to_owned()); - (version, parent_dir) + (version, extra_files) } _ => return Err(Error::InvalidWickConfig(path.to_string_lossy().to_string())), }; diff --git a/examples/components/cli-trigger/.cargo/config b/examples/components/cli-trigger/.cargo/config new file mode 100644 index 000000000..e69de29bb diff --git a/examples/components/cli-trigger/.gitignore b/examples/components/cli-trigger/.gitignore new file mode 100644 index 000000000..82448ccd9 --- /dev/null +++ b/examples/components/cli-trigger/.gitignore @@ -0,0 +1,2 @@ +/target +/build diff --git a/examples/components/cli-trigger/.vscode/settings.json b/examples/components/cli-trigger/.vscode/settings.json new file mode 100644 index 000000000..1cd2bd528 --- /dev/null +++ b/examples/components/cli-trigger/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "rust-analyzer.cargo.target": "wasm32-unknown-unknown", + "extensions": [ + "CandleCorp.wick-development-framework" + ] +} \ No newline at end of file diff --git a/examples/components/cli-trigger/Cargo.lock b/examples/components/cli-trigger/Cargo.lock new file mode 100644 index 000000000..fe620b578 --- /dev/null +++ b/examples/components/cli-trigger/Cargo.lock @@ -0,0 +1,2745 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aho-corasick" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +dependencies = [ + "memchr", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" + +[[package]] +name = "anymap2" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d301b3b94cb4b2f23d7917810addbbaff90738e0ca2be692bd027e70d7e0330c" + +[[package]] +name = "asset-container" +version = "0.2.0" +dependencies = [ + "bitflags 2.3.3", + "futures 0.3.28", + "thiserror", +] + +[[package]] +name = "async-recursion" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "async-trait" +version = "0.1.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "atomic-polyfill" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ff7eb3f316534d83a8a2c3d1674ace8a5a71198eba31e2e2b597833f699b28" +dependencies = [ + "critical-section", +] + +[[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.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" + +[[package]] +name = "base64-serde" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba368df5de76a5bea49aaf0cf1b39ccfbbef176924d1ba5db3e4135216cbe3c7" +dependencies = [ + "base64 0.21.2", + "serde", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + +[[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.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +dependencies = [ + "byteorder", + "iovec", +] + +[[package]] +name = "bytes" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +dependencies = [ + "serde", +] + +[[package]] +name = "cc" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "check_keyword" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4d532198271d4fb82f944bd25527e760a6cfc966c7d592525e092d4c6a4f787" + +[[package]] +name = "chrono" +version = "0.4.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "winapi", +] + +[[package]] +name = "cli-trigger" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-trait", + "serde", + "wick-component", + "wick-component-codegen", +] + +[[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.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +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 = "critical-section" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6548a0ad5d2549e111e1f6a11a6c2e2d00ce6a3dafe22948d67c2b443f775e52" + +[[package]] +name = "crossbeam-channel" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] + +[[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 = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + +[[package]] +name = "darling" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +dependencies = [ + "darling_core 0.20.3", + "darling_macro 0.20.3", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", +] + +[[package]] +name = "darling_core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.27", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +dependencies = [ + "darling_core 0.20.3", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "dashmap" +version = "5.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6943ae99c34386c84a470c499d3414f66502a41340aa895406e0d2e4a207b91d" +dependencies = [ + "cfg-if", + "hashbrown 0.14.0", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "derive-asset-container" +version = "0.2.0" +dependencies = [ + "asset-container", + "proc-macro2", + "quote", + "structmeta", + "syn 2.0.27", +] + +[[package]] +name = "derive_builder" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +dependencies = [ + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_macro" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +dependencies = [ + "derive_builder_core", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +dependencies = [ + "dirs-sys 0.3.7", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys 0.4.1", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[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 = "doc-comment" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "encoding_rs" +version = "0.8.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "filetime" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.2.16", + "windows-sys", +] + +[[package]] +name = "flate2" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "flow-component" +version = "0.5.0" +dependencies = [ + "anyhow", + "futures 0.3.28", + "liquid-json", + "seeded-random", + "serde", + "serde_json", + "tracing", + "wick-interface-types", + "wick-packet", +] + +[[package]] +name = "flow-expression-parser" +version = "0.5.0" +dependencies = [ + "liquid-json", + "nom", + "once_cell", + "parking_lot", + "regex", + "seeded-random", + "serde", + "serde_json", + "thiserror", + "uuid", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[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 = "futures" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" + +[[package]] +name = "futures" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" + +[[package]] +name = "futures-executor" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" + +[[package]] +name = "futures-macro" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "futures-sink" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" + +[[package]] +name = "futures-task" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" + +[[package]] +name = "futures-util" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +dependencies = [ + "futures 0.1.31", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", + "tokio-io", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getset" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "gimli" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "h2" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +dependencies = [ + "bytes 1.4.0", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 1.9.3", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + +[[package]] +name = "heapless" +version = "0.7.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db04bc24a18b9ea980628ecf00e6c0264f3c1426dac36c00cb49b6fbad8b0743" +dependencies = [ + "atomic-polyfill", + "hash32", + "rustc_version", + "spin 0.9.8", + "stable_deref_trait", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "http" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +dependencies = [ + "bytes 1.4.0", + "fnv", + "itoa", +] + +[[package]] +name = "http-auth" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5430cacd7a1f9a02fbeb350dfc81a0e5ed42d81f3398cb0ba184017f85bdcfbc" +dependencies = [ + "memchr", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes 1.4.0", + "http", + "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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "hyper" +version = "0.14.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +dependencies = [ + "bytes 1.4.0", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +dependencies = [ + "futures-util", + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[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 = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +dependencies = [ + "libc", +] + +[[package]] +name = "ipnet" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "js-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jwt" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6204285f77fe7d9784db3fdc449ecce1a0114927a51d5a41c4c7a292011c015f" +dependencies = [ + "base64 0.13.1", + "crypto-common", + "digest", + "hmac", + "serde", + "serde_json", + "sha2", +] + +[[package]] +name = "kstring" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3066350882a1cd6d950d055997f379ac37fd39f81cd4d8ed186032eb3c5747" +dependencies = [ + "serde", + "static_assertions", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" + +[[package]] +name = "liquid" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69f68ae1011499ae2ef879f631891f21c78e309755f4a5e483c4a8f12e10b609" +dependencies = [ + "doc-comment", + "liquid-core", + "liquid-derive", + "liquid-lib", + "serde", +] + +[[package]] +name = "liquid-core" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79e0724dfcaad5cfb7965ea0f178ca0870b8d7315178f4a7179f5696f7f04d5f" +dependencies = [ + "anymap2", + "itertools", + "kstring", + "liquid-derive", + "num-traits", + "pest", + "pest_derive", + "regex", + "serde", + "time", +] + +[[package]] +name = "liquid-derive" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2fb41a9bb4257a3803154bdf7e2df7d45197d1941c9b1a90ad815231630721" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "liquid-json" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d2ca2e69be23a333da932de11a7e9384a34388484fa1e6397b96677e3e5b8bd" +dependencies = [ + "base64 0.21.2", + "liquid", + "liquid-core", + "liquid-lib", + "once_cell", + "regex", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "liquid-lib" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2a17e273a6fb1fb6268f7a5867ddfd0bd4683c7e19b51084f3d567fad4348c0" +dependencies = [ + "itertools", + "liquid-core", + "once_cell", + "percent-encoding", + "regex", + "time", + "unicode-segmentation", +] + +[[package]] +name = "lock_api" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[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.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +dependencies = [ + "libc", + "wasi", + "windows-sys", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "normpath" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec60c60a693226186f5d6edf073232bfb6464ed97eb22cf3b01c1e8198fd97f5" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "num-traits" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +dependencies = [ + "autocfg", +] + +[[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.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ + "memchr", +] + +[[package]] +name = "oci-distribution" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ac5b780ce1bd6c3c2ff72a3013f4b2d56d53ae03b20d424e99d2f6556125138" +dependencies = [ + "futures 0.3.28", + "futures-util", + "http", + "http-auth", + "jwt", + "lazy_static", + "olpc-cjson", + "regex", + "reqwest", + "serde", + "serde_json", + "sha2", + "thiserror", + "tokio", + "tokio-util", + "tracing", + "unicase", +] + +[[package]] +name = "olpc-cjson" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d637c9c15b639ccff597da8f4fa968300651ad2f1e968aefc3b4927a6fb2027a" +dependencies = [ + "serde", + "serde_json", + "unicode-normalization", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "option-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1800ff62dcf34d7de2c7b7c84e3107a19708578441bd998eaddadb1134a4b007" + +[[package]] +name = "ordered-float" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" +dependencies = [ + "num-traits", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.3.5", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d2d1d55045829d65aad9d389139882ad623b33b904e7c9f1b10c5b8927298e5" +dependencies = [ + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f94bca7e7a599d89dea5dfa309e217e7906c3c007fb9c3299c40b10d6a315d3" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d490fe7e8556575ff6911e45567ab95e71617f43781e5c05490dc8d75c965c" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "pest_meta" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2674c66ebb4b4d9036012091b537aae5878970d6999f81a265034d85b136b341" +dependencies = [ + "once_cell", + "pest", + "sha2", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "prettyplease" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" +dependencies = [ + "proc-macro2", + "syn 2.0.27", +] + +[[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", +] + +[[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.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "property" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "889bff6ebe76dbef2685598944997eb7f15c9854a2e34db853a51c6ac158b9d5" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "quote" +version = "1.0.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +dependencies = [ + "proc-macro2", +] + +[[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 = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_users" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +dependencies = [ + "getrandom", + "redox_syscall 0.2.16", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" + +[[package]] +name = "reqwest" +version = "0.11.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +dependencies = [ + "base64 0.21.2", + "bytes 1.4.0", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-rustls", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "webpki-roots", + "winreg", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted", + "web-sys", + "winapi", +] + +[[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 = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustls" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +dependencies = [ + "base64 0.21.2", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513722fd73ad80a71f72b61009ea1b584bcfa1483ca93949c8f290298837fa59" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "ryu" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "seeded-random" +version = "0.3.0" +dependencies = [ + "parking_lot", + "rand", + "rand_chacha", + "uuid", +] + +[[package]] +name = "semver" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" + +[[package]] +name = "serde" +version = "1.0.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63ba2516aa6bf82e0b19ca8b50019d52df58455d3cf9bdaf6315225fdd0c560a" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" +dependencies = [ + "ordered-float", + "serde", +] + +[[package]] +name = "serde-with-expand-env" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "888d884a3be3a209308d0b66f1918ff18f60e93db837259e53ea7d8dd14e7e98" +dependencies = [ + "serde", + "shellexpand 2.1.2", +] + +[[package]] +name = "serde_derive" +version = "1.0.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "401797fe7833d72109fedec6bfcbe67c0eed9b99772f26eb8afd261f0abc6fd3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "serde_json" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[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 = "serde_with" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21e47d95bc83ed33b2ecf84f4187ad1ab9685d18ff28db000c99deac8ce180e3" +dependencies = [ + "base64 0.21.2", + "chrono", + "hex", + "indexmap 1.9.3", + "serde", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea3cee93715c2e266b9338b7544da68a9f24e227722ba482bd1c024367c77c65" +dependencies = [ + "darling 0.20.3", + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "serde_yaml" +version = "0.9.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" +dependencies = [ + "indexmap 2.0.0", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "sha2" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha256" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "386f700b0c798d92ac20a53342c240ff9d58030c3b845fbaeb92eead3a774792" +dependencies = [ + "async-trait", + "bytes 1.4.0", + "hex", + "sha2", + "tokio", +] + +[[package]] +name = "shellexpand" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ccc8076840c4da029af4f87e4e8daeb0fca6b87bbb02e10cb60b791450e11e4" +dependencies = [ + "dirs 4.0.0", +] + +[[package]] +name = "shellexpand" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" +dependencies = [ + "dirs 5.0.1", +] + +[[package]] +name = "slab" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" + +[[package]] +name = "socket2" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[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" +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 = "structmeta" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ad9e09554f0456d67a69c1584c9798ba733a5b50349a6c0d0948710523922d" +dependencies = [ + "proc-macro2", + "quote", + "structmeta-derive", + "syn 2.0.27", +] + +[[package]] +name = "structmeta-derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[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.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tar" +version = "0.4.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec96d2ffad078296368d46ff1cb309be1c23c513b4ab0e22a45de0185275ac96" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "thiserror" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "time" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" +dependencies = [ + "itoa", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" + +[[package]] +name = "time-macros" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" +dependencies = [ + "time-core", +] + +[[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.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +dependencies = [ + "autocfg", + "backtrace", + "bytes 1.4.0", + "libc", + "mio", + "num_cpus", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys", +] + +[[package]] +name = "tokio-io" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.31", + "log", +] + +[[package]] +name = "tokio-macros" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +dependencies = [ + "bytes 1.4.0", + "futures-core", + "futures-io", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.19.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +dependencies = [ + "indexmap 2.0.0", + "toml_datetime", + "winnow", +] + +[[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.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if", + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "tracing-core" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + +[[package]] +name = "unicase" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +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.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" + +[[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 = "unsafe-libyaml" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "url" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "uuid" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" +dependencies = [ + "getrandom", +] + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[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.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.27", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + +[[package]] +name = "wasm-streams" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wasmrs" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9e639ca1fefefe446ed77443865dd2298ed5a22e22992944e2b03d931cf11ab" +dependencies = [ + "bytes 1.4.0", + "crossbeam-channel", + "dashmap", + "futures 0.3.28", + "futures-executor", + "futures-util", + "parking_lot", + "pin-project-lite", + "tokio", + "tracing", + "wasmrs-codec", + "wasmrs-frames", + "wasmrs-runtime", + "wasmrs-rx", +] + +[[package]] +name = "wasmrs-codec" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa033a409e0a05d24013fdf15becafaba5e13c3eee1706dd687e63ff6e5aa2e2" +dependencies = [ + "heapless", + "rmp-serde", + "serde", + "wasmrs-frames", +] + +[[package]] +name = "wasmrs-frames" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5379743c49fe234b5191beb98c9891ce6f90df2358f442d124bc3b10857ff74c" +dependencies = [ + "bytes 1.4.0", + "serde", +] + +[[package]] +name = "wasmrs-guest" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c80fe87a96b758f19ee3c96bffcbd14549affc32a7811dfccb8f0e2acd119616" +dependencies = [ + "bytes 1.4.0", + "cfg-if", + "futures-executor", + "futures-util", + "serde", + "serde_json", + "tracing", + "wasmrs", + "wasmrs-codec", + "wasmrs-frames", + "wasmrs-runtime", + "wasmrs-rx", +] + +[[package]] +name = "wasmrs-runtime" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be63ea5457fca88c949665f1dcf0752842777baa762af5d6d053aa8a8576cb3d" +dependencies = [ + "bytes 1.4.0", + "crossbeam-channel", + "dashmap", + "futures 0.3.28", + "futures-executor", + "futures-util", + "parking_lot", + "pin-project-lite", + "tokio", + "tracing", + "wasmrs-frames", +] + +[[package]] +name = "wasmrs-rx" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b2ae214a4ff7272c6d4f718626f9a4a85d239be37c8059e7952ec32b99189d5" +dependencies = [ + "async-trait", + "bytes 1.4.0", + "crossbeam-channel", + "dashmap", + "futures 0.3.28", + "futures-executor", + "futures-util", + "parking_lot", + "pin-project-lite", + "tracing", + "wasmrs-runtime", +] + +[[package]] +name = "web-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "webpki-roots" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +dependencies = [ + "webpki", +] + +[[package]] +name = "wick-asset-reference" +version = "0.3.0" +dependencies = [ + "asset-container", + "bytes 1.4.0", + "getset", + "normpath", + "parking_lot", + "serde", + "thiserror", + "tokio", + "tokio-stream", + "tracing", + "wick-oci-utils", +] + +[[package]] +name = "wick-component" +version = "0.15.0" +dependencies = [ + "async-recursion", + "flow-component", + "paste", + "serde", + "serde_json", + "tokio-stream", + "tracing", + "wasmrs", + "wasmrs-codec", + "wasmrs-guest", + "wasmrs-runtime", + "wasmrs-rx", + "wick-operation", + "wick-packet", +] + +[[package]] +name = "wick-component-codegen" +version = "0.4.0" +dependencies = [ + "anyhow", + "bitflags 2.3.3", + "check_keyword", + "derive_builder", + "heck", + "itertools", + "prettyplease", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.27", + "tokio", + "wick-config", + "wick-interface-types", +] + +[[package]] +name = "wick-config" +version = "0.26.0" +dependencies = [ + "asset-container", + "derive-asset-container", + "derive_builder", + "flow-component", + "flow-expression-parser", + "glob", + "liquid-json", + "num-traits", + "option-utils", + "parking_lot", + "property", + "regex", + "serde", + "serde-value", + "serde-with-expand-env", + "serde_json", + "serde_with", + "serde_yaml", + "shellexpand 3.1.0", + "thiserror", + "tokio", + "tracing", + "url", + "wick-asset-reference", + "wick-interface-types", + "wick-packet", +] + +[[package]] +name = "wick-interface-types" +version = "0.15.0" +dependencies = [ + "nom", + "serde", + "serde_json", + "serde_repr", + "serde_yaml", +] + +[[package]] +name = "wick-oci-utils" +version = "0.3.0" +dependencies = [ + "bytes 1.4.0", + "derive_builder", + "flate2", + "getset", + "oci-distribution", + "once_cell", + "regex", + "serde", + "serde_json", + "serde_yaml", + "sha256", + "tar", + "thiserror", + "tokio", + "tracing", + "wick-xdg", +] + +[[package]] +name = "wick-operation" +version = "0.1.0" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.27", +] + +[[package]] +name = "wick-packet" +version = "0.15.0" +dependencies = [ + "base64 0.21.2", + "base64-serde", + "bytes 1.4.0", + "chrono", + "liquid-json", + "parking_lot", + "pin-project-lite", + "seeded-random", + "serde", + "serde_json", + "thiserror", + "tokio-stream", + "tracing", + "url", + "wasmrs", + "wasmrs-codec", + "wasmrs-frames", + "wasmrs-guest", + "wasmrs-runtime", + "wasmrs-rx", + "wick-interface-types", +] + +[[package]] +name = "wick-xdg" +version = "0.2.0" +dependencies = [ + "getset", + "thiserror", + "xdg", +] + +[[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-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets", +] + +[[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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "winnow" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25b5872fa2e10bd067ae946f927e726d7d603eaeb6e02fa6a350e0722d2b8c11" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi", +] + +[[package]] +name = "xattr" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +dependencies = [ + "libc", +] + +[[package]] +name = "xdg" +version = "2.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" diff --git a/examples/components/cli-trigger/Cargo.toml b/examples/components/cli-trigger/Cargo.toml new file mode 100644 index 000000000..b2d9abdb1 --- /dev/null +++ b/examples/components/cli-trigger/Cargo.toml @@ -0,0 +1,28 @@ +[package] +name = "cli-trigger" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[profile.release] +strip = "symbols" +codegen-units = 1 +debug = false +lto = true +opt-level = "z" +panic = "abort" + +[lib] +crate-type = ["cdylib"] + +[dependencies] +wick-component = { path = "../../../crates/wick/wick-component" } +serde = { version = "1", features = ["derive"] } +async-trait = "0.1" +anyhow = { version = "1" } + +[build-dependencies] +wick-component-codegen = { path = "../../../crates/wick/wick-component-codegen" } + +# Including this section keeps this crate out of a workspace without needing to alter the workspace. +[workspace] diff --git a/examples/components/cli-trigger/app.wick b/examples/components/cli-trigger/app.wick new file mode 100644 index 000000000..54580e60d --- /dev/null +++ b/examples/components/cli-trigger/app.wick @@ -0,0 +1,19 @@ +kind: wick/app@v1 +name: hello-world +package: + registry: + host: registry.candle.dev + namespace: jsoverson +metadata: + version: 0.0.1 + description: Simple wick application that prints hello world + licenses: + - Apache-2.0 +import: + - name: MAIN_COMPONENT + component: + kind: wick/component/manifest@v1 + ref: ./component.wick +triggers: + - kind: wick/trigger/cli@v1 + operation: MAIN_COMPONENT::main diff --git a/examples/components/cli-trigger/build.rs b/examples/components/cli-trigger/build.rs new file mode 100644 index 000000000..fc2db2b44 --- /dev/null +++ b/examples/components/cli-trigger/build.rs @@ -0,0 +1,7 @@ +fn main() -> Result<(), Box> { + println!("cargo:rerun-if-changed=component.wick"); + wick_component_codegen::configure() + .raw(true) + .generate("component.wick")?; + Ok(()) +} diff --git a/examples/components/cli-trigger/component.wick b/examples/components/cli-trigger/component.wick new file mode 100644 index 000000000..3626510cd --- /dev/null +++ b/examples/components/cli-trigger/component.wick @@ -0,0 +1,28 @@ +# yaml-language-server: $schema=https://github.com/candlecorp/wick/releases/download/nightly/schema.json +--- +name: 'cli-hello-world' +kind: wick/component@v1 +metadata: + version: '0.0.1' +package: + registry: + host: registry.candle.dev + namespace: jsoverson +import: + - name: cli + component: + kind: wick/component/types@v1 + ref: ../../../crates/interfaces/wick-interface-cli/component.yaml +component: + kind: wick/component/wasmrs@v1 + ref: ./build/component.signed.wasm + operations: + - name: main + inputs: + - name: args + type: string[] + - name: interactive + type: cli::Interactive + outputs: + - name: code + type: u32 diff --git a/examples/components/cli-trigger/justfile b/examples/components/cli-trigger/justfile new file mode 100644 index 000000000..58f80c18e --- /dev/null +++ b/examples/components/cli-trigger/justfile @@ -0,0 +1,49 @@ + + +# The wick command to use for this project (usually just "wick" but can be a local path during development) +wick := "cargo run --manifest-path=../../../Cargo.toml -p wick-cli --" + +# Get the crate name from the Cargo.toml file (this uses wick instead of {{wick}} due to justfile limitations) +crate_name := `wick query -f Cargo.toml '.package.name'` +# Convert crate name to snake case for rust naming conventions. +project_name := snakecase(crate_name) + +# The target to build for release. +build_target := "wasm32-wasi" +# The target to build for debug (wasm32-wasi can give easy access to println & STDIO for debugging) +debug_target := "wasm32-wasi" + +# Build and sign a WebAssembly component implementation +build: setup + cargo build --release --target="{{build_target}}" + cp "./target/{{build_target}}/release/{{project_name}}.wasm" ./build/component.wasm + {{wick}} wasm sign ./build/component.wasm component.wick + +# Build a debug version of a WebAssembly component +debug: setup + cargo +nightly build --target="{{debug_target}}" + cp "./target/{{debug_target}}/debug/{{project_name}}.wasm" ./build/component.wasm + {{wick}} wasm sign ./build/component.wasm component.wick + +# Echo variables used by this justfile +debug-justfile: + @echo "Wick command: {{wick}}" + @echo "---" + @echo "Crate name: {{crate_name}}" + @echo "Crate name (rustified): {{project_name}}" + @echo "---" + @echo "Build target: {{build_target}}" + @echo "Debug target: {{debug_target}}" + +# Setup any environment needed for the build +setup: + mkdir -p build + +# Run tests +test: build + {{wick}} test component.wick + +# Clean the project directory +clean: + cargo clean + diff --git a/examples/components/cli-trigger/src/lib.rs b/examples/components/cli-trigger/src/lib.rs new file mode 100644 index 000000000..da58b90ae --- /dev/null +++ b/examples/components/cli-trigger/src/lib.rs @@ -0,0 +1,10 @@ +mod wick { + wick_component::wick_import!(); +} +use wick::*; + +#[wick_component::operation(binary_interleaved_pairs)] +fn main(_args: Vec, _interactive: types::cli::Interactive, _ctx: Context) -> anyhow::Result { + println!("Hello world!"); + return Ok(0); +} diff --git a/examples/components/wasi-fs/src/lib copy.rs b/examples/components/wasi-fs/src/lib copy.rs deleted file mode 100644 index 268bdf59d..000000000 --- a/examples/components/wasi-fs/src/lib copy.rs +++ /dev/null @@ -1,49 +0,0 @@ -mod wick { - wick_component::wick_import!(); -} -use std::io::Write; - -use anyhow::bail; -use wick::*; -use wick_component::wick_packet::Packet; - -// simple_unary_operation!(read_string); - -#[wick_component::operation(unary::simple)] -fn read_string(filename: &String) -> Result { - std::fs::read_to_string(filename) -} - -// simple_unary_operation!(read_bytes); - -#[wick_component::operation(unary::simple)] -fn read_bytes(filename: &String) -> Result { - std::fs::read(filename).map(Into::into) -} - -// paired_right_stream!(write_string); - -// fn write_string( -// filename: String, -// contents: WickStream, -// ) -> std::pin::Pin> + 'static>> { -// Box::pin(async move { real_write_string(filename, contents).await }) -// } - -#[wick_component::operation(binary::paired_right_stream)] -async fn real_write_string(filename: String, mut contents: WickStream) -> Result { - let mut file = std::fs::File::create(filename)?; - let mut size = 0; - while let Some(contents) = contents.next().await { - match contents { - Ok(string) => { - size += file.write(string.as_bytes())?; - } - Err(e) => { - bail!(e); - } - } - } - - Ok(size as _) -} diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 7f66e91b1..1a485d82e 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,10 +1,10 @@ [toolchain] -channel = "1.69.0" +channel = "1.71.0" components = ["rustfmt", "clippy"] targets = [ "wasm32-unknown-unknown", "wasm32-wasi", "aarch64-unknown-linux-gnu", "x86_64-pc-windows-gnu", - "aarch64-apple-darwin" + "aarch64-apple-darwin", ] diff --git a/tests/cli-tests/src/lib.rs b/tests/cli-tests/src/lib.rs index 6f47bbf07..b296c0dd8 100644 --- a/tests/cli-tests/src/lib.rs +++ b/tests/cli-tests/src/lib.rs @@ -55,5 +55,19 @@ mod test { run_tests("tests/cli-tests/tests/cmd/db/*.trycmd")?; Ok(()) } + + #[test] + fn wick_run() -> Result<()> { + run_tests("tests/cli-tests/tests/cmd/run/*.toml")?; + run_tests("tests/cli-tests/tests/cmd/run/*.trycmd")?; + Ok(()) + } + + #[test] + fn wick_install() -> Result<()> { + run_tests("tests/cli-tests/tests/cmd/install/*.toml")?; + run_tests("tests/cli-tests/tests/cmd/install/*.trycmd")?; + Ok(()) + } } } diff --git a/tests/cli-tests/tests/cmd/install/hello-world.trycmd b/tests/cli-tests/tests/cmd/install/hello-world.trycmd new file mode 100644 index 000000000..b0a070035 --- /dev/null +++ b/tests/cli-tests/tests/cmd/install/hello-world.trycmd @@ -0,0 +1,4 @@ +```console +$ wick install examples/components/cli-trigger/app.wick --path=. --quiet +installed hello-world to ./hello-world[..] +``` diff --git a/tests/cli-tests/tests/cmd/run/hello-world.toml b/tests/cli-tests/tests/cmd/run/hello-world.toml new file mode 100644 index 000000000..8503e8ba9 --- /dev/null +++ b/tests/cli-tests/tests/cmd/run/hello-world.toml @@ -0,0 +1,5 @@ +#:schema https://raw.githubusercontent.com/assert-rs/trycmd/main/schema.json +bin.name = "wick" +args = ["run", "examples/components/cli-trigger/app.wick"] +stdout = """Hello world! +"""