From 0f968000c36d878a14becc451646dfe993738503 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Tue, 10 Jun 2025 00:19:19 -0400 Subject: [PATCH 01/52] Create harmony_ci_cli --- Cargo.lock | 11 ++++++ Cargo.toml | 2 +- harmony_ci_cli/Cargo.toml | 13 +++++++ harmony_ci_cli/src/main.rs | 79 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 harmony_ci_cli/Cargo.toml create mode 100644 harmony_ci_cli/src/main.rs diff --git a/Cargo.lock b/Cargo.lock index 58c8700..1a9261e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1463,6 +1463,17 @@ dependencies = [ "uuid", ] +[[package]] +name = "harmony_ci_cli" +version = "0.1.0" +dependencies = [ + "assert_cmd", + "clap", + "env_logger", + "inquire", + "tokio", +] + [[package]] name = "harmony_cli" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 96d630a..9d5369e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ members = [ "opnsense-config", "opnsense-config-xml", "harmony_cli", - "k3d", + "k3d", "harmony_ci_cli", ] [workspace.package] diff --git a/harmony_ci_cli/Cargo.toml b/harmony_ci_cli/Cargo.toml new file mode 100644 index 0000000..2c367aa --- /dev/null +++ b/harmony_ci_cli/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "harmony_ci_cli" +edition = "2024" +version.workspace = true +readme.workspace = true +license.workspace = true + +[dependencies] +assert_cmd = "2.0.17" +clap = { version = "4.5.35", features = ["derive"] } +inquire.workspace = true +tokio.workspace = true +env_logger.workspace = true diff --git a/harmony_ci_cli/src/main.rs b/harmony_ci_cli/src/main.rs new file mode 100644 index 0000000..71ab8d8 --- /dev/null +++ b/harmony_ci_cli/src/main.rs @@ -0,0 +1,79 @@ +use std::path::Path; +use std::process::Command; + +use clap::Parser; +use clap::builder::ArgPredicate; +use inquire::Confirm; + +#[derive(Parser, Debug)] +#[command(version, about, long_about = None)] +pub struct Args { + #[arg(short, long, default_value = "./harmony")] + harmony_path: String, + + #[arg(short, long, default_value_t = false, group = "check")] + check: bool, + + #[arg(short, long, default_value_t = false, group = "package")] + package: bool, + + #[arg(short, long, default_value_t = false, group = "package")] + publish: bool, + + #[arg(short, long, default_value_t = false, group = "deploy")] + deploy: bool, + + #[arg(short, long, default_value_t = false, group = "deploy")] + staging: bool, + + #[arg(short, long, default_value_t = false, group = "deploy")] + prod: bool, + + #[arg(short, long, default_value_t = false, group = "deploy")] + smoke_test: bool, +} + +fn main() { + let args = Args::parse(); + + let harmony_path = Path::new(&args.harmony_path).try_exists(); + + match harmony_path { + Ok(_path) => { + todo!("implement cargo check and compile harmony_cli/UI binary in harmony dir") + } + Err(_) => todo!("implement autodetect code"), + } + + if args.check { + let check_script = + match Path::new(&format!("{}/{}", args.harmony_path, "check.sh")).try_exists() { + Ok(path) => path, + Err(_) => todo!("implement logic when couldn't find check script"), + }; + + let check_output = Command::new("sh") + .arg("-c") + .arg(check_script.to_string()) + .output() + .expect("failed to run check script"); + } + + if args.package { + if args.publish { + todo!("implement publish logic"); + } + todo!("implement packaging logic"); + } + + if args.deploy { + if args.staging { + todo!("implement staging deployment"); + } + + if args.prod { + todo!("implement prod deployment"); + } + todo!("implement deployment logic"); + } +} -- 2.39.5 From b6f252e3442e9ff393626fe9ffc212b763a60762 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Tue, 10 Jun 2025 15:35:04 -0400 Subject: [PATCH 02/52] turn it into subcommands --- Cargo.lock | 2220 ++++++++++++++++- Cargo.toml | 2 +- harmony_ci_cli/src/main.rs | 79 - .../Cargo.toml | 4 +- harmony_composer/src/main.rs | 144 ++ 5 files changed, 2341 insertions(+), 108 deletions(-) delete mode 100644 harmony_ci_cli/src/main.rs rename {harmony_ci_cli => harmony_composer}/Cargo.toml (80%) create mode 100644 harmony_composer/src/main.rs diff --git a/Cargo.lock b/Cargo.lock index 1a9261e..bbf8083 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -95,6 +95,16 @@ dependencies = [ "libc", ] +[[package]] +name = "annotate-snippets" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "710e8eae58854cdc1790fcb56cca04d712a17be849eeb81da2a724bf4bae2bc4" +dependencies = [ + "anstyle", + "unicode-width 0.2.0", +] + [[package]] name = "anstream" version = "0.6.18" @@ -145,12 +155,30 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "anyhow" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" + [[package]] name = "arc-swap" version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + [[package]] name = "assert_cmd" version = "2.0.17" @@ -167,6 +195,28 @@ dependencies = [ "wait-timeout", ] +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "async-trait" version = "0.1.88" @@ -190,6 +240,53 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +[[package]] +name = "axum" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +dependencies = [ + "async-trait", + "axum-core", + "bytes", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper 1.0.2", + "tower 0.5.2", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper 1.0.2", + "tower-layer", + "tower-service", +] + [[package]] name = "backtrace" version = "0.3.75" @@ -255,6 +352,15 @@ dependencies = [ "serde", ] +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + [[package]] name = "bitvec" version = "1.0.1" @@ -267,6 +373,19 @@ dependencies = [ "wyz", ] +[[package]] +name = "blake3" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -295,6 +414,29 @@ dependencies = [ "cipher", ] +[[package]] +name = "bon" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97493a391b4b18ee918675fb8663e53646fd09321c58b46afa04e8ce2499c869" +dependencies = [ + "bon-macros", + "rustversion", +] + +[[package]] +name = "bon-macros" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2af3eac944c12cdf4423eab70d310da0a8e5851a18ffb192c0a5e3f7ae1663" +dependencies = [ + "darling", + "ident_case", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "bstr" version = "1.12.0" @@ -302,7 +444,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" dependencies = [ "memchr", - "regex-automata", + "regex-automata 0.4.9", "serde", ] @@ -324,6 +466,181 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +[[package]] +name = "cargo" +version = "0.88.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3266d7f10870d970f22fd244b5d4bb017f723247e6743f2283f6fe63a4f6084" +dependencies = [ + "annotate-snippets", + "anstream", + "anstyle", + "anyhow", + "base64 0.22.1", + "blake3", + "cargo-credential", + "cargo-credential-libsecret", + "cargo-credential-macos-keychain", + "cargo-credential-wincred", + "cargo-platform", + "cargo-util", + "cargo-util-schemas", + "clap", + "clap_complete", + "color-print", + "crates-io", + "curl", + "curl-sys", + "filetime", + "flate2", + "git2", + "git2-curl", + "gix", + "glob", + "hex", + "hmac", + "home", + "http-auth", + "ignore", + "im-rc", + "indexmap 2.9.0", + "itertools 0.14.0", + "jiff", + "jobserver", + "lazycell", + "libc", + "libgit2-sys", + "memchr", + "opener", + "os_info", + "pasetors", + "pathdiff", + "rand 0.9.1", + "regex", + "rusqlite", + "rustc-hash", + "rustc-stable-hash", + "rustfix", + "same-file", + "semver", + "serde", + "serde-untagged", + "serde_ignored", + "serde_json", + "sha1", + "shell-escape", + "supports-hyperlinks", + "supports-unicode", + "tar", + "tempfile", + "thiserror 2.0.12", + "time", + "toml", + "toml_edit", + "tracing", + "tracing-chrome", + "tracing-subscriber", + "unicase", + "unicode-width 0.2.0", + "url", + "walkdir", + "windows-sys 0.59.0", +] + +[[package]] +name = "cargo-credential" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1ef5080adde1db190e901884d2c400990856c2a23201c5a181b910a6dbdf2a" +dependencies = [ + "anyhow", + "libc", + "serde", + "serde_json", + "thiserror 1.0.69", + "time", + "windows-sys 0.59.0", +] + +[[package]] +name = "cargo-credential-libsecret" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d4e8e593dd3967cf90d6ae8e0e820abbb9ba168c4015dc04d90abc80477b8b" +dependencies = [ + "anyhow", + "cargo-credential", + "libloading", +] + +[[package]] +name = "cargo-credential-macos-keychain" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4037e5af4bd682580c82143a0a22d9fd2ae6e57ee8b9ea7110dabcf1160828cc" +dependencies = [ + "cargo-credential", + "security-framework 3.2.0", +] + +[[package]] +name = "cargo-credential-wincred" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320491fd2d43703fe8685cc844af75eba650d32f51a26a9f37ec8fd0d426a738" +dependencies = [ + "cargo-credential", + "windows-sys 0.59.0", +] + +[[package]] +name = "cargo-platform" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84982c6c0ae343635a3a4ee6dedef965513735c8b183caa7289fa6e27399ebd4" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-util" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767bc85f367f6483a6072430b56f5c0d6ee7636751a21a800526d0711753d76" +dependencies = [ + "anyhow", + "core-foundation 0.10.0", + "filetime", + "hex", + "ignore", + "jobserver", + "libc", + "miow", + "same-file", + "sha2", + "shell-escape", + "tempfile", + "tracing", + "walkdir", + "windows-sys 0.59.0", +] + +[[package]] +name = "cargo-util-schemas" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea8b01266e95c3cf839fe626e651fa36a9171033caa917a773d7a0ba1d5ce6be" +dependencies = [ + "semver", + "serde", + "serde-untagged", + "serde-value", + "thiserror 2.0.12", + "toml", + "unicode-xid", + "url", +] + [[package]] name = "cassowary" version = "0.3.0" @@ -354,6 +671,8 @@ version = "1.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32db95edf998450acc7881c932f94cd9b05c87b4b2599e8bab064753da4acfd1" dependencies = [ + "jobserver", + "libc", "shlex", ] @@ -428,6 +747,19 @@ dependencies = [ "anstyle", "clap_lex", "strsim", + "terminal_size", +] + +[[package]] +name = "clap_complete" +version = "4.5.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aad5b1b4de04fead402672b48897030eec1f3bfe1550776322f59f6d6e6a5677" +dependencies = [ + "clap", + "clap_lex", + "is_executable", + "shlex", ] [[package]] @@ -448,6 +780,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +[[package]] +name = "clru" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbd0f76e066e64fdc5631e3bb46381254deab9ef1158292f27c8c57e3bf3fe59" + [[package]] name = "color-eyre" version = "0.6.4" @@ -463,6 +801,27 @@ dependencies = [ "tracing-error", ] +[[package]] +name = "color-print" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3aa954171903797d5623e047d9ab69d91b493657917bdfb8c2c80ecaf9cdb6f4" +dependencies = [ + "color-print-proc-macro", +] + +[[package]] +name = "color-print-proc-macro" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692186b5ebe54007e45a59aea47ece9eb4108e141326c304cdc91699a7118a22" +dependencies = [ + "nom", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "color-spantrace" version = "0.2.2" @@ -521,6 +880,12 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + [[package]] name = "convert_case" version = "0.8.0" @@ -565,6 +930,20 @@ dependencies = [ "libc", ] +[[package]] +name = "crates-io" +version = "0.40.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c15b946f2bbd53f5be858ed02fcacfeb3646f3ca67b24defc276a01edd10de6" +dependencies = [ + "curl", + "percent-encoding", + "serde", + "serde_json", + "thiserror 2.0.12", + "url", +] + [[package]] name = "crc32fast" version = "1.4.2" @@ -583,6 +962,25 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.21" @@ -660,6 +1058,12 @@ dependencies = [ "typenum", ] +[[package]] +name = "ct-codecs" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b10589d1a5e400d61f9f38f12f884cfd080ff345de8f17efda36fe0e4a02aa8" + [[package]] name = "ctr" version = "0.9.2" @@ -669,6 +1073,37 @@ dependencies = [ "cipher", ] +[[package]] +name = "curl" +version = "0.4.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e2d5c8f48d9c0c23250e52b55e82a6ab4fdba6650c931f5a0a57a43abda812b" +dependencies = [ + "curl-sys", + "libc", + "openssl-probe", + "openssl-sys", + "schannel", + "socket2", + "windows-sys 0.59.0", +] + +[[package]] +name = "curl-sys" +version = "0.4.82+curl-8.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4d63638b5ec65f1a4ae945287b3fd035be4554bbaf211901159c9a2a74fb5be" +dependencies = [ + "cc", + "libc", + "libnghttp2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", + "windows-sys 0.59.0", +] + [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -679,7 +1114,7 @@ dependencies = [ "cpufeatures", "curve25519-dalek-derive", "digest", - "fiat-crypto", + "fiat-crypto 0.2.9", "rustc_version", "subtle", "zeroize", @@ -737,6 +1172,17 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" +[[package]] +name = "dbus" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bb21987b9fb1613058ba3843121dd18b163b254d8a6e797e144cbac14d96d1b" +dependencies = [ + "libc", + "libdbus-sys", + "winapi", +] + [[package]] name = "der" version = "0.7.10" @@ -755,6 +1201,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" dependencies = [ "powerfmt", + "serde", ] [[package]] @@ -839,6 +1286,17 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "docker_utils" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66a64876aa646872a68ad74a6dba097f35a6641530767cb7c74a74d7a58099f3" +dependencies = [ + "bon", + "tokio", + "wait_utils", +] + [[package]] name = "dockerfile_builder" version = "0.1.5" @@ -861,6 +1319,12 @@ dependencies = [ "syn", ] +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "dyn-clone" version = "1.0.19" @@ -891,6 +1355,15 @@ dependencies = [ "signature", ] +[[package]] +name = "ed25519-compact" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9b3460f44bea8cd47f45a0c70892f1eff856d97cd55358b2f73f663789f6190" +dependencies = [ + "getrandom 0.2.16", +] + [[package]] name = "ed25519-dalek" version = "2.1.1" @@ -980,6 +1453,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +[[package]] +name = "erased-serde" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e004d887f51fcb9fef17317a2f3525c887d8aa3f4f50fed920816a688284a5b7" +dependencies = [ + "serde", + "typeid", +] + [[package]] name = "errno" version = "0.3.11" @@ -1113,6 +1596,27 @@ dependencies = [ "once_cell", ] +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + +[[package]] +name = "faster-hex" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2a2b11eda1d40935b26cf18f6833c526845ae8c41e58d09af6adeb6f0269183" +dependencies = [ + "serde", +] + [[package]] name = "fastrand" version = "2.3.0" @@ -1135,6 +1639,24 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +[[package]] +name = "fiat-crypto" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24" + +[[package]] +name = "filetime" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" +dependencies = [ + "cfg-if", + "libc", + "libredox", + "windows-sys 0.59.0", +] + [[package]] name = "flate2" version = "1.1.1" @@ -1142,6 +1664,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" dependencies = [ "crc32fast", + "libz-sys", "miniz_oxide", ] @@ -1347,9 +1870,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi", "wasi 0.14.2+wasi-0.2.4", + "wasm-bindgen", ] [[package]] @@ -1368,6 +1893,835 @@ version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +[[package]] +name = "git2" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2deb07a133b1520dc1a5690e9bd08950108873d7ed5de38dcc74d3b5ebffa110" +dependencies = [ + "bitflags 2.9.1", + "libc", + "libgit2-sys", + "log", + "openssl-probe", + "openssl-sys", + "url", +] + +[[package]] +name = "git2-curl" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be8dcabbc09ece4d30a9aa983d5804203b7e2f8054a171f792deff59b56d31fa" +dependencies = [ + "curl", + "git2", + "log", + "url", +] + +[[package]] +name = "gix" +version = "0.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736f14636705f3a56ea52b553e67282519418d9a35bb1e90b3a9637a00296b68" +dependencies = [ + "gix-actor", + "gix-attributes", + "gix-command", + "gix-commitgraph", + "gix-config", + "gix-credentials", + "gix-date", + "gix-diff", + "gix-dir", + "gix-discover", + "gix-features", + "gix-filter", + "gix-fs", + "gix-glob", + "gix-hash", + "gix-hashtable", + "gix-ignore", + "gix-index", + "gix-lock", + "gix-negotiate", + "gix-object", + "gix-odb", + "gix-pack", + "gix-path", + "gix-pathspec", + "gix-prompt", + "gix-protocol", + "gix-ref", + "gix-refspec", + "gix-revision", + "gix-revwalk", + "gix-sec", + "gix-shallow", + "gix-submodule", + "gix-tempfile", + "gix-trace", + "gix-transport", + "gix-traverse", + "gix-url", + "gix-utils", + "gix-validate 0.9.4", + "gix-worktree", + "once_cell", + "prodash", + "smallvec", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-actor" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20018a1a6332e065f1fcc8305c1c932c6b8c9985edea2284b3c79dc6fa3ee4b2" +dependencies = [ + "bstr", + "gix-date", + "gix-utils", + "itoa", + "thiserror 2.0.12", + "winnow 0.6.26", +] + +[[package]] +name = "gix-attributes" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f151000bf662ef5f641eca6102d942ee31ace80f271a3ef642e99776ce6ddb38" +dependencies = [ + "bstr", + "gix-glob", + "gix-path", + "gix-quote", + "gix-trace", + "kstring", + "smallvec", + "thiserror 2.0.12", + "unicode-bom", +] + +[[package]] +name = "gix-bitmap" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1db9765c69502650da68f0804e3dc2b5f8ccc6a2d104ca6c85bc40700d37540" +dependencies = [ + "thiserror 2.0.12", +] + +[[package]] +name = "gix-chunk" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b1f1d8764958699dc764e3f727cef280ff4d1bd92c107bbf8acd85b30c1bd6f" +dependencies = [ + "thiserror 2.0.12", +] + +[[package]] +name = "gix-command" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb410b84d6575db45e62025a9118bdbf4d4b099ce7575a76161e898d9ca98df1" +dependencies = [ + "bstr", + "gix-path", + "gix-trace", + "shell-words", +] + +[[package]] +name = "gix-commitgraph" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e23a8ec2d8a16026a10dafdb6ed51bcfd08f5d97f20fa52e200bc50cb72e4877" +dependencies = [ + "bstr", + "gix-chunk", + "gix-features", + "gix-hash", + "memmap2", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-config" +version = "0.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "377c1efd2014d5d469e0b3cd2952c8097bce9828f634e04d5665383249f1d9e9" +dependencies = [ + "bstr", + "gix-config-value", + "gix-features", + "gix-glob", + "gix-path", + "gix-ref", + "gix-sec", + "memchr", + "once_cell", + "smallvec", + "thiserror 2.0.12", + "unicode-bom", + "winnow 0.6.26", +] + +[[package]] +name = "gix-config-value" +version = "0.14.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dc2c844c4cf141884678cabef736fd91dd73068b9146e6f004ba1a0457944b6" +dependencies = [ + "bitflags 2.9.1", + "bstr", + "gix-path", + "libc", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-credentials" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf950f9ee1690bb9c4388b5152baa8a9f41ad61e5cf1ba0ec8c207b08dab9e45" +dependencies = [ + "bstr", + "gix-command", + "gix-config-value", + "gix-path", + "gix-prompt", + "gix-sec", + "gix-trace", + "gix-url", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-date" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daa30058ec7d3511fbc229e4f9e696a35abd07ec5b82e635eff864a2726217e4" +dependencies = [ + "bstr", + "itoa", + "jiff", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-diff" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62afb7f4ca0acdf4e9dad92065b2eb1bf2993bcc5014b57bc796e3a365b17c4d" +dependencies = [ + "bstr", + "gix-hash", + "gix-object", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-dir" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1d78db3927a12f7d1b788047b84efacaab03ef25738bd1c77856ad8966bd57b" +dependencies = [ + "bstr", + "gix-discover", + "gix-fs", + "gix-ignore", + "gix-index", + "gix-object", + "gix-path", + "gix-pathspec", + "gix-trace", + "gix-utils", + "gix-worktree", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-discover" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0c2414bdf04064e0f5a5aa029dfda1e663cf9a6c4bfc8759f2d369299bb65d8" +dependencies = [ + "bstr", + "dunce", + "gix-fs", + "gix-hash", + "gix-path", + "gix-ref", + "gix-sec", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-features" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bfdd4838a8d42bd482c9f0cb526411d003ee94cc7c7b08afe5007329c71d554" +dependencies = [ + "bytes", + "crc32fast", + "crossbeam-channel", + "flate2", + "gix-hash", + "gix-trace", + "gix-utils", + "libc", + "once_cell", + "parking_lot", + "prodash", + "sha1_smol", + "thiserror 2.0.12", + "walkdir", +] + +[[package]] +name = "gix-filter" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdcc36cd7dbc63ed0ec3558645886553d1afd3cd09daa5efb9cba9cceb942bbb" +dependencies = [ + "bstr", + "encoding_rs", + "gix-attributes", + "gix-command", + "gix-hash", + "gix-object", + "gix-packetline-blocking", + "gix-path", + "gix-quote", + "gix-trace", + "gix-utils", + "smallvec", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-fs" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "182e7fa7bfdf44ffb7cfe7451b373cdf1e00870ac9a488a49587a110c562063d" +dependencies = [ + "fastrand", + "gix-features", + "gix-utils", +] + +[[package]] +name = "gix-glob" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e9c7249fa0a78f9b363aa58323db71e0a6161fd69860ed6f48dedf0ef3a314e" +dependencies = [ + "bitflags 2.9.1", + "bstr", + "gix-features", + "gix-path", +] + +[[package]] +name = "gix-hash" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e81c5ec48649b1821b3ed066a44efb95f1a268b35c1d91295e61252539fbe9f8" +dependencies = [ + "faster-hex", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-hashtable" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "189130bc372accd02e0520dc5ab1cef318dcc2bc829b76ab8d84bbe90ac212d1" +dependencies = [ + "gix-hash", + "hashbrown 0.14.5", + "parking_lot", +] + +[[package]] +name = "gix-ignore" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f529dcb80bf9855c0a7c49f0ac588df6d6952d63a63fefc254b9c869d2cdf6f" +dependencies = [ + "bstr", + "gix-glob", + "gix-path", + "gix-trace", + "unicode-bom", +] + +[[package]] +name = "gix-index" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acd12e3626879369310fffe2ac61acc828613ef656b50c4ea984dd59d7dc85d8" +dependencies = [ + "bitflags 2.9.1", + "bstr", + "filetime", + "fnv", + "gix-bitmap", + "gix-features", + "gix-fs", + "gix-hash", + "gix-lock", + "gix-object", + "gix-traverse", + "gix-utils", + "gix-validate 0.9.4", + "hashbrown 0.14.5", + "itoa", + "libc", + "memmap2", + "rustix 0.38.44", + "smallvec", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-lock" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9739815270ff6940968441824d162df9433db19211ca9ba8c3fc1b50b849c642" +dependencies = [ + "gix-tempfile", + "gix-utils", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-negotiate" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a8af1ef7bbe303d30b55312b7f4d33e955de43a3642ae9b7347c623d80ef80" +dependencies = [ + "bitflags 2.9.1", + "gix-commitgraph", + "gix-date", + "gix-hash", + "gix-object", + "gix-revwalk", + "smallvec", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-object" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc4b3a0044244f0fe22347fb7a79cca165e37829d668b41b85ff46a43e5fd68" +dependencies = [ + "bstr", + "gix-actor", + "gix-date", + "gix-features", + "gix-hash", + "gix-hashtable", + "gix-path", + "gix-utils", + "gix-validate 0.9.4", + "itoa", + "smallvec", + "thiserror 2.0.12", + "winnow 0.6.26", +] + +[[package]] +name = "gix-odb" +version = "0.67.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e93457df69cd09573608ce9fa4f443fbd84bc8d15d8d83adecd471058459c1b" +dependencies = [ + "arc-swap", + "gix-date", + "gix-features", + "gix-fs", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-pack", + "gix-path", + "gix-quote", + "parking_lot", + "tempfile", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-pack" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc13a475b3db735617017fb35f816079bf503765312d4b1913b18cf96f3fa515" +dependencies = [ + "clru", + "gix-chunk", + "gix-features", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-path", + "gix-tempfile", + "memmap2", + "parking_lot", + "smallvec", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-packetline" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "123844a70cf4d5352441dc06bab0da8aef61be94ec239cb631e0ba01dc6d3a04" +dependencies = [ + "bstr", + "faster-hex", + "gix-trace", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-packetline-blocking" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ecf3ea2e105c7e45587bac04099824301262a6c43357fad5205da36dbb233b3" +dependencies = [ + "bstr", + "faster-hex", + "gix-trace", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-path" +version = "0.10.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567f65fec4ef10dfab97ae71f26a27fd4d7fe7b8e3f90c8a58551c41ff3fb65b" +dependencies = [ + "bstr", + "gix-trace", + "gix-validate 0.10.0", + "home", + "once_cell", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-pathspec" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6430d3a686c08e9d59019806faa78c17315fe22ae73151a452195857ca02f86c" +dependencies = [ + "bitflags 2.9.1", + "bstr", + "gix-attributes", + "gix-config-value", + "gix-glob", + "gix-path", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-prompt" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79f2185958e1512b989a007509df8d61dca014aa759a22bee80cfa6c594c3b6d" +dependencies = [ + "gix-command", + "gix-config-value", + "parking_lot", + "rustix 0.38.44", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-protocol" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c61bd61afc6b67d213241e2100394c164be421e3f7228d3521b04f48ca5ba90" +dependencies = [ + "bstr", + "gix-credentials", + "gix-date", + "gix-features", + "gix-hash", + "gix-lock", + "gix-negotiate", + "gix-object", + "gix-ref", + "gix-refspec", + "gix-revwalk", + "gix-shallow", + "gix-trace", + "gix-transport", + "gix-utils", + "maybe-async", + "thiserror 2.0.12", + "winnow 0.6.26", +] + +[[package]] +name = "gix-quote" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e49357fccdb0c85c0d3a3292a9f6db32d9b3535959b5471bb9624908f4a066c6" +dependencies = [ + "bstr", + "gix-utils", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-ref" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47adf4c5f933429f8554e95d0d92eee583cfe4b95d2bf665cd6fd4a1531ee20c" +dependencies = [ + "gix-actor", + "gix-features", + "gix-fs", + "gix-hash", + "gix-lock", + "gix-object", + "gix-path", + "gix-tempfile", + "gix-utils", + "gix-validate 0.9.4", + "memmap2", + "thiserror 2.0.12", + "winnow 0.6.26", +] + +[[package]] +name = "gix-refspec" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59650228d8f612f68e7f7a25f517fcf386c5d0d39826085492e94766858b0a90" +dependencies = [ + "bstr", + "gix-hash", + "gix-revision", + "gix-validate 0.9.4", + "smallvec", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-revision" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fe28bbccca55da6d66e6c6efc6bb4003c29d407afd8178380293729733e6b53" +dependencies = [ + "bstr", + "gix-commitgraph", + "gix-date", + "gix-hash", + "gix-object", + "gix-revwalk", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-revwalk" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ecb80c235b1e9ef2b99b23a81ea50dd569a88a9eb767179793269e0e616247" +dependencies = [ + "gix-commitgraph", + "gix-date", + "gix-hash", + "gix-hashtable", + "gix-object", + "smallvec", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-sec" +version = "0.10.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47aeb0f13de9ef2f3033f5ff218de30f44db827ac9f1286f9ef050aacddd5888" +dependencies = [ + "bitflags 2.9.1", + "gix-path", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "gix-shallow" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab72543011e303e52733c85bef784603ef39632ddf47f69723def52825e35066" +dependencies = [ + "bstr", + "gix-hash", + "gix-lock", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-submodule" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74972fe8d46ac8a09490ae1e843b4caf221c5b157c5ac17057e8e1c38417a3ac" +dependencies = [ + "bstr", + "gix-config", + "gix-path", + "gix-pathspec", + "gix-refspec", + "gix-url", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-tempfile" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2558f423945ef24a8328c55d1fd6db06b8376b0e7013b1bb476cc4ffdf678501" +dependencies = [ + "gix-fs", + "libc", + "once_cell", + "parking_lot", + "tempfile", +] + +[[package]] +name = "gix-trace" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c396a2036920c69695f760a65e7f2677267ccf483f25046977d87e4cb2665f7" + +[[package]] +name = "gix-transport" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11187418489477b1b5b862ae1aedbbac77e582f2c4b0ef54280f20cfe5b964d9" +dependencies = [ + "base64 0.22.1", + "bstr", + "curl", + "gix-command", + "gix-credentials", + "gix-features", + "gix-packetline", + "gix-quote", + "gix-sec", + "gix-url", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-traverse" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bec70e53896586ef32a3efa7e4427b67308531ed186bb6120fb3eca0f0d61b4" +dependencies = [ + "bitflags 2.9.1", + "gix-commitgraph", + "gix-date", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-revwalk", + "smallvec", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-url" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29218c768b53dd8f116045d87fec05b294c731a4b2bdd257eeca2084cc150b13" +dependencies = [ + "bstr", + "gix-features", + "gix-path", + "percent-encoding", + "thiserror 2.0.12", + "url", +] + +[[package]] +name = "gix-utils" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff08f24e03ac8916c478c8419d7d3c33393da9bb41fa4c24455d5406aeefd35f" +dependencies = [ + "bstr", + "fastrand", + "unicode-normalization", +] + +[[package]] +name = "gix-validate" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34b5f1253109da6c79ed7cf6e1e38437080bb6d704c76af14c93e2f255234084" +dependencies = [ + "bstr", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-validate" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77b9e00cacde5b51388d28ed746c493b18a6add1f19b5e01d686b3b9ece66d4d" +dependencies = [ + "bstr", + "thiserror 2.0.12", +] + +[[package]] +name = "gix-worktree" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6673512f7eaa57a6876adceca6978a501d6c6569a4f177767dc405f8b9778958" +dependencies = [ + "bstr", + "gix-attributes", + "gix-features", + "gix-fs", + "gix-glob", + "gix-hash", + "gix-ignore", + "gix-index", + "gix-object", + "gix-path", + "gix-validate 0.9.4", +] + +[[package]] +name = "glob" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" + +[[package]] +name = "globset" +version = "0.4.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5" +dependencies = [ + "aho-corasick", + "bstr", + "log", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", +] + [[package]] name = "group" version = "0.13.0" @@ -1391,7 +2745,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap", + "indexmap 2.9.0", "slab", "tokio", "tokio-util", @@ -1410,7 +2764,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.3.1", - "indexmap", + "indexmap 2.9.0", "slab", "tokio", "tokio-util", @@ -1463,17 +2817,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "harmony_ci_cli" -version = "0.1.0" -dependencies = [ - "assert_cmd", - "clap", - "env_logger", - "inquire", - "tokio", -] - [[package]] name = "harmony_cli" version = "0.1.0" @@ -1487,6 +2830,19 @@ dependencies = [ "tokio", ] +[[package]] +name = "harmony_composer" +version = "0.1.0" +dependencies = [ + "assert_cmd", + "cargo", + "clap", + "docker_utils", + "env_logger", + "inquire", + "tokio", +] + [[package]] name = "harmony_macros" version = "0.1.0" @@ -1524,6 +2880,22 @@ dependencies = [ "serde", ] +[[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.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + [[package]] name = "hashbrown" version = "0.15.3" @@ -1535,6 +2907,15 @@ dependencies = [ "foldhash", ] +[[package]] +name = "hashlink" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +dependencies = [ + "hashbrown 0.15.3", +] + [[package]] name = "headers" version = "0.4.0" @@ -1645,6 +3026,15 @@ dependencies = [ "itoa", ] +[[package]] +name = "http-auth" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "150fa4a9462ef926824cf4519c84ed652ca8f4fbae34cb8af045b5cbcaf98822" +dependencies = [ + "memchr", +] + [[package]] name = "http-body" version = "0.4.6" @@ -1998,12 +3388,52 @@ dependencies = [ "icu_properties", ] +[[package]] +name = "ignore" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" +dependencies = [ + "crossbeam-deque", + "globset", + "log", + "memchr", + "regex-automata 0.4.9", + "same-file", + "walkdir", + "winapi-util", +] + +[[package]] +name = "im-rc" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1955a75fa080c677d3972822ec4bad316169ab1cfc6c257a942c2265dbe5fe" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "sized-chunks", + "typenum", + "version_check", +] + [[package]] name = "indenter" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + [[package]] name = "indexmap" version = "2.9.0" @@ -2011,7 +3441,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.3", ] [[package]] @@ -2076,6 +3506,15 @@ dependencies = [ "serde", ] +[[package]] +name = "is_executable" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a1b5bad6f9072935961dfbf1cced2f3d129963d091b6f69f007fe04e758ae2" +dependencies = [ + "winapi", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -2091,6 +3530,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.15" @@ -2104,10 +3552,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f02000660d30638906021176af16b17498bd0d12813dbfe7b276d8bc7f3c0806" dependencies = [ "jiff-static", + "jiff-tzdb-platform", "log", "portable-atomic", "portable-atomic-util", "serde", + "windows-sys 0.59.0", ] [[package]] @@ -2121,6 +3571,31 @@ dependencies = [ "syn", ] +[[package]] +name = "jiff-tzdb" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1283705eb0a21404d2bfd6eef2a7593d240bc42a0bdb39db0ad6fa2ec026524" + +[[package]] +name = "jiff-tzdb-platform" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" +dependencies = [ + "jiff-tzdb", +] + +[[package]] +name = "jobserver" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" +dependencies = [ + "getrandom 0.3.3", + "libc", +] + [[package]] name = "js-sys" version = "0.3.77" @@ -2191,6 +3666,15 @@ dependencies = [ "serde_json", ] +[[package]] +name = "kstring" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "558bf9508a558512042d3095138b1f7b8fe90c5467d94f9f1da28b3731c5dbd1" +dependencies = [ + "static_assertions", +] + [[package]] name = "kube" version = "0.98.0" @@ -2235,7 +3719,7 @@ dependencies = [ "thiserror 2.0.12", "tokio", "tokio-util", - "tower", + "tower 0.5.2", "tower-http", "tracing", ] @@ -2265,18 +3749,68 @@ dependencies = [ "spin", ] +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + [[package]] name = "libc" version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" +[[package]] +name = "libdbus-sys" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06085512b750d640299b79be4bad3d2fa90a9c00b1fd9e1b46364f66f0485c72" +dependencies = [ + "cc", + "pkg-config", +] + +[[package]] +name = "libgit2-sys" +version = "0.18.1+1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1dcb20f84ffcdd825c7a311ae347cce604a6f084a767dec4a4929829645290e" +dependencies = [ + "cc", + "libc", + "libssh2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", +] + +[[package]] +name = "libloading" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" +dependencies = [ + "cfg-if", + "windows-targets 0.53.0", +] + [[package]] name = "libm" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +[[package]] +name = "libnghttp2-sys" +version = "0.1.11+1.64.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b6c24e48a7167cffa7119da39d577fa482e66c688a4aac016bee862e1a713c4" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "libredfish" version = "0.1.1" @@ -2298,6 +3832,44 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.9.1", "libc", + "redox_syscall", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8935b44e7c13394a179a438e0cebba0fe08fe01b54f152e29a93b5cf993fd4" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "libssh2-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "220e4f05ad4a218192533b300327f5150e809b54c4ec83b5a1d91833601811b9" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "libz-sys" +version = "1.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b70e7a7df205e92a1a4cd9aaae7898dac0aa555503cc0a649494d0d60e7651d" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", ] [[package]] @@ -2349,7 +3921,33 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown", + "hashbrown 0.15.3", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "maybe-async" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -2364,12 +3962,27 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "memmap2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" +dependencies = [ + "libc", +] + [[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.8.8" @@ -2403,6 +4016,15 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "miow" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "359f76430b20a79f9e20e115b3428614e654f04fab314482fc0fda0ebd3c6044" +dependencies = [ + "windows-sys 0.48.0", +] + [[package]] name = "native-tls" version = "0.2.14" @@ -2429,6 +4051,16 @@ dependencies = [ "unicode-segmentation", ] +[[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 = "non-blank-string-rs" version = "1.0.4" @@ -2438,6 +4070,25 @@ dependencies = [ "serde", ] +[[package]] +name = "normpath" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8911957c4b1549ac0dc74e30db9c8b0e66ddcd6d7acc33098f4c63a64a6d7ed" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-bigint" version = "0.4.6" @@ -2554,7 +4205,7 @@ dependencies = [ "serde_urlencoded", "snafu", "tokio", - "tower", + "tower 0.5.2", "tower-http", "tracing", "url", @@ -2573,6 +4224,18 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +[[package]] +name = "opener" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0812e5e4df08da354c851a3376fead46db31c2214f849d3de356d774d057681" +dependencies = [ + "bstr", + "dbus", + "normpath", + "windows-sys 0.59.0", +] + [[package]] name = "openssl" version = "0.10.72" @@ -2671,6 +4334,34 @@ dependencies = [ "num-traits", ] +[[package]] +name = "orion" +version = "0.17.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b3da83b2b4cdc74ab6a556b2e7b473da046d5aa4008c0a7a3ae96b1b4aabb4" +dependencies = [ + "fiat-crypto 0.3.0", + "subtle", + "zeroize", +] + +[[package]] +name = "os_info" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0e1ac5fde8d43c34139135df8ea9ee9465394b2d8d20f032d38998f64afffc3" +dependencies = [ + "log", + "plist", + "windows-sys 0.52.0", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "owo-colors" version = "4.2.0" @@ -2738,6 +4429,28 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "pasetors" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1c6d47c07a08cb59ddad44d53cb5729855e35f7d993184cec3aa37ccdb7008" +dependencies = [ + "ct-codecs", + "ed25519-compact", + "getrandom 0.3.3", + "orion", + "p384", + "rand_core 0.6.4", + "regex", + "serde", + "serde_derive", + "serde_json", + "sha2", + "subtle", + "time", + "zeroize", +] + [[package]] name = "password-hash" version = "0.4.2" @@ -2755,6 +4468,12 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "pathdiff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" + [[package]] name = "pbkdf2" version = "0.11.0" @@ -2923,6 +4642,19 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +[[package]] +name = "plist" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac26e981c03a6e53e0aee43c113e3202f5581d5360dae7bd2c70e800dd0451d" +dependencies = [ + "base64 0.22.1", + "indexmap 2.9.0", + "quick-xml", + "serde", + "time", +] + [[package]] name = "poly1305" version = "0.8.0" @@ -3040,12 +4772,54 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prodash" +version = "29.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04bb108f648884c23b98a0e940ebc2c93c0c3b89f04dbaf7eb8256ce617d1bc" +dependencies = [ + "log", + "parking_lot", +] + +[[package]] +name = "prost" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-derive" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +dependencies = [ + "anyhow", + "itertools 0.14.0", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "punycode" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9e1dcb320d6839f6edb64f7a4a59d39b30480d4d1765b56873f7c858538a5fe" +[[package]] +name = "quick-xml" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2" +dependencies = [ + "memchr", +] + [[package]] name = "quote" version = "1.0.40" @@ -3126,6 +4900,15 @@ dependencies = [ "getrandom 0.3.3", ] +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "ratatui" version = "0.29.0" @@ -3138,7 +4921,7 @@ dependencies = [ "crossterm 0.28.1", "indoc", "instability", - "itertools", + "itertools 0.13.0", "lru", "paste", "strum", @@ -3175,8 +4958,17 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", ] [[package]] @@ -3187,9 +4979,15 @@ checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.5", ] +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + [[package]] name = "regex-syntax" version = "0.8.5" @@ -3272,7 +5070,7 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-util", - "tower", + "tower 0.5.2", "tower-service", "url", "wasm-bindgen", @@ -3327,6 +5125,20 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rusqlite" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c6d5e5acb6f6129fe3f7ba0a7fc77bca1942cb568535e18e7bc40262baf3110" +dependencies = [ + "bitflags 2.9.1", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", +] + [[package]] name = "russh" version = "0.45.0" @@ -3469,6 +5281,18 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustc-stable-hash" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "781442f29170c5c93b7185ad559492601acdc71d5bb0706f5868094f45cfcd08" + [[package]] name = "rustc_version" version = "0.4.1" @@ -3478,6 +5302,18 @@ dependencies = [ "semver", ] +[[package]] +name = "rustfix" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f66156d7471ff4f12253cd7fd76dfe637a595a9418168154e8570f3947fe9a8" +dependencies = [ + "serde", + "serde_json", + "thiserror 1.0.69", + "tracing", +] + [[package]] name = "rustix" version = "0.38.44" @@ -3603,6 +5439,15 @@ dependencies = [ "cipher", ] +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "schannel" version = "0.1.27" @@ -3699,6 +5544,9 @@ name = "semver" version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +dependencies = [ + "serde", +] [[package]] name = "serde" @@ -3709,6 +5557,17 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-untagged" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "299d9c19d7d466db4ab10addd5703e4c615dec2a5a16dbbafe191045e87ee66e" +dependencies = [ + "erased-serde", + "serde", + "typeid", +] + [[package]] name = "serde-value" version = "0.7.0" @@ -3730,6 +5589,15 @@ dependencies = [ "syn", ] +[[package]] +name = "serde_ignored" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b516445dac1e3535b6d658a7b528d771153dfb272ed4180ca4617a20550365ff" +dependencies = [ + "serde", +] + [[package]] name = "serde_json" version = "1.0.140" @@ -3752,6 +5620,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + [[package]] name = "serde_tokenstream" version = "0.2.2" @@ -3782,7 +5659,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap", + "indexmap 2.9.0", "itoa", "ryu", "serde", @@ -3800,6 +5677,12 @@ dependencies = [ "digest", ] +[[package]] +name = "sha1_smol" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" + [[package]] name = "sha2" version = "0.10.9" @@ -3820,6 +5703,18 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shell-escape" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f" + +[[package]] +name = "shell-words" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" + [[package]] name = "shlex" version = "1.3.0" @@ -3879,6 +5774,16 @@ dependencies = [ "time", ] +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + [[package]] name = "slab" version = "0.4.9" @@ -4038,6 +5943,18 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "supports-hyperlinks" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "804f44ed3c63152de6a9f90acbea1a110441de43006ea51bcce8f436196a288b" + +[[package]] +name = "supports-unicode" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7401a30af6cb5818bb64852270bb722533397edcfc7344954a38f420819ece2" + [[package]] name = "syn" version = "2.0.101" @@ -4123,6 +6040,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +[[package]] +name = "tar" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" +dependencies = [ + "filetime", + "libc", +] + [[package]] name = "temp-dir" version = "0.1.16" @@ -4148,6 +6075,16 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "terminal_size" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed" +dependencies = [ + "rustix 1.0.7", + "windows-sys 0.59.0", +] + [[package]] name = "termtree" version = "0.5.1" @@ -4254,6 +6191,21 @@ dependencies = [ "zerovec", ] +[[package]] +name = "tinyvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +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.45.0" @@ -4326,6 +6278,110 @@ dependencies = [ "tokio", ] +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap 2.9.0", + "serde", + "serde_spanned", + "toml_datetime", + "toml_write", + "winnow 0.7.11", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "tonic" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +dependencies = [ + "async-stream", + "async-trait", + "axum", + "base64 0.22.1", + "bytes", + "h2 0.4.10", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "hyper 1.6.0", + "hyper-timeout", + "hyper-util", + "percent-encoding", + "pin-project", + "prost", + "socket2", + "tokio", + "tokio-stream", + "tower 0.4.13", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic-health" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1eaf34ddb812120f5c601162d5429933c9b527d901ab0e7f930d3147e33a09b2" +dependencies = [ + "async-stream", + "prost", + "tokio", + "tokio-stream", + "tonic", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "indexmap 1.9.3", + "pin-project", + "pin-project-lite", + "rand 0.8.5", + "slab", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower" version = "0.5.2" @@ -4358,7 +6414,7 @@ dependencies = [ "iri-string", "mime", "pin-project-lite", - "tower", + "tower 0.5.2", "tower-layer", "tower-service", "tracing", @@ -4399,6 +6455,17 @@ dependencies = [ "syn", ] +[[package]] +name = "tracing-chrome" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf0a738ed5d6450a9fb96e86a23ad808de2b727fd1394585da5cdd6788ffe724" +dependencies = [ + "serde_json", + "tracing-core", + "tracing-subscriber", +] + [[package]] name = "tracing-core" version = "0.1.33" @@ -4419,15 +6486,33 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + [[package]] name = "tracing-subscriber" version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", "sharded-slab", + "smallvec", "thread_local", + "tracing", "tracing-core", + "tracing-log", ] [[package]] @@ -4451,6 +6536,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + [[package]] name = "typenum" version = "1.18.0" @@ -4463,12 +6554,33 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" +[[package]] +name = "unicase" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" + +[[package]] +name = "unicode-bom" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217" + [[package]] name = "unicode-ident" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +[[package]] +name = "unicode-normalization" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +dependencies = [ + "tinyvec", +] + [[package]] name = "unicode-segmentation" version = "1.12.0" @@ -4481,7 +6593,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" dependencies = [ - "itertools", + "itertools 0.13.0", "unicode-segmentation", "unicode-width 0.1.14", ] @@ -4498,6 +6610,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "universal-hash" version = "0.5.1" @@ -4593,6 +6711,27 @@ dependencies = [ "libc", ] +[[package]] +name = "wait_utils" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b85a9ad6d6ec47dbc18c38417377a5dc3de1587fbb2b92a2e33c0ae0c6aea9" +dependencies = [ + "tokio", + "tonic", + "tonic-health", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.1" @@ -4738,6 +6877,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -5035,6 +7183,24 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +[[package]] +name = "winnow" +version = "0.6.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e90edd2ac1aa278a5c4599b1d89cf03074b610800f866d4026dc199d7929a28" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" diff --git a/Cargo.toml b/Cargo.toml index 9d5369e..ef9cdb6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ members = [ "opnsense-config", "opnsense-config-xml", "harmony_cli", - "k3d", "harmony_ci_cli", + "k3d", "harmony_composer", ] [workspace.package] diff --git a/harmony_ci_cli/src/main.rs b/harmony_ci_cli/src/main.rs deleted file mode 100644 index 71ab8d8..0000000 --- a/harmony_ci_cli/src/main.rs +++ /dev/null @@ -1,79 +0,0 @@ -use std::path::Path; -use std::process::Command; - -use clap::Parser; -use clap::builder::ArgPredicate; -use inquire::Confirm; - -#[derive(Parser, Debug)] -#[command(version, about, long_about = None)] -pub struct Args { - #[arg(short, long, default_value = "./harmony")] - harmony_path: String, - - #[arg(short, long, default_value_t = false, group = "check")] - check: bool, - - #[arg(short, long, default_value_t = false, group = "package")] - package: bool, - - #[arg(short, long, default_value_t = false, group = "package")] - publish: bool, - - #[arg(short, long, default_value_t = false, group = "deploy")] - deploy: bool, - - #[arg(short, long, default_value_t = false, group = "deploy")] - staging: bool, - - #[arg(short, long, default_value_t = false, group = "deploy")] - prod: bool, - - #[arg(short, long, default_value_t = false, group = "deploy")] - smoke_test: bool, -} - -fn main() { - let args = Args::parse(); - - let harmony_path = Path::new(&args.harmony_path).try_exists(); - - match harmony_path { - Ok(_path) => { - todo!("implement cargo check and compile harmony_cli/UI binary in harmony dir") - } - Err(_) => todo!("implement autodetect code"), - } - - if args.check { - let check_script = - match Path::new(&format!("{}/{}", args.harmony_path, "check.sh")).try_exists() { - Ok(path) => path, - Err(_) => todo!("implement logic when couldn't find check script"), - }; - - let check_output = Command::new("sh") - .arg("-c") - .arg(check_script.to_string()) - .output() - .expect("failed to run check script"); - } - - if args.package { - if args.publish { - todo!("implement publish logic"); - } - todo!("implement packaging logic"); - } - - if args.deploy { - if args.staging { - todo!("implement staging deployment"); - } - - if args.prod { - todo!("implement prod deployment"); - } - todo!("implement deployment logic"); - } -} diff --git a/harmony_ci_cli/Cargo.toml b/harmony_composer/Cargo.toml similarity index 80% rename from harmony_ci_cli/Cargo.toml rename to harmony_composer/Cargo.toml index 2c367aa..c9f8d82 100644 --- a/harmony_ci_cli/Cargo.toml +++ b/harmony_composer/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "harmony_ci_cli" +name = "harmony_composer" edition = "2024" version.workspace = true readme.workspace = true @@ -11,3 +11,5 @@ clap = { version = "4.5.35", features = ["derive"] } inquire.workspace = true tokio.workspace = true env_logger.workspace = true +cargo = "0.88.0" +docker_utils = "0.2.3" diff --git a/harmony_composer/src/main.rs b/harmony_composer/src/main.rs new file mode 100644 index 0000000..c715d98 --- /dev/null +++ b/harmony_composer/src/main.rs @@ -0,0 +1,144 @@ +use std::path::Path; +use std::process::Command; + +use clap::builder::ArgPredicate; +use clap::{Args, Parser, Subcommand}; +use inquire::Confirm; + +#[derive(Parser)] +#[command(version, about, long_about = None)] +#[command(propagate_version = true)] +struct GlobalArgs { + #[arg(long, default_value = "./harmony")] + harmony_path: String, + + #[command(subcommand)] + command: Commands, +} + +#[derive(Subcommand)] +enum Commands { + Check(CheckArgs), + Package(PackageArgs), + Deploy(DeployArgs), + All(AllArgs), +} + +#[derive(Args)] +struct CheckArgs { + #[arg(long, default_value = "check.sh")] + check_script_path: String, +} + +#[derive(Args)] +struct PackageArgs { + #[arg(long, default_value_t = false)] + package: bool, + #[arg(long, default_value_t = false)] + publish: bool, +} + +#[derive(Args)] +struct DeployArgs { + #[arg(long, default_value_t = false)] + staging: bool, + + #[arg(long, default_value_t = false)] + prod: bool, + + #[arg(long, default_value_t = false)] + smoke_test: bool, +} + +#[derive(Args)] +struct AllArgs { + #[arg(long, default_value = "check.sh")] + check_script_path: String, + + #[arg(long, default_value_t = false)] + package: bool, + + #[arg(long, default_value_t = false)] + publish: bool, + + #[arg(long, default_value_t = false)] + staging: bool, + + #[arg(long, default_value_t = false)] + prod: bool, + + #[arg(long, default_value_t = false)] + smoke_test: bool, +} + +fn main() { + let cli_args = GlobalArgs::parse(); + + let harmony_path = Path::new(&args.harmony_path).try_exists(); + + match harmony_path { + Ok(_path) => compile_harmony(args.harmony_path.clone()), + Err(_) => todo!("implement autodetect code"), + } + + match cli_args.command { + Commands::Check(args) => { + let check_script = match Path::new(&format!("{}/{}", cli_args.harmony_path, "check.sh")) + .try_exists() + { + Ok(path) => path, + Err(_) => todo!("implement logic when couldn't find check script"), + }; + + let check_output = Command::new("sh") + .arg("-c") + .arg(check_script.to_string()) + .output() + .expect("failed to run check script"); + } + Commands::Package(args) => { + if args.publish { + todo!("implement publish logic"); + } + todo!("implement packaging logic"); + } + Commands::Deploy(args) => { + if args.staging { + todo!("implement staging deployment"); + } + + if args.prod { + todo!("implement prod deployment"); + } + todo!("implement deployment logic"); + } + Commands::All(args) => todo!( + "take all previous match arms and turn them into separate functions, and call them all one after the other" + ), + } +} + +fn compile_harmony(harmony_location: String) { + let gctx = cargo::util::context::GlobalContext::default().unwrap(); + let cargo_exists = gctx.cargo_exe().unwrap().exists(); + + if cargo_exists { + let _cargo_build = cargo::ops::compile( + &cargo::core::Workspace::new( + &Path::new(&format!("{}/Cargo.toml", harmony_location)) + .canonicalize() + .unwrap(), + &gctx, + ) + .unwrap(), + &cargo::ops::CompileOptions::new(&gctx, cargo::core::compiler::CompileMode::Build) + .unwrap(), + ) + .expect("build success"); + return; + } + + let _docker_util = docker_utils::DockerUtil::new().expect("Failed to create DockerUtil"); + + todo!("implement docker build container"); +} -- 2.39.5 From edf96780e7a8e9173c63788c5e393d332f8c8afe Mon Sep 17 00:00:00 2001 From: tahahawa Date: Tue, 10 Jun 2025 16:27:53 -0400 Subject: [PATCH 03/52] make it actually check folder properly --- Cargo.lock | 1 + harmony_composer/Cargo.toml | 1 + harmony_composer/src/main.rs | 114 +++++++++++++++++------------------ 3 files changed, 58 insertions(+), 58 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bbf8083..09a76be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2840,6 +2840,7 @@ dependencies = [ "docker_utils", "env_logger", "inquire", + "log", "tokio", ] diff --git a/harmony_composer/Cargo.toml b/harmony_composer/Cargo.toml index c9f8d82..87f15cc 100644 --- a/harmony_composer/Cargo.toml +++ b/harmony_composer/Cargo.toml @@ -11,5 +11,6 @@ clap = { version = "4.5.35", features = ["derive"] } inquire.workspace = true tokio.workspace = true env_logger.workspace = true +log.workspace = true cargo = "0.88.0" docker_utils = "0.2.3" diff --git a/harmony_composer/src/main.rs b/harmony_composer/src/main.rs index c715d98..dbeee37 100644 --- a/harmony_composer/src/main.rs +++ b/harmony_composer/src/main.rs @@ -4,19 +4,19 @@ use std::process::Command; use clap::builder::ArgPredicate; use clap::{Args, Parser, Subcommand}; use inquire::Confirm; +use log::{debug, info, warn}; #[derive(Parser)] -#[command(version, about, long_about = None)] -#[command(propagate_version = true)] +#[command(version, about, long_about = None, flatten_help = true, propagate_version = true)] struct GlobalArgs { - #[arg(long, default_value = "./harmony")] + #[arg(long, default_value = "harmony")] harmony_path: String, #[command(subcommand)] - command: Commands, + command: Option, } -#[derive(Subcommand)] +#[derive(Subcommand, Clone, Debug)] enum Commands { Check(CheckArgs), Package(PackageArgs), @@ -24,21 +24,19 @@ enum Commands { All(AllArgs), } -#[derive(Args)] +#[derive(Args, Clone, Debug)] struct CheckArgs { #[arg(long, default_value = "check.sh")] check_script_path: String, } -#[derive(Args)] +#[derive(Args, Clone, Debug)] struct PackageArgs { - #[arg(long, default_value_t = false)] - package: bool, #[arg(long, default_value_t = false)] publish: bool, } -#[derive(Args)] +#[derive(Args, Clone, Debug)] struct DeployArgs { #[arg(long, default_value_t = false)] staging: bool, @@ -50,71 +48,71 @@ struct DeployArgs { smoke_test: bool, } -#[derive(Args)] +#[derive(Args, Clone, Debug)] struct AllArgs { - #[arg(long, default_value = "check.sh")] - check_script_path: String, + #[command(flatten)] + check: CheckArgs, - #[arg(long, default_value_t = false)] - package: bool, + #[command(flatten)] + package: PackageArgs, - #[arg(long, default_value_t = false)] - publish: bool, - - #[arg(long, default_value_t = false)] - staging: bool, - - #[arg(long, default_value_t = false)] - prod: bool, - - #[arg(long, default_value_t = false)] - smoke_test: bool, + #[command(flatten)] + deploy: DeployArgs, } fn main() { + env_logger::init(); let cli_args = GlobalArgs::parse(); - let harmony_path = Path::new(&args.harmony_path).try_exists(); + let harmony_path = Path::new(&cli_args.harmony_path) + .try_exists() + .expect("couldn't check if path exists"); match harmony_path { - Ok(_path) => compile_harmony(args.harmony_path.clone()), - Err(_) => todo!("implement autodetect code"), + true => compile_harmony(cli_args.harmony_path.clone()), + false => todo!("implement autodetect code"), } match cli_args.command { - Commands::Check(args) => { - let check_script = match Path::new(&format!("{}/{}", cli_args.harmony_path, "check.sh")) + Some(command) => match command { + Commands::Check(args) => { + let check_script = match Path::new(&format!( + "{}/{}", + cli_args.harmony_path, args.check_script_path + )) .try_exists() - { - Ok(path) => path, - Err(_) => todo!("implement logic when couldn't find check script"), - }; + { + Ok(path) => path, + Err(_) => todo!("implement logic when couldn't find check script"), + }; - let check_output = Command::new("sh") - .arg("-c") - .arg(check_script.to_string()) - .output() - .expect("failed to run check script"); - } - Commands::Package(args) => { - if args.publish { - todo!("implement publish logic"); + let check_output = Command::new("sh") + .arg("-c") + .arg(check_script.to_string()) + .output() + .expect("failed to run check script"); } - todo!("implement packaging logic"); - } - Commands::Deploy(args) => { - if args.staging { - todo!("implement staging deployment"); + Commands::Package(args) => { + if args.publish { + todo!("implement publish logic"); + } + todo!("implement packaging logic"); } + Commands::Deploy(args) => { + if args.staging { + todo!("implement staging deployment"); + } - if args.prod { - todo!("implement prod deployment"); + if args.prod { + todo!("implement prod deployment"); + } + todo!("implement deployment logic"); } - todo!("implement deployment logic"); - } - Commands::All(args) => todo!( - "take all previous match arms and turn them into separate functions, and call them all one after the other" - ), + Commands::All(args) => todo!( + "take all previous match arms and turn them into separate functions, and call them all one after the other" + ), + }, + None => todo!("run interactively, ask for info on CLI"), } } @@ -127,14 +125,14 @@ fn compile_harmony(harmony_location: String) { &cargo::core::Workspace::new( &Path::new(&format!("{}/Cargo.toml", harmony_location)) .canonicalize() - .unwrap(), + .expect("Couldn't find Cargo.toml in harmony dir"), &gctx, ) .unwrap(), &cargo::ops::CompileOptions::new(&gctx, cargo::core::compiler::CompileMode::Build) .unwrap(), ) - .expect("build success"); + .expect("build didn't go successfully"); return; } -- 2.39.5 From f5c07acf889ca2cc5db3c382bb6c833f58e98c72 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Thu, 12 Jun 2025 00:48:49 -0400 Subject: [PATCH 04/52] WIP compilation, docker, cargo, etc --- Cargo.lock | 309 ++++++++++++----------------------- harmony_composer/Cargo.toml | 4 +- harmony_composer/src/main.rs | 178 ++++++++++++++++---- 3 files changed, 257 insertions(+), 234 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 09a76be..34c8441 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -195,28 +195,6 @@ dependencies = [ "wait-timeout", ] -[[package]] -name = "async-stream" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "async-trait" version = "0.1.88" @@ -240,53 +218,6 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" -[[package]] -name = "axum" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" -dependencies = [ - "async-trait", - "axum-core", - "bytes", - "futures-util", - "http 1.3.1", - "http-body 1.0.1", - "http-body-util", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper 1.0.2", - "tower 0.5.2", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 1.3.1", - "http-body 1.0.1", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper 1.0.2", - "tower-layer", - "tower-service", -] - [[package]] name = "backtrace" version = "0.3.75" @@ -415,26 +346,48 @@ dependencies = [ ] [[package]] -name = "bon" -version = "2.3.0" +name = "bollard" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97493a391b4b18ee918675fb8663e53646fd09321c58b46afa04e8ce2499c869" +checksum = "af706e9dc793491dd382c99c22fde6e9934433d4cc0d6a4b34eb2cdc57a5c917" dependencies = [ - "bon-macros", - "rustversion", + "base64 0.22.1", + "bollard-stubs", + "bytes", + "futures-core", + "futures-util", + "hex", + "http 1.3.1", + "http-body-util", + "hyper 1.6.0", + "hyper-named-pipe", + "hyper-util", + "hyperlocal", + "log", + "pin-project-lite", + "serde", + "serde_derive", + "serde_json", + "serde_repr", + "serde_urlencoded", + "thiserror 2.0.12", + "tokio", + "tokio-util", + "tower-service", + "url", + "winapi", ] [[package]] -name = "bon-macros" -version = "2.3.0" +name = "bollard-stubs" +version = "1.48.2-rc.28.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2af3eac944c12cdf4423eab70d310da0a8e5851a18ffb192c0a5e3f7ae1663" +checksum = "79cdf0fccd5341b38ae0be74b74410bdd5eceeea8876dc149a13edfe57e3b259" dependencies = [ - "darling", - "ident_case", - "proc-macro2", - "quote", - "syn", + "serde", + "serde_json", + "serde_repr", + "serde_with", ] [[package]] @@ -1104,6 +1057,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "current_platform" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a74858bcfe44b22016cb49337d7b6f04618c58e5dbfdef61b06b8c434324a0bc" + [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -1286,17 +1245,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" -[[package]] -name = "docker_utils" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a64876aa646872a68ad74a6dba097f35a6641530767cb7c74a74d7a58099f3" -dependencies = [ - "bon", - "tokio", - "wait_utils", -] - [[package]] name = "dockerfile_builder" version = "0.1.5" @@ -2835,10 +2783,12 @@ name = "harmony_composer" version = "0.1.0" dependencies = [ "assert_cmd", + "bollard", "cargo", "clap", - "docker_utils", + "current_platform", "env_logger", + "futures-util", "inquire", "log", "tokio", @@ -3171,6 +3121,21 @@ dependencies = [ "tower-service", ] +[[package]] +name = "hyper-named-pipe" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73b7d8abf35697b81a825e386fc151e0d503e8cb5fcb93cc8669c376dfd6f278" +dependencies = [ + "hex", + "hyper 1.6.0", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", + "winapi", +] + [[package]] name = "hyper-rustls" version = "0.27.5" @@ -3252,6 +3217,21 @@ dependencies = [ "tracing", ] +[[package]] +name = "hyperlocal" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "986c5ce3b994526b3cd75578e62554abd09f0899d6206de48b3e96ab34ccc8c7" +dependencies = [ + "hex", + "http-body-util", + "hyper 1.6.0", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + [[package]] name = "iana-time-zone" version = "0.1.63" @@ -3433,6 +3413,7 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", + "serde", ] [[package]] @@ -3443,6 +3424,7 @@ checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", "hashbrown 0.15.3", + "serde", ] [[package]] @@ -3720,7 +3702,7 @@ dependencies = [ "thiserror 2.0.12", "tokio", "tokio-util", - "tower 0.5.2", + "tower", "tower-http", "tracing", ] @@ -3934,12 +3916,6 @@ dependencies = [ "regex-automata 0.1.10", ] -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - [[package]] name = "maybe-async" version = "0.2.10" @@ -4206,7 +4182,7 @@ dependencies = [ "serde_urlencoded", "snafu", "tokio", - "tower 0.5.2", + "tower", "tower-http", "tracing", "url", @@ -4783,29 +4759,6 @@ dependencies = [ "parking_lot", ] -[[package]] -name = "prost" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-derive" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" -dependencies = [ - "anyhow", - "itertools 0.14.0", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "punycode" version = "0.4.1" @@ -5071,7 +5024,7 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-util", - "tower 0.5.2", + "tower", "tower-service", "url", "wasm-bindgen", @@ -5621,6 +5574,17 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_repr" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "serde_spanned" version = "0.6.9" @@ -5654,6 +5618,23 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.9.0", + "serde", + "serde_derive", + "serde_json", + "time", +] + [[package]] name = "serde_yaml" version = "0.9.34+deprecated" @@ -6320,69 +6301,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" -[[package]] -name = "tonic" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" -dependencies = [ - "async-stream", - "async-trait", - "axum", - "base64 0.22.1", - "bytes", - "h2 0.4.10", - "http 1.3.1", - "http-body 1.0.1", - "http-body-util", - "hyper 1.6.0", - "hyper-timeout", - "hyper-util", - "percent-encoding", - "pin-project", - "prost", - "socket2", - "tokio", - "tokio-stream", - "tower 0.4.13", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tonic-health" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1eaf34ddb812120f5c601162d5429933c9b527d901ab0e7f930d3147e33a09b2" -dependencies = [ - "async-stream", - "prost", - "tokio", - "tokio-stream", - "tonic", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand 0.8.5", - "slab", - "tokio", - "tokio-util", - "tower-layer", - "tower-service", - "tracing", -] - [[package]] name = "tower" version = "0.5.2" @@ -6415,7 +6333,7 @@ dependencies = [ "iri-string", "mime", "pin-project-lite", - "tower 0.5.2", + "tower", "tower-layer", "tower-service", "tracing", @@ -6712,17 +6630,6 @@ dependencies = [ "libc", ] -[[package]] -name = "wait_utils" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b85a9ad6d6ec47dbc18c38417377a5dc3de1587fbb2b92a2e33c0ae0c6aea9" -dependencies = [ - "tokio", - "tonic", - "tonic-health", -] - [[package]] name = "walkdir" version = "2.5.0" diff --git a/harmony_composer/Cargo.toml b/harmony_composer/Cargo.toml index 87f15cc..9554e96 100644 --- a/harmony_composer/Cargo.toml +++ b/harmony_composer/Cargo.toml @@ -13,4 +13,6 @@ tokio.workspace = true env_logger.workspace = true log.workspace = true cargo = "0.88.0" -docker_utils = "0.2.3" +bollard = "0.19.0" +current_platform = "0.2.0" +futures-util = "0.3.31" diff --git a/harmony_composer/src/main.rs b/harmony_composer/src/main.rs index dbeee37..57057ee 100644 --- a/harmony_composer/src/main.rs +++ b/harmony_composer/src/main.rs @@ -1,17 +1,28 @@ +use bollard::models::ContainerCreateBody; +use bollard::query_parameters::{ + AttachContainerOptions, CreateContainerOptionsBuilder, ListContainersOptionsBuilder, + RemoveContainerOptions, StartContainerOptions, WaitContainerOptions, +}; +use bollard::secret::HostConfig; +use clap::{Args, Parser, Subcommand}; +use futures_util::StreamExt; +use log::info; +use std::collections::HashMap; use std::path::Path; use std::process::Command; -use clap::builder::ArgPredicate; -use clap::{Args, Parser, Subcommand}; -use inquire::Confirm; -use log::{debug, info, warn}; - #[derive(Parser)] #[command(version, about, long_about = None, flatten_help = true, propagate_version = true)] struct GlobalArgs { #[arg(long, default_value = "harmony")] harmony_path: String, + #[arg(long)] + compile_method: Option, + + #[arg(long)] + compile_platform: Option, + #[command(subcommand)] command: Option, } @@ -60,7 +71,8 @@ struct AllArgs { deploy: DeployArgs, } -fn main() { +#[tokio::main] +async fn main() { env_logger::init(); let cli_args = GlobalArgs::parse(); @@ -69,28 +81,36 @@ fn main() { .expect("couldn't check if path exists"); match harmony_path { - true => compile_harmony(cli_args.harmony_path.clone()), + true => compile_harmony(cli_args.compile_method, None, cli_args.harmony_path.clone()).await, false => todo!("implement autodetect code"), } match cli_args.command { Some(command) => match command { Commands::Check(args) => { - let check_script = match Path::new(&format!( - "{}/{}", - cli_args.harmony_path, args.check_script_path - )) - .try_exists() + let check_script_str = + format!("{}/{}", cli_args.harmony_path, args.check_script_path); + + let check_script = Path::new(&check_script_str); + + match check_script + .try_exists() + .expect("couldn't check if path exists") { - Ok(path) => path, - Err(_) => todo!("implement logic when couldn't find check script"), + true => (), + false => todo!("implement couldn't find path logic"), }; let check_output = Command::new("sh") .arg("-c") - .arg(check_script.to_string()) + .arg(check_script) .output() .expect("failed to run check script"); + info!( + "check stdout: {}, check stderr: {}", + String::from_utf8(check_output.stdout).expect("couldn't parse from utf8"), + String::from_utf8(check_output.stderr).expect("couldn't parse from utf8") + ); } Commands::Package(args) => { if args.publish { @@ -108,7 +128,7 @@ fn main() { } todo!("implement deployment logic"); } - Commands::All(args) => todo!( + Commands::All(_args) => todo!( "take all previous match arms and turn them into separate functions, and call them all one after the other" ), }, @@ -116,27 +136,121 @@ fn main() { } } -fn compile_harmony(harmony_location: String) { +#[derive(Clone, Debug, clap::ValueEnum)] +enum CompileMethod { + LocalCargo, + Docker, +} + +async fn compile_harmony( + method: Option, + platform: Option, + harmony_location: String, +) { + let platform = match platform { + Some(p) => p, + None => current_platform::CURRENT_PLATFORM.to_string(), + }; + let gctx = cargo::util::context::GlobalContext::default().unwrap(); let cargo_exists = gctx.cargo_exe().unwrap().exists(); - if cargo_exists { - let _cargo_build = cargo::ops::compile( - &cargo::core::Workspace::new( - &Path::new(&format!("{}/Cargo.toml", harmony_location)) - .canonicalize() - .expect("Couldn't find Cargo.toml in harmony dir"), - &gctx, - ) - .unwrap(), - &cargo::ops::CompileOptions::new(&gctx, cargo::core::compiler::CompileMode::Build) - .unwrap(), + let method = match method { + Some(m) => m, + None => { + if cargo_exists { + compile_cargo(gctx, harmony_location).await; + return; + } else { + compile_docker(platform, harmony_location).await; + return; + } + } + }; + + match method { + CompileMethod::LocalCargo => compile_cargo(gctx, harmony_location).await, + CompileMethod::Docker => compile_docker(platform, harmony_location).await, + }; +} + +async fn compile_cargo(gctx: cargo::util::context::GlobalContext, harmony_location: String) { + let _cargo_build = cargo::ops::compile( + &cargo::core::Workspace::new( + &Path::new(&format!("{}/Cargo.toml", harmony_location)) + .canonicalize() + .expect("Couldn't find Cargo.toml in harmony dir"), + &gctx, ) - .expect("build didn't go successfully"); - return; + .unwrap(), + &cargo::ops::CompileOptions::new(&gctx, cargo::core::compiler::CompileMode::Build).unwrap(), + ) + .expect("build didn't go successfully"); + return; +} + +async fn compile_docker(platform: String, harmony_location: String) { + let docker_client = + bollard::Docker::connect_with_local_defaults().expect("couldn't connect to docker"); + + let mut filters = HashMap::new(); + filters.insert(String::from("name"), vec![String::from("harmony_build")]); + let list_containers_options = ListContainersOptionsBuilder::new() + .all(true) + .filters(&filters) + .build(); + + let containers = &docker_client + .list_containers(Some(list_containers_options)) + .await + .expect("list containers failed"); + + if containers.len() > 0 { + docker_client + .remove_container("harmony_build", None::) + .await + .expect("failed to remove container"); } - let _docker_util = docker_utils::DockerUtil::new().expect("Failed to create DockerUtil"); + let options = Some( + CreateContainerOptionsBuilder::new() + .name("harmony_build") + .build(), + ); - todo!("implement docker build container"); + let config = ContainerCreateBody { + image: Some("docker.io/rust:1.87.0".to_string()), + working_dir: Some("/mnt".to_string()), + entrypoint: Some(vec![ + "cargo".to_string(), + "build".to_string(), + format!("--target={}", platform), + "--release".to_string(), + ]), + host_config: Some(HostConfig { + binds: Some(vec![format!("{}:/mnt", harmony_location)]), + ..Default::default() + }), + ..Default::default() + }; + + docker_client + .create_container(options, config) + .await + .expect("couldn't create container"); + + docker_client + .start_container("harmony_build", None::) + .await + .expect("couldn't start container"); + + let wait_options = WaitContainerOptions { + condition: "not-running".to_string(), + }; + let mut wait = docker_client + .wait_container("harmony_build", Some(wait_options)) + .boxed(); + + // wait until container is no longer running + while let Some(_) = wait.next().await {} } -- 2.39.5 From 847f2bb30c250d61bfaad8397b6a1cb47e0d6593 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Thu, 12 Jun 2025 00:49:48 -0400 Subject: [PATCH 05/52] fmt --- Cargo.toml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ef9cdb6..970300d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,8 @@ members = [ "opnsense-config", "opnsense-config-xml", "harmony_cli", - "k3d", "harmony_composer", + "k3d", + "harmony_composer", ] [workspace.package] @@ -23,7 +24,12 @@ log = "0.4.22" env_logger = "0.11.5" derive-new = "0.7.0" async-trait = "0.1.82" -tokio = { version = "1.40.0", features = ["io-std", "fs", "macros", "rt-multi-thread"] } +tokio = { version = "1.40.0", features = [ + "io-std", + "fs", + "macros", + "rt-multi-thread", +] } cidr = { features = ["serde"], version = "0.2" } russh = "0.45.0" russh-keys = "0.45.0" @@ -35,7 +41,7 @@ serde_yaml = "0.9.34" serde-value = "0.7.0" http = "1.2.0" inquire = "0.7.5" -convert_case = "0.8.0" +convert_case = "0.8.0" chrono = "0.4" [workspace.dependencies.uuid] -- 2.39.5 From aa43b3e4635fd471a72fc8b205250c72ee8ed836 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Thu, 12 Jun 2025 00:52:14 -0400 Subject: [PATCH 06/52] cargo fix --- harmony_composer/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/harmony_composer/src/main.rs b/harmony_composer/src/main.rs index 57057ee..7023600 100644 --- a/harmony_composer/src/main.rs +++ b/harmony_composer/src/main.rs @@ -1,6 +1,6 @@ use bollard::models::ContainerCreateBody; use bollard::query_parameters::{ - AttachContainerOptions, CreateContainerOptionsBuilder, ListContainersOptionsBuilder, + CreateContainerOptionsBuilder, ListContainersOptionsBuilder, RemoveContainerOptions, StartContainerOptions, WaitContainerOptions, }; use bollard::secret::HostConfig; -- 2.39.5 From f14c5e2b9d0049f28993a708c0c28cf612d38bdf Mon Sep 17 00:00:00 2001 From: tahahawa Date: Thu, 12 Jun 2025 09:56:00 -0400 Subject: [PATCH 07/52] fmt/fix --- harmony_composer/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/harmony_composer/src/main.rs b/harmony_composer/src/main.rs index 7023600..910d4f3 100644 --- a/harmony_composer/src/main.rs +++ b/harmony_composer/src/main.rs @@ -1,7 +1,7 @@ use bollard::models::ContainerCreateBody; use bollard::query_parameters::{ - CreateContainerOptionsBuilder, ListContainersOptionsBuilder, - RemoveContainerOptions, StartContainerOptions, WaitContainerOptions, + CreateContainerOptionsBuilder, ListContainersOptionsBuilder, RemoveContainerOptions, + StartContainerOptions, WaitContainerOptions, }; use bollard::secret::HostConfig; use clap::{Args, Parser, Subcommand}; -- 2.39.5 From 99e9aad6879a90477833429be99184f047b5f864 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Fri, 13 Jun 2025 00:25:23 -0400 Subject: [PATCH 08/52] deploy and docker logs works ??? --- Cargo.lock | 1 + harmony_composer/Cargo.toml | 1 + harmony_composer/src/main.rs | 134 ++++++++++++++++++++++++++--------- 3 files changed, 103 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 34c8441..15fa2e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2791,6 +2791,7 @@ dependencies = [ "futures-util", "inquire", "log", + "serde_json", "tokio", ] diff --git a/harmony_composer/Cargo.toml b/harmony_composer/Cargo.toml index 9554e96..c2dd2ce 100644 --- a/harmony_composer/Cargo.toml +++ b/harmony_composer/Cargo.toml @@ -16,3 +16,4 @@ cargo = "0.88.0" bollard = "0.19.0" current_platform = "0.2.0" futures-util = "0.3.31" +serde_json = "1.0.140" diff --git a/harmony_composer/src/main.rs b/harmony_composer/src/main.rs index 910d4f3..3a4418f 100644 --- a/harmony_composer/src/main.rs +++ b/harmony_composer/src/main.rs @@ -1,15 +1,17 @@ use bollard::models::ContainerCreateBody; use bollard::query_parameters::{ - CreateContainerOptionsBuilder, ListContainersOptionsBuilder, RemoveContainerOptions, - StartContainerOptions, WaitContainerOptions, + CreateContainerOptionsBuilder, ListContainersOptionsBuilder, LogsOptions, + RemoveContainerOptions, StartContainerOptions, WaitContainerOptions, }; use bollard::secret::HostConfig; use clap::{Args, Parser, Subcommand}; -use futures_util::StreamExt; +use futures_util::{StreamExt, TryStreamExt}; use log::info; use std::collections::HashMap; -use std::path::Path; +use std::fmt::format; +use std::path::{Path, PathBuf}; use std::process::Command; +use tokio::fs; #[derive(Parser)] #[command(version, about, long_about = None, flatten_help = true, propagate_version = true)] @@ -30,7 +32,6 @@ struct GlobalArgs { #[derive(Subcommand, Clone, Debug)] enum Commands { Check(CheckArgs), - Package(PackageArgs), Deploy(DeployArgs), All(AllArgs), } @@ -41,12 +42,6 @@ struct CheckArgs { check_script_path: String, } -#[derive(Args, Clone, Debug)] -struct PackageArgs { - #[arg(long, default_value_t = false)] - publish: bool, -} - #[derive(Args, Clone, Debug)] struct DeployArgs { #[arg(long, default_value_t = false)] @@ -64,9 +59,6 @@ struct AllArgs { #[command(flatten)] check: CheckArgs, - #[command(flatten)] - package: PackageArgs, - #[command(flatten)] deploy: DeployArgs, } @@ -80,8 +72,12 @@ async fn main() { .try_exists() .expect("couldn't check if path exists"); + let harmony_bin_path: PathBuf; match harmony_path { - true => compile_harmony(cli_args.compile_method, None, cli_args.harmony_path.clone()).await, + true => { + harmony_bin_path = + compile_harmony(cli_args.compile_method, None, cli_args.harmony_path.clone()).await + } false => todo!("implement autodetect code"), } @@ -112,12 +108,6 @@ async fn main() { String::from_utf8(check_output.stderr).expect("couldn't parse from utf8") ); } - Commands::Package(args) => { - if args.publish { - todo!("implement publish logic"); - } - todo!("implement packaging logic"); - } Commands::Deploy(args) => { if args.staging { todo!("implement staging deployment"); @@ -126,7 +116,15 @@ async fn main() { if args.prod { todo!("implement prod deployment"); } - todo!("implement deployment logic"); + let deploy_output = Command::new(harmony_bin_path) + .arg("-y") + .arg("-a") + .output() + .expect("failed to run harmony deploy"); + println!( + "deploy output: {}", + String::from_utf8(deploy_output.stdout).expect("couldn't parse from utf8") + ); } Commands::All(_args) => todo!( "take all previous match arms and turn them into separate functions, and call them all one after the other" @@ -146,7 +144,7 @@ async fn compile_harmony( method: Option, platform: Option, harmony_location: String, -) { +) -> PathBuf { let platform = match platform { Some(p) => p, None => current_platform::CURRENT_PLATFORM.to_string(), @@ -159,23 +157,24 @@ async fn compile_harmony( Some(m) => m, None => { if cargo_exists { - compile_cargo(gctx, harmony_location).await; - return; + return compile_cargo(gctx, harmony_location).await; } else { - compile_docker(platform, harmony_location).await; - return; + return compile_docker(platform, harmony_location).await; } } }; match method { - CompileMethod::LocalCargo => compile_cargo(gctx, harmony_location).await, - CompileMethod::Docker => compile_docker(platform, harmony_location).await, + CompileMethod::LocalCargo => return compile_cargo(gctx, harmony_location).await, + CompileMethod::Docker => return compile_docker(platform, harmony_location).await, }; } -async fn compile_cargo(gctx: cargo::util::context::GlobalContext, harmony_location: String) { - let _cargo_build = cargo::ops::compile( +async fn compile_cargo( + gctx: cargo::util::context::GlobalContext, + harmony_location: String, +) -> PathBuf { + let cargo_build = cargo::ops::compile( &cargo::core::Workspace::new( &Path::new(&format!("{}/Cargo.toml", harmony_location)) .canonicalize() @@ -186,10 +185,24 @@ async fn compile_cargo(gctx: cargo::util::context::GlobalContext, harmony_locati &cargo::ops::CompileOptions::new(&gctx, cargo::core::compiler::CompileMode::Build).unwrap(), ) .expect("build didn't go successfully"); - return; + + let bin = cargo_build.binaries.first().expect("no binaries built"); + let bin_out; + if let Some(ext) = bin.path.extension() { + bin_out = PathBuf::from(format!( + "{}/harmony.{}", + harmony_location, + ext.to_str().expect("couldn't convert OsStr to str") + )); + let _copy_res = fs::copy(bin.path.clone(), bin_out.clone()).await; + } else { + bin_out = PathBuf::from(format!("{}/harmony", harmony_location)); + let _copy_res = fs::copy(bin.path.clone(), bin_out.clone()).await; + } + return bin_out; } -async fn compile_docker(platform: String, harmony_location: String) { +async fn compile_docker(platform: String, harmony_location: String) -> PathBuf { let docker_client = bollard::Docker::connect_with_local_defaults().expect("couldn't connect to docker"); @@ -226,6 +239,7 @@ async fn compile_docker(platform: String, harmony_location: String) { "build".to_string(), format!("--target={}", platform), "--release".to_string(), + "--message-format=json".to_string(), ]), host_config: Some(HostConfig { binds: Some(vec![format!("{}:/mnt", harmony_location)]), @@ -251,6 +265,60 @@ async fn compile_docker(platform: String, harmony_location: String) { .wait_container("harmony_build", Some(wait_options)) .boxed(); + let mut logs_stream = docker_client.logs( + "harmony_build", + Some(LogsOptions { + follow: true, + stdout: true, + stderr: true, + tail: "all".to_string(), + ..Default::default() + }), + ); + + let mut bin_out = PathBuf::from(format!("{}/harmony", harmony_location)); + + while let Some(l) = logs_stream.next().await { + let l_str = l.expect("couldn't unwrap logoutput").to_string(); + println!("{}", l_str); + + let l_json: Option = + serde_json::from_str(l_str.as_str()).unwrap_or(None); + + match l_json { + Some(j) => match j.get("manifest_path") { + Some(p) => { + if p == "/mnt/Cargo.toml" { + let bin = PathBuf::from(format!( + "{}/{}", + harmony_location, + j.get("executable") + .expect("couldn't get json executable") + .as_str() + .expect("couldn't get json executable as str") + .replacen("/mnt/", "", 1) + )); + if let Some(ext) = bin.extension() { + bin_out = PathBuf::from(format!( + "{}/harmony.{}", + harmony_location, + ext.to_str().expect("couldn't convert OsStr to str") + )); + let _copy_res = fs::copy(bin.clone(), bin_out.clone()).await; + } else { + bin_out = PathBuf::from(format!("{}/harmony", harmony_location)); + let _copy_res = fs::copy(bin.clone(), bin_out.clone()).await; + } + } + } + None => (), + }, + None => (), + }; + } + // wait until container is no longer running while let Some(_) = wait.next().await {} + + return bin_out; } -- 2.39.5 From 6191fd185862625200db8f76f8776480cde65d42 Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Sat, 14 Jun 2025 19:21:05 -0400 Subject: [PATCH 09/52] Stop using cargo internal API, too complicated. Switch to programmatically parsing metadata output. Add CI (untested, probably doesn't work), create dockerfile --- .dockerignore | 1 + .gitea/workflows/harmony_composer.yaml | 46 + Cargo.lock | 1859 +----------------------- Dockerfile | 15 + harmony_composer/Cargo.toml | 4 +- harmony_composer/src/main.rs | 148 +- 6 files changed, 165 insertions(+), 1908 deletions(-) create mode 100644 .dockerignore create mode 100644 .gitea/workflows/harmony_composer.yaml create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..9f97022 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +target/ \ No newline at end of file diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml new file mode 100644 index 0000000..ae85e24 --- /dev/null +++ b/.gitea/workflows/harmony_composer.yaml @@ -0,0 +1,46 @@ +name: Compile and package harmony_composer +on: + push: + branches: + - main + +jobs: + check: + runs-on: rust-cargo + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build for Linux x86_64 + run: cargo build --release --bin harmony_composer --target x86_64-unknown-linux-gnu + + - name: Build for Linux ARM64 + run: cargo build --release --bin harmony_composer --target aarch64-unknown-linux-gnu + + - name: Build for Windows x86_64 GNU + run: cargo build --release --bin harmony_composer --target x86_64-pc-windows-gnu + + # - name: Build for MacOS ARM64 + # run: cargo build --release --bin harmony_composer --target aarch64-apple-darwin + + - uses: actions/upload-artifact@v4 + with: + name: binaries + path: | + target/x86_64-unknown-linux-gnu/release/harmony_composer + target/aarch64-unknown-linux-gnu/release/harmony_composer + target/x86_64-pc-windows-gnu/release/harmony_composer.exe + + - name: Setup log into hub.nationtech.io + uses: docker/login-action@v2 + with: + registry: hub.nationtech.io + username: ${{ secrets.HUB_BOT_USERNAME }} + password: ${{ secrets.HUB_BOT_PASSWORD }} + + # TODO: build ARM images too + - name: Build docker container + run: docker build . -t hub.nationtech.io/harmony/harmony_composer + + - name: Push docker container + run: docker push hub.nationtech.io/harmony/harmony_composer diff --git a/Cargo.lock b/Cargo.lock index 15fa2e8..57fce72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -95,16 +95,6 @@ dependencies = [ "libc", ] -[[package]] -name = "annotate-snippets" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "710e8eae58854cdc1790fcb56cca04d712a17be849eeb81da2a724bf4bae2bc4" -dependencies = [ - "anstyle", - "unicode-width 0.2.0", -] - [[package]] name = "anstream" version = "0.6.18" @@ -155,30 +145,12 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "anyhow" -version = "1.0.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" - [[package]] name = "arc-swap" version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" -[[package]] -name = "arrayref" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - [[package]] name = "assert_cmd" version = "2.0.17" @@ -283,15 +255,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bitmaps" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" -dependencies = [ - "typenum", -] - [[package]] name = "bitvec" version = "1.0.1" @@ -304,19 +267,6 @@ dependencies = [ "wyz", ] -[[package]] -name = "blake3" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -397,7 +347,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" dependencies = [ "memchr", - "regex-automata 0.4.9", + "regex-automata", "serde", ] @@ -420,130 +370,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] -name = "cargo" -version = "0.88.0" +name = "camino" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3266d7f10870d970f22fd244b5d4bb017f723247e6743f2283f6fe63a4f6084" +checksum = "0da45bc31171d8d6960122e222a67740df867c1dd53b4d51caa297084c185cab" dependencies = [ - "annotate-snippets", - "anstream", - "anstyle", - "anyhow", - "base64 0.22.1", - "blake3", - "cargo-credential", - "cargo-credential-libsecret", - "cargo-credential-macos-keychain", - "cargo-credential-wincred", - "cargo-platform", - "cargo-util", - "cargo-util-schemas", - "clap", - "clap_complete", - "color-print", - "crates-io", - "curl", - "curl-sys", - "filetime", - "flate2", - "git2", - "git2-curl", - "gix", - "glob", - "hex", - "hmac", - "home", - "http-auth", - "ignore", - "im-rc", - "indexmap 2.9.0", - "itertools 0.14.0", - "jiff", - "jobserver", - "lazycell", - "libc", - "libgit2-sys", - "memchr", - "opener", - "os_info", - "pasetors", - "pathdiff", - "rand 0.9.1", - "regex", - "rusqlite", - "rustc-hash", - "rustc-stable-hash", - "rustfix", - "same-file", - "semver", "serde", - "serde-untagged", - "serde_ignored", - "serde_json", - "sha1", - "shell-escape", - "supports-hyperlinks", - "supports-unicode", - "tar", - "tempfile", - "thiserror 2.0.12", - "time", - "toml", - "toml_edit", - "tracing", - "tracing-chrome", - "tracing-subscriber", - "unicase", - "unicode-width 0.2.0", - "url", - "walkdir", - "windows-sys 0.59.0", -] - -[[package]] -name = "cargo-credential" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1ef5080adde1db190e901884d2c400990856c2a23201c5a181b910a6dbdf2a" -dependencies = [ - "anyhow", - "libc", - "serde", - "serde_json", - "thiserror 1.0.69", - "time", - "windows-sys 0.59.0", -] - -[[package]] -name = "cargo-credential-libsecret" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d4e8e593dd3967cf90d6ae8e0e820abbb9ba168c4015dc04d90abc80477b8b" -dependencies = [ - "anyhow", - "cargo-credential", - "libloading", -] - -[[package]] -name = "cargo-credential-macos-keychain" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4037e5af4bd682580c82143a0a22d9fd2ae6e57ee8b9ea7110dabcf1160828cc" -dependencies = [ - "cargo-credential", - "security-framework 3.2.0", -] - -[[package]] -name = "cargo-credential-wincred" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320491fd2d43703fe8685cc844af75eba650d32f51a26a9f37ec8fd0d426a738" -dependencies = [ - "cargo-credential", - "windows-sys 0.59.0", ] [[package]] @@ -555,45 +387,37 @@ dependencies = [ "serde", ] -[[package]] -name = "cargo-util" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767bc85f367f6483a6072430b56f5c0d6ee7636751a21a800526d0711753d76" -dependencies = [ - "anyhow", - "core-foundation 0.10.0", - "filetime", - "hex", - "ignore", - "jobserver", - "libc", - "miow", - "same-file", - "sha2", - "shell-escape", - "tempfile", - "tracing", - "walkdir", - "windows-sys 0.59.0", -] - [[package]] name = "cargo-util-schemas" -version = "0.8.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea8b01266e95c3cf839fe626e651fa36a9171033caa917a773d7a0ba1d5ce6be" +checksum = "e63d2780ac94487eb9f1fea7b0d56300abc9eb488800854ca217f102f5caccca" dependencies = [ "semver", "serde", "serde-untagged", "serde-value", - "thiserror 2.0.12", + "thiserror 1.0.69", "toml", "unicode-xid", "url", ] +[[package]] +name = "cargo_metadata" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f7835cfc6135093070e95eb2b53e5d9b5c403dc3a6be6040ee026270aa82502" +dependencies = [ + "camino", + "cargo-platform", + "cargo-util-schemas", + "semver", + "serde", + "serde_json", + "thiserror 2.0.12", +] + [[package]] name = "cassowary" version = "0.3.0" @@ -624,8 +448,6 @@ version = "1.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32db95edf998450acc7881c932f94cd9b05c87b4b2599e8bab064753da4acfd1" dependencies = [ - "jobserver", - "libc", "shlex", ] @@ -700,19 +522,6 @@ dependencies = [ "anstyle", "clap_lex", "strsim", - "terminal_size", -] - -[[package]] -name = "clap_complete" -version = "4.5.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aad5b1b4de04fead402672b48897030eec1f3bfe1550776322f59f6d6e6a5677" -dependencies = [ - "clap", - "clap_lex", - "is_executable", - "shlex", ] [[package]] @@ -733,12 +542,6 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" -[[package]] -name = "clru" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbd0f76e066e64fdc5631e3bb46381254deab9ef1158292f27c8c57e3bf3fe59" - [[package]] name = "color-eyre" version = "0.6.4" @@ -754,27 +557,6 @@ dependencies = [ "tracing-error", ] -[[package]] -name = "color-print" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aa954171903797d5623e047d9ab69d91b493657917bdfb8c2c80ecaf9cdb6f4" -dependencies = [ - "color-print-proc-macro", -] - -[[package]] -name = "color-print-proc-macro" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692186b5ebe54007e45a59aea47ece9eb4108e141326c304cdc91699a7118a22" -dependencies = [ - "nom", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "color-spantrace" version = "0.2.2" @@ -833,12 +615,6 @@ dependencies = [ "tiny-keccak", ] -[[package]] -name = "constant_time_eq" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" - [[package]] name = "convert_case" version = "0.8.0" @@ -883,20 +659,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crates-io" -version = "0.40.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c15b946f2bbd53f5be858ed02fcacfeb3646f3ca67b24defc276a01edd10de6" -dependencies = [ - "curl", - "percent-encoding", - "serde", - "serde_json", - "thiserror 2.0.12", - "url", -] - [[package]] name = "crc32fast" version = "1.4.2" @@ -915,25 +677,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "crossbeam-deque" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" version = "0.8.21" @@ -1011,12 +754,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "ct-codecs" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b10589d1a5e400d61f9f38f12f884cfd080ff345de8f17efda36fe0e4a02aa8" - [[package]] name = "ctr" version = "0.9.2" @@ -1026,37 +763,6 @@ dependencies = [ "cipher", ] -[[package]] -name = "curl" -version = "0.4.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e2d5c8f48d9c0c23250e52b55e82a6ab4fdba6650c931f5a0a57a43abda812b" -dependencies = [ - "curl-sys", - "libc", - "openssl-probe", - "openssl-sys", - "schannel", - "socket2", - "windows-sys 0.59.0", -] - -[[package]] -name = "curl-sys" -version = "0.4.82+curl-8.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4d63638b5ec65f1a4ae945287b3fd035be4554bbaf211901159c9a2a74fb5be" -dependencies = [ - "cc", - "libc", - "libnghttp2-sys", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", - "windows-sys 0.59.0", -] - [[package]] name = "current_platform" version = "0.2.0" @@ -1073,7 +779,7 @@ dependencies = [ "cpufeatures", "curve25519-dalek-derive", "digest", - "fiat-crypto 0.2.9", + "fiat-crypto", "rustc_version", "subtle", "zeroize", @@ -1131,17 +837,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" -[[package]] -name = "dbus" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bb21987b9fb1613058ba3843121dd18b163b254d8a6e797e144cbac14d96d1b" -dependencies = [ - "libc", - "libdbus-sys", - "winapi", -] - [[package]] name = "der" version = "0.7.10" @@ -1267,12 +962,6 @@ dependencies = [ "syn", ] -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - [[package]] name = "dyn-clone" version = "1.0.19" @@ -1303,15 +992,6 @@ dependencies = [ "signature", ] -[[package]] -name = "ed25519-compact" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9b3460f44bea8cd47f45a0c70892f1eff856d97cd55358b2f73f663789f6190" -dependencies = [ - "getrandom 0.2.16", -] - [[package]] name = "ed25519-dalek" version = "2.1.1" @@ -1544,27 +1224,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "fallible-iterator" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" - -[[package]] -name = "fallible-streaming-iterator" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" - -[[package]] -name = "faster-hex" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a2b11eda1d40935b26cf18f6833c526845ae8c41e58d09af6adeb6f0269183" -dependencies = [ - "serde", -] - [[package]] name = "fastrand" version = "2.3.0" @@ -1587,24 +1246,6 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" -[[package]] -name = "fiat-crypto" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24" - -[[package]] -name = "filetime" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" -dependencies = [ - "cfg-if", - "libc", - "libredox", - "windows-sys 0.59.0", -] - [[package]] name = "flate2" version = "1.1.1" @@ -1612,7 +1253,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" dependencies = [ "crc32fast", - "libz-sys", "miniz_oxide", ] @@ -1818,11 +1458,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", - "js-sys", "libc", "r-efi", "wasi 0.14.2+wasi-0.2.4", - "wasm-bindgen", ] [[package]] @@ -1841,835 +1479,6 @@ version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" -[[package]] -name = "git2" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2deb07a133b1520dc1a5690e9bd08950108873d7ed5de38dcc74d3b5ebffa110" -dependencies = [ - "bitflags 2.9.1", - "libc", - "libgit2-sys", - "log", - "openssl-probe", - "openssl-sys", - "url", -] - -[[package]] -name = "git2-curl" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8dcabbc09ece4d30a9aa983d5804203b7e2f8054a171f792deff59b56d31fa" -dependencies = [ - "curl", - "git2", - "log", - "url", -] - -[[package]] -name = "gix" -version = "0.70.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736f14636705f3a56ea52b553e67282519418d9a35bb1e90b3a9637a00296b68" -dependencies = [ - "gix-actor", - "gix-attributes", - "gix-command", - "gix-commitgraph", - "gix-config", - "gix-credentials", - "gix-date", - "gix-diff", - "gix-dir", - "gix-discover", - "gix-features", - "gix-filter", - "gix-fs", - "gix-glob", - "gix-hash", - "gix-hashtable", - "gix-ignore", - "gix-index", - "gix-lock", - "gix-negotiate", - "gix-object", - "gix-odb", - "gix-pack", - "gix-path", - "gix-pathspec", - "gix-prompt", - "gix-protocol", - "gix-ref", - "gix-refspec", - "gix-revision", - "gix-revwalk", - "gix-sec", - "gix-shallow", - "gix-submodule", - "gix-tempfile", - "gix-trace", - "gix-transport", - "gix-traverse", - "gix-url", - "gix-utils", - "gix-validate 0.9.4", - "gix-worktree", - "once_cell", - "prodash", - "smallvec", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-actor" -version = "0.33.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20018a1a6332e065f1fcc8305c1c932c6b8c9985edea2284b3c79dc6fa3ee4b2" -dependencies = [ - "bstr", - "gix-date", - "gix-utils", - "itoa", - "thiserror 2.0.12", - "winnow 0.6.26", -] - -[[package]] -name = "gix-attributes" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f151000bf662ef5f641eca6102d942ee31ace80f271a3ef642e99776ce6ddb38" -dependencies = [ - "bstr", - "gix-glob", - "gix-path", - "gix-quote", - "gix-trace", - "kstring", - "smallvec", - "thiserror 2.0.12", - "unicode-bom", -] - -[[package]] -name = "gix-bitmap" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1db9765c69502650da68f0804e3dc2b5f8ccc6a2d104ca6c85bc40700d37540" -dependencies = [ - "thiserror 2.0.12", -] - -[[package]] -name = "gix-chunk" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b1f1d8764958699dc764e3f727cef280ff4d1bd92c107bbf8acd85b30c1bd6f" -dependencies = [ - "thiserror 2.0.12", -] - -[[package]] -name = "gix-command" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb410b84d6575db45e62025a9118bdbf4d4b099ce7575a76161e898d9ca98df1" -dependencies = [ - "bstr", - "gix-path", - "gix-trace", - "shell-words", -] - -[[package]] -name = "gix-commitgraph" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e23a8ec2d8a16026a10dafdb6ed51bcfd08f5d97f20fa52e200bc50cb72e4877" -dependencies = [ - "bstr", - "gix-chunk", - "gix-features", - "gix-hash", - "memmap2", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-config" -version = "0.43.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "377c1efd2014d5d469e0b3cd2952c8097bce9828f634e04d5665383249f1d9e9" -dependencies = [ - "bstr", - "gix-config-value", - "gix-features", - "gix-glob", - "gix-path", - "gix-ref", - "gix-sec", - "memchr", - "once_cell", - "smallvec", - "thiserror 2.0.12", - "unicode-bom", - "winnow 0.6.26", -] - -[[package]] -name = "gix-config-value" -version = "0.14.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dc2c844c4cf141884678cabef736fd91dd73068b9146e6f004ba1a0457944b6" -dependencies = [ - "bitflags 2.9.1", - "bstr", - "gix-path", - "libc", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-credentials" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf950f9ee1690bb9c4388b5152baa8a9f41ad61e5cf1ba0ec8c207b08dab9e45" -dependencies = [ - "bstr", - "gix-command", - "gix-config-value", - "gix-path", - "gix-prompt", - "gix-sec", - "gix-trace", - "gix-url", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-date" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa30058ec7d3511fbc229e4f9e696a35abd07ec5b82e635eff864a2726217e4" -dependencies = [ - "bstr", - "itoa", - "jiff", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-diff" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62afb7f4ca0acdf4e9dad92065b2eb1bf2993bcc5014b57bc796e3a365b17c4d" -dependencies = [ - "bstr", - "gix-hash", - "gix-object", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-dir" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1d78db3927a12f7d1b788047b84efacaab03ef25738bd1c77856ad8966bd57b" -dependencies = [ - "bstr", - "gix-discover", - "gix-fs", - "gix-ignore", - "gix-index", - "gix-object", - "gix-path", - "gix-pathspec", - "gix-trace", - "gix-utils", - "gix-worktree", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-discover" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c2414bdf04064e0f5a5aa029dfda1e663cf9a6c4bfc8759f2d369299bb65d8" -dependencies = [ - "bstr", - "dunce", - "gix-fs", - "gix-hash", - "gix-path", - "gix-ref", - "gix-sec", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-features" -version = "0.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bfdd4838a8d42bd482c9f0cb526411d003ee94cc7c7b08afe5007329c71d554" -dependencies = [ - "bytes", - "crc32fast", - "crossbeam-channel", - "flate2", - "gix-hash", - "gix-trace", - "gix-utils", - "libc", - "once_cell", - "parking_lot", - "prodash", - "sha1_smol", - "thiserror 2.0.12", - "walkdir", -] - -[[package]] -name = "gix-filter" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdcc36cd7dbc63ed0ec3558645886553d1afd3cd09daa5efb9cba9cceb942bbb" -dependencies = [ - "bstr", - "encoding_rs", - "gix-attributes", - "gix-command", - "gix-hash", - "gix-object", - "gix-packetline-blocking", - "gix-path", - "gix-quote", - "gix-trace", - "gix-utils", - "smallvec", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-fs" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "182e7fa7bfdf44ffb7cfe7451b373cdf1e00870ac9a488a49587a110c562063d" -dependencies = [ - "fastrand", - "gix-features", - "gix-utils", -] - -[[package]] -name = "gix-glob" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9c7249fa0a78f9b363aa58323db71e0a6161fd69860ed6f48dedf0ef3a314e" -dependencies = [ - "bitflags 2.9.1", - "bstr", - "gix-features", - "gix-path", -] - -[[package]] -name = "gix-hash" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e81c5ec48649b1821b3ed066a44efb95f1a268b35c1d91295e61252539fbe9f8" -dependencies = [ - "faster-hex", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-hashtable" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "189130bc372accd02e0520dc5ab1cef318dcc2bc829b76ab8d84bbe90ac212d1" -dependencies = [ - "gix-hash", - "hashbrown 0.14.5", - "parking_lot", -] - -[[package]] -name = "gix-ignore" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f529dcb80bf9855c0a7c49f0ac588df6d6952d63a63fefc254b9c869d2cdf6f" -dependencies = [ - "bstr", - "gix-glob", - "gix-path", - "gix-trace", - "unicode-bom", -] - -[[package]] -name = "gix-index" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd12e3626879369310fffe2ac61acc828613ef656b50c4ea984dd59d7dc85d8" -dependencies = [ - "bitflags 2.9.1", - "bstr", - "filetime", - "fnv", - "gix-bitmap", - "gix-features", - "gix-fs", - "gix-hash", - "gix-lock", - "gix-object", - "gix-traverse", - "gix-utils", - "gix-validate 0.9.4", - "hashbrown 0.14.5", - "itoa", - "libc", - "memmap2", - "rustix 0.38.44", - "smallvec", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-lock" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9739815270ff6940968441824d162df9433db19211ca9ba8c3fc1b50b849c642" -dependencies = [ - "gix-tempfile", - "gix-utils", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-negotiate" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a8af1ef7bbe303d30b55312b7f4d33e955de43a3642ae9b7347c623d80ef80" -dependencies = [ - "bitflags 2.9.1", - "gix-commitgraph", - "gix-date", - "gix-hash", - "gix-object", - "gix-revwalk", - "smallvec", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-object" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc4b3a0044244f0fe22347fb7a79cca165e37829d668b41b85ff46a43e5fd68" -dependencies = [ - "bstr", - "gix-actor", - "gix-date", - "gix-features", - "gix-hash", - "gix-hashtable", - "gix-path", - "gix-utils", - "gix-validate 0.9.4", - "itoa", - "smallvec", - "thiserror 2.0.12", - "winnow 0.6.26", -] - -[[package]] -name = "gix-odb" -version = "0.67.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e93457df69cd09573608ce9fa4f443fbd84bc8d15d8d83adecd471058459c1b" -dependencies = [ - "arc-swap", - "gix-date", - "gix-features", - "gix-fs", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-pack", - "gix-path", - "gix-quote", - "parking_lot", - "tempfile", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-pack" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc13a475b3db735617017fb35f816079bf503765312d4b1913b18cf96f3fa515" -dependencies = [ - "clru", - "gix-chunk", - "gix-features", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-path", - "gix-tempfile", - "memmap2", - "parking_lot", - "smallvec", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-packetline" -version = "0.18.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "123844a70cf4d5352441dc06bab0da8aef61be94ec239cb631e0ba01dc6d3a04" -dependencies = [ - "bstr", - "faster-hex", - "gix-trace", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-packetline-blocking" -version = "0.18.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecf3ea2e105c7e45587bac04099824301262a6c43357fad5205da36dbb233b3" -dependencies = [ - "bstr", - "faster-hex", - "gix-trace", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-path" -version = "0.10.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567f65fec4ef10dfab97ae71f26a27fd4d7fe7b8e3f90c8a58551c41ff3fb65b" -dependencies = [ - "bstr", - "gix-trace", - "gix-validate 0.10.0", - "home", - "once_cell", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-pathspec" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6430d3a686c08e9d59019806faa78c17315fe22ae73151a452195857ca02f86c" -dependencies = [ - "bitflags 2.9.1", - "bstr", - "gix-attributes", - "gix-config-value", - "gix-glob", - "gix-path", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-prompt" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79f2185958e1512b989a007509df8d61dca014aa759a22bee80cfa6c594c3b6d" -dependencies = [ - "gix-command", - "gix-config-value", - "parking_lot", - "rustix 0.38.44", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-protocol" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c61bd61afc6b67d213241e2100394c164be421e3f7228d3521b04f48ca5ba90" -dependencies = [ - "bstr", - "gix-credentials", - "gix-date", - "gix-features", - "gix-hash", - "gix-lock", - "gix-negotiate", - "gix-object", - "gix-ref", - "gix-refspec", - "gix-revwalk", - "gix-shallow", - "gix-trace", - "gix-transport", - "gix-utils", - "maybe-async", - "thiserror 2.0.12", - "winnow 0.6.26", -] - -[[package]] -name = "gix-quote" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e49357fccdb0c85c0d3a3292a9f6db32d9b3535959b5471bb9624908f4a066c6" -dependencies = [ - "bstr", - "gix-utils", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-ref" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47adf4c5f933429f8554e95d0d92eee583cfe4b95d2bf665cd6fd4a1531ee20c" -dependencies = [ - "gix-actor", - "gix-features", - "gix-fs", - "gix-hash", - "gix-lock", - "gix-object", - "gix-path", - "gix-tempfile", - "gix-utils", - "gix-validate 0.9.4", - "memmap2", - "thiserror 2.0.12", - "winnow 0.6.26", -] - -[[package]] -name = "gix-refspec" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59650228d8f612f68e7f7a25f517fcf386c5d0d39826085492e94766858b0a90" -dependencies = [ - "bstr", - "gix-hash", - "gix-revision", - "gix-validate 0.9.4", - "smallvec", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-revision" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fe28bbccca55da6d66e6c6efc6bb4003c29d407afd8178380293729733e6b53" -dependencies = [ - "bstr", - "gix-commitgraph", - "gix-date", - "gix-hash", - "gix-object", - "gix-revwalk", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-revwalk" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4ecb80c235b1e9ef2b99b23a81ea50dd569a88a9eb767179793269e0e616247" -dependencies = [ - "gix-commitgraph", - "gix-date", - "gix-hash", - "gix-hashtable", - "gix-object", - "smallvec", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-sec" -version = "0.10.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47aeb0f13de9ef2f3033f5ff218de30f44db827ac9f1286f9ef050aacddd5888" -dependencies = [ - "bitflags 2.9.1", - "gix-path", - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "gix-shallow" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab72543011e303e52733c85bef784603ef39632ddf47f69723def52825e35066" -dependencies = [ - "bstr", - "gix-hash", - "gix-lock", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-submodule" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74972fe8d46ac8a09490ae1e843b4caf221c5b157c5ac17057e8e1c38417a3ac" -dependencies = [ - "bstr", - "gix-config", - "gix-path", - "gix-pathspec", - "gix-refspec", - "gix-url", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-tempfile" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2558f423945ef24a8328c55d1fd6db06b8376b0e7013b1bb476cc4ffdf678501" -dependencies = [ - "gix-fs", - "libc", - "once_cell", - "parking_lot", - "tempfile", -] - -[[package]] -name = "gix-trace" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c396a2036920c69695f760a65e7f2677267ccf483f25046977d87e4cb2665f7" - -[[package]] -name = "gix-transport" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11187418489477b1b5b862ae1aedbbac77e582f2c4b0ef54280f20cfe5b964d9" -dependencies = [ - "base64 0.22.1", - "bstr", - "curl", - "gix-command", - "gix-credentials", - "gix-features", - "gix-packetline", - "gix-quote", - "gix-sec", - "gix-url", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-traverse" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bec70e53896586ef32a3efa7e4427b67308531ed186bb6120fb3eca0f0d61b4" -dependencies = [ - "bitflags 2.9.1", - "gix-commitgraph", - "gix-date", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-revwalk", - "smallvec", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-url" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29218c768b53dd8f116045d87fec05b294c731a4b2bdd257eeca2084cc150b13" -dependencies = [ - "bstr", - "gix-features", - "gix-path", - "percent-encoding", - "thiserror 2.0.12", - "url", -] - -[[package]] -name = "gix-utils" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff08f24e03ac8916c478c8419d7d3c33393da9bb41fa4c24455d5406aeefd35f" -dependencies = [ - "bstr", - "fastrand", - "unicode-normalization", -] - -[[package]] -name = "gix-validate" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34b5f1253109da6c79ed7cf6e1e38437080bb6d704c76af14c93e2f255234084" -dependencies = [ - "bstr", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-validate" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77b9e00cacde5b51388d28ed746c493b18a6add1f19b5e01d686b3b9ece66d4d" -dependencies = [ - "bstr", - "thiserror 2.0.12", -] - -[[package]] -name = "gix-worktree" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6673512f7eaa57a6876adceca6978a501d6c6569a4f177767dc405f8b9778958" -dependencies = [ - "bstr", - "gix-attributes", - "gix-features", - "gix-fs", - "gix-glob", - "gix-hash", - "gix-ignore", - "gix-index", - "gix-object", - "gix-path", - "gix-validate 0.9.4", -] - -[[package]] -name = "glob" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" - -[[package]] -name = "globset" -version = "0.4.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5" -dependencies = [ - "aho-corasick", - "bstr", - "log", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", -] - [[package]] name = "group" version = "0.13.0" @@ -2782,14 +1591,12 @@ dependencies = [ name = "harmony_composer" version = "0.1.0" dependencies = [ - "assert_cmd", "bollard", - "cargo", + "cargo_metadata", "clap", "current_platform", "env_logger", "futures-util", - "inquire", "log", "serde_json", "tokio", @@ -2838,16 +1645,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", -] - [[package]] name = "hashbrown" version = "0.15.3" @@ -2859,15 +1656,6 @@ dependencies = [ "foldhash", ] -[[package]] -name = "hashlink" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" -dependencies = [ - "hashbrown 0.15.3", -] - [[package]] name = "headers" version = "0.4.0" @@ -2978,15 +1766,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-auth" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "150fa4a9462ef926824cf4519c84ed652ca8f4fbae34cb8af045b5cbcaf98822" -dependencies = [ - "memchr", -] - [[package]] name = "http-body" version = "0.4.6" @@ -3370,36 +2149,6 @@ dependencies = [ "icu_properties", ] -[[package]] -name = "ignore" -version = "0.4.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" -dependencies = [ - "crossbeam-deque", - "globset", - "log", - "memchr", - "regex-automata 0.4.9", - "same-file", - "walkdir", - "winapi-util", -] - -[[package]] -name = "im-rc" -version = "15.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1955a75fa080c677d3972822ec4bad316169ab1cfc6c257a942c2265dbe5fe" -dependencies = [ - "bitmaps", - "rand_core 0.6.4", - "rand_xoshiro", - "sized-chunks", - "typenum", - "version_check", -] - [[package]] name = "indenter" version = "0.3.3" @@ -3490,15 +2239,6 @@ dependencies = [ "serde", ] -[[package]] -name = "is_executable" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a1b5bad6f9072935961dfbf1cced2f3d129963d091b6f69f007fe04e758ae2" -dependencies = [ - "winapi", -] - [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -3514,15 +2254,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.15" @@ -3536,12 +2267,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f02000660d30638906021176af16b17498bd0d12813dbfe7b276d8bc7f3c0806" dependencies = [ "jiff-static", - "jiff-tzdb-platform", "log", "portable-atomic", "portable-atomic-util", "serde", - "windows-sys 0.59.0", ] [[package]] @@ -3555,31 +2284,6 @@ dependencies = [ "syn", ] -[[package]] -name = "jiff-tzdb" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1283705eb0a21404d2bfd6eef2a7593d240bc42a0bdb39db0ad6fa2ec026524" - -[[package]] -name = "jiff-tzdb-platform" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" -dependencies = [ - "jiff-tzdb", -] - -[[package]] -name = "jobserver" -version = "0.1.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" -dependencies = [ - "getrandom 0.3.3", - "libc", -] - [[package]] name = "js-sys" version = "0.3.77" @@ -3650,15 +2354,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "kstring" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558bf9508a558512042d3095138b1f7b8fe90c5467d94f9f1da28b3731c5dbd1" -dependencies = [ - "static_assertions", -] - [[package]] name = "kube" version = "0.98.0" @@ -3733,68 +2428,18 @@ dependencies = [ "spin", ] -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" -[[package]] -name = "libdbus-sys" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06085512b750d640299b79be4bad3d2fa90a9c00b1fd9e1b46364f66f0485c72" -dependencies = [ - "cc", - "pkg-config", -] - -[[package]] -name = "libgit2-sys" -version = "0.18.1+1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1dcb20f84ffcdd825c7a311ae347cce604a6f084a767dec4a4929829645290e" -dependencies = [ - "cc", - "libc", - "libssh2-sys", - "libz-sys", - "openssl-sys", - "pkg-config", -] - -[[package]] -name = "libloading" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" -dependencies = [ - "cfg-if", - "windows-targets 0.53.0", -] - [[package]] name = "libm" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" -[[package]] -name = "libnghttp2-sys" -version = "0.1.11+1.64.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6c24e48a7167cffa7119da39d577fa482e66c688a4aac016bee862e1a713c4" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "libredfish" version = "0.1.1" @@ -3816,44 +2461,6 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.9.1", "libc", - "redox_syscall", -] - -[[package]] -name = "libsqlite3-sys" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8935b44e7c13394a179a438e0cebba0fe08fe01b54f152e29a93b5cf993fd4" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "libssh2-sys" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "220e4f05ad4a218192533b300327f5150e809b54c4ec83b5a1d91833601811b9" -dependencies = [ - "cc", - "libc", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "libz-sys" -version = "1.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b70e7a7df205e92a1a4cd9aaae7898dac0aa555503cc0a649494d0d60e7651d" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", ] [[package]] @@ -3908,26 +2515,6 @@ dependencies = [ "hashbrown 0.15.3", ] -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "maybe-async" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "md5" version = "0.7.0" @@ -3940,27 +2527,12 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "memmap2" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" -dependencies = [ - "libc", -] - [[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.8.8" @@ -3994,15 +2566,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "miow" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "359f76430b20a79f9e20e115b3428614e654f04fab314482fc0fda0ebd3c6044" -dependencies = [ - "windows-sys 0.48.0", -] - [[package]] name = "native-tls" version = "0.2.14" @@ -4029,16 +2592,6 @@ dependencies = [ "unicode-segmentation", ] -[[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 = "non-blank-string-rs" version = "1.0.4" @@ -4048,25 +2601,6 @@ dependencies = [ "serde", ] -[[package]] -name = "normpath" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8911957c4b1549ac0dc74e30db9c8b0e66ddcd6d7acc33098f4c63a64a6d7ed" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - [[package]] name = "num-bigint" version = "0.4.6" @@ -4202,18 +2736,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" -[[package]] -name = "opener" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0812e5e4df08da354c851a3376fead46db31c2214f849d3de356d774d057681" -dependencies = [ - "bstr", - "dbus", - "normpath", - "windows-sys 0.59.0", -] - [[package]] name = "openssl" version = "0.10.72" @@ -4312,34 +2834,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "orion" -version = "0.17.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b3da83b2b4cdc74ab6a556b2e7b473da046d5aa4008c0a7a3ae96b1b4aabb4" -dependencies = [ - "fiat-crypto 0.3.0", - "subtle", - "zeroize", -] - -[[package]] -name = "os_info" -version = "3.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0e1ac5fde8d43c34139135df8ea9ee9465394b2d8d20f032d38998f64afffc3" -dependencies = [ - "log", - "plist", - "windows-sys 0.52.0", -] - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "owo-colors" version = "4.2.0" @@ -4407,28 +2901,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "pasetors" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1c6d47c07a08cb59ddad44d53cb5729855e35f7d993184cec3aa37ccdb7008" -dependencies = [ - "ct-codecs", - "ed25519-compact", - "getrandom 0.3.3", - "orion", - "p384", - "rand_core 0.6.4", - "regex", - "serde", - "serde_derive", - "serde_json", - "sha2", - "subtle", - "time", - "zeroize", -] - [[package]] name = "password-hash" version = "0.4.2" @@ -4446,12 +2918,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pathdiff" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" - [[package]] name = "pbkdf2" version = "0.11.0" @@ -4620,19 +3086,6 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" -[[package]] -name = "plist" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac26e981c03a6e53e0aee43c113e3202f5581d5360dae7bd2c70e800dd0451d" -dependencies = [ - "base64 0.22.1", - "indexmap 2.9.0", - "quick-xml", - "serde", - "time", -] - [[package]] name = "poly1305" version = "0.8.0" @@ -4750,31 +3203,12 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prodash" -version = "29.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04bb108f648884c23b98a0e940ebc2c93c0c3b89f04dbaf7eb8256ce617d1bc" -dependencies = [ - "log", - "parking_lot", -] - [[package]] name = "punycode" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9e1dcb320d6839f6edb64f7a4a59d39b30480d4d1765b56873f7c858538a5fe" -[[package]] -name = "quick-xml" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2" -dependencies = [ - "memchr", -] - [[package]] name = "quote" version = "1.0.40" @@ -4855,15 +3289,6 @@ dependencies = [ "getrandom 0.3.3", ] -[[package]] -name = "rand_xoshiro" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" -dependencies = [ - "rand_core 0.6.4", -] - [[package]] name = "ratatui" version = "0.29.0" @@ -4876,7 +3301,7 @@ dependencies = [ "crossterm 0.28.1", "indoc", "instability", - "itertools 0.13.0", + "itertools", "lru", "paste", "strum", @@ -4913,17 +3338,8 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", + "regex-automata", + "regex-syntax", ] [[package]] @@ -4934,15 +3350,9 @@ checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax", ] -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - [[package]] name = "regex-syntax" version = "0.8.5" @@ -5080,20 +3490,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "rusqlite" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c6d5e5acb6f6129fe3f7ba0a7fc77bca1942cb568535e18e7bc40262baf3110" -dependencies = [ - "bitflags 2.9.1", - "fallible-iterator", - "fallible-streaming-iterator", - "hashlink", - "libsqlite3-sys", - "smallvec", -] - [[package]] name = "russh" version = "0.45.0" @@ -5236,18 +3632,6 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" -[[package]] -name = "rustc-hash" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" - -[[package]] -name = "rustc-stable-hash" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "781442f29170c5c93b7185ad559492601acdc71d5bb0706f5868094f45cfcd08" - [[package]] name = "rustc_version" version = "0.4.1" @@ -5257,18 +3641,6 @@ dependencies = [ "semver", ] -[[package]] -name = "rustfix" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f66156d7471ff4f12253cd7fd76dfe637a595a9418168154e8570f3947fe9a8" -dependencies = [ - "serde", - "serde_json", - "thiserror 1.0.69", - "tracing", -] - [[package]] name = "rustix" version = "0.38.44" @@ -5394,15 +3766,6 @@ dependencies = [ "cipher", ] -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - [[package]] name = "schannel" version = "0.1.27" @@ -5544,15 +3907,6 @@ dependencies = [ "syn", ] -[[package]] -name = "serde_ignored" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b516445dac1e3535b6d658a7b528d771153dfb272ed4180ca4617a20550365ff" -dependencies = [ - "serde", -] - [[package]] name = "serde_json" version = "1.0.140" @@ -5660,12 +4014,6 @@ dependencies = [ "digest", ] -[[package]] -name = "sha1_smol" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" - [[package]] name = "sha2" version = "0.10.9" @@ -5686,18 +4034,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shell-escape" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f" - -[[package]] -name = "shell-words" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" - [[package]] name = "shlex" version = "1.3.0" @@ -5757,16 +4093,6 @@ dependencies = [ "time", ] -[[package]] -name = "sized-chunks" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" -dependencies = [ - "bitmaps", - "typenum", -] - [[package]] name = "slab" version = "0.4.9" @@ -5926,18 +4252,6 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" -[[package]] -name = "supports-hyperlinks" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804f44ed3c63152de6a9f90acbea1a110441de43006ea51bcce8f436196a288b" - -[[package]] -name = "supports-unicode" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7401a30af6cb5818bb64852270bb722533397edcfc7344954a38f420819ece2" - [[package]] name = "syn" version = "2.0.101" @@ -6023,16 +4337,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" -[[package]] -name = "tar" -version = "0.4.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" -dependencies = [ - "filetime", - "libc", -] - [[package]] name = "temp-dir" version = "0.1.16" @@ -6058,16 +4362,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "terminal_size" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed" -dependencies = [ - "rustix 1.0.7", - "windows-sys 0.59.0", -] - [[package]] name = "termtree" version = "0.5.1" @@ -6174,21 +4468,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "tinyvec" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" -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.45.0" @@ -6293,7 +4572,7 @@ dependencies = [ "serde_spanned", "toml_datetime", "toml_write", - "winnow 0.7.11", + "winnow", ] [[package]] @@ -6375,17 +4654,6 @@ dependencies = [ "syn", ] -[[package]] -name = "tracing-chrome" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf0a738ed5d6450a9fb96e86a23ad808de2b727fd1394585da5cdd6788ffe724" -dependencies = [ - "serde_json", - "tracing-core", - "tracing-subscriber", -] - [[package]] name = "tracing-core" version = "0.1.33" @@ -6406,33 +4674,15 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - [[package]] name = "tracing-subscriber" version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", "sharded-slab", - "smallvec", "thread_local", - "tracing", "tracing-core", - "tracing-log", ] [[package]] @@ -6474,33 +4724,12 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" -[[package]] -name = "unicase" -version = "2.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" - -[[package]] -name = "unicode-bom" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217" - [[package]] name = "unicode-ident" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" version = "1.12.0" @@ -6513,7 +4742,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" dependencies = [ - "itertools 0.13.0", + "itertools", "unicode-segmentation", "unicode-width 0.1.14", ] @@ -6631,16 +4860,6 @@ dependencies = [ "libc", ] -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - [[package]] name = "want" version = "0.3.1" @@ -6786,15 +5005,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys 0.59.0", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -7092,15 +5302,6 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" -[[package]] -name = "winnow" -version = "0.6.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e90edd2ac1aa278a5c4599b1d89cf03074b610800f866d4026dc199d7929a28" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" version = "0.7.11" diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a938407 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM docker.io/rust:1.87.0 AS build + +WORKDIR /app + +COPY . . + +RUN cargo build --release --bin harmony_composer + +FROM docker.io/rust:1.87.0 + +WORKDIR /app + +COPY --from=build /app/target/release/harmony_composer . + +ENTRYPOINT ["/app/harmony_composer"] \ No newline at end of file diff --git a/harmony_composer/Cargo.toml b/harmony_composer/Cargo.toml index c2dd2ce..6d8c5be 100644 --- a/harmony_composer/Cargo.toml +++ b/harmony_composer/Cargo.toml @@ -6,14 +6,12 @@ readme.workspace = true license.workspace = true [dependencies] -assert_cmd = "2.0.17" clap = { version = "4.5.35", features = ["derive"] } -inquire.workspace = true tokio.workspace = true env_logger.workspace = true log.workspace = true -cargo = "0.88.0" bollard = "0.19.0" current_platform = "0.2.0" futures-util = "0.3.31" serde_json = "1.0.140" +cargo_metadata = "0.20.0" diff --git a/harmony_composer/src/main.rs b/harmony_composer/src/main.rs index 3a4418f..3881d76 100644 --- a/harmony_composer/src/main.rs +++ b/harmony_composer/src/main.rs @@ -4,13 +4,14 @@ use bollard::query_parameters::{ RemoveContainerOptions, StartContainerOptions, WaitContainerOptions, }; use bollard::secret::HostConfig; +use cargo_metadata::{Message, MetadataCommand}; use clap::{Args, Parser, Subcommand}; use futures_util::{StreamExt, TryStreamExt}; use log::info; use std::collections::HashMap; use std::fmt::format; use std::path::{Path, PathBuf}; -use std::process::Command; +use std::process::{Command, Stdio}; use tokio::fs; #[derive(Parser)] @@ -32,6 +33,7 @@ struct GlobalArgs { #[derive(Subcommand, Clone, Debug)] enum Commands { Check(CheckArgs), + Compile, Deploy(DeployArgs), All(AllArgs), } @@ -97,9 +99,7 @@ async fn main() { false => todo!("implement couldn't find path logic"), }; - let check_output = Command::new("sh") - .arg("-c") - .arg(check_script) + let check_output = Command::new(check_script) .output() .expect("failed to run check script"); info!( @@ -129,6 +129,7 @@ async fn main() { Commands::All(_args) => todo!( "take all previous match arms and turn them into separate functions, and call them all one after the other" ), + Commands::Compile => return, }, None => todo!("run interactively, ask for info on CLI"), } @@ -150,14 +151,17 @@ async fn compile_harmony( None => current_platform::CURRENT_PLATFORM.to_string(), }; - let gctx = cargo::util::context::GlobalContext::default().unwrap(); - let cargo_exists = gctx.cargo_exe().unwrap().exists(); + let cargo_exists = Command::new("which") + .arg("cargo") + .status() + .expect("couldn't get `which cargo` status") + .success(); let method = match method { Some(m) => m, None => { if cargo_exists { - return compile_cargo(gctx, harmony_location).await; + return compile_cargo(platform, harmony_location).await; } else { return compile_docker(platform, harmony_location).await; } @@ -165,39 +169,64 @@ async fn compile_harmony( }; match method { - CompileMethod::LocalCargo => return compile_cargo(gctx, harmony_location).await, + CompileMethod::LocalCargo => return compile_cargo(platform, harmony_location).await, CompileMethod::Docker => return compile_docker(platform, harmony_location).await, }; } -async fn compile_cargo( - gctx: cargo::util::context::GlobalContext, - harmony_location: String, -) -> PathBuf { - let cargo_build = cargo::ops::compile( - &cargo::core::Workspace::new( - &Path::new(&format!("{}/Cargo.toml", harmony_location)) - .canonicalize() - .expect("Couldn't find Cargo.toml in harmony dir"), - &gctx, - ) - .unwrap(), - &cargo::ops::CompileOptions::new(&gctx, cargo::core::compiler::CompileMode::Build).unwrap(), - ) - .expect("build didn't go successfully"); +async fn compile_cargo(platform: String, harmony_location: String) -> PathBuf { + let metadata = MetadataCommand::new() + .manifest_path(format!("{}/Cargo.toml", harmony_location)) + .exec() + .unwrap(); - let bin = cargo_build.binaries.first().expect("no binaries built"); + let mut cargo_build = Command::new("cargo") + .current_dir(&harmony_location) + .args(vec![ + "build", + format!("--target={}", platform).as_str(), + "--release", + "--message-format=json-render-diagnostics", + ]) + .stdout(Stdio::piped()) + .spawn() + .expect("run cargo command failed"); + + let mut bin = cargo_metadata::camino::Utf8PathBuf::new(); + let reader = std::io::BufReader::new(cargo_build.stdout.take().unwrap()); + for message in cargo_metadata::Message::parse_stream(reader) { + match message.unwrap() { + Message::CompilerMessage(_msg) => (), + Message::CompilerArtifact(artifact) => { + // println!("{:?}", artifact); + if artifact.package_id.eq(&metadata + .root_package() + .expect("failed to get root package") + .id) + { + bin = artifact + .filenames + .first() + .expect("couldn't get artifact filename") + .clone() + } + } + Message::BuildScriptExecuted(_script) => (), + Message::BuildFinished(finished) => { + println!("{:?}", finished); + } + _ => (), // Unknown message + } + } + + // let bin = cargo_build.binaries.first().expect("no binaries built"); let bin_out; - if let Some(ext) = bin.path.extension() { - bin_out = PathBuf::from(format!( - "{}/harmony.{}", - harmony_location, - ext.to_str().expect("couldn't convert OsStr to str") - )); - let _copy_res = fs::copy(bin.path.clone(), bin_out.clone()).await; + if let Some(ext) = bin.extension() { + bin_out = PathBuf::from(format!("{}/harmony.{}", harmony_location, ext)); + let _copy_res = fs::copy(&bin, &bin_out).await; } else { bin_out = PathBuf::from(format!("{}/harmony", harmony_location)); - let _copy_res = fs::copy(bin.path.clone(), bin_out.clone()).await; + let _copy_res = fs::copy(&bin, &bin_out).await; } return bin_out; } @@ -232,14 +261,12 @@ async fn compile_docker(platform: String, harmony_location: String) -> PathBuf { ); let config = ContainerCreateBody { - image: Some("docker.io/rust:1.87.0".to_string()), + image: Some("hub.nationtech.io/harmony/harmony_composer".to_string()), working_dir: Some("/mnt".to_string()), - entrypoint: Some(vec![ - "cargo".to_string(), - "build".to_string(), - format!("--target={}", platform), - "--release".to_string(), - "--message-format=json".to_string(), + cmd: Some(vec![ + format!("--compile-platform={}", platform), + format!("--harmony-path=/mnt"), + "compile".to_string(), ]), host_config: Some(HostConfig { binds: Some(vec![format!("{}:/mnt", harmony_location)]), @@ -276,49 +303,18 @@ async fn compile_docker(platform: String, harmony_location: String) -> PathBuf { }), ); - let mut bin_out = PathBuf::from(format!("{}/harmony", harmony_location)); - while let Some(l) = logs_stream.next().await { let l_str = l.expect("couldn't unwrap logoutput").to_string(); println!("{}", l_str); - - let l_json: Option = - serde_json::from_str(l_str.as_str()).unwrap_or(None); - - match l_json { - Some(j) => match j.get("manifest_path") { - Some(p) => { - if p == "/mnt/Cargo.toml" { - let bin = PathBuf::from(format!( - "{}/{}", - harmony_location, - j.get("executable") - .expect("couldn't get json executable") - .as_str() - .expect("couldn't get json executable as str") - .replacen("/mnt/", "", 1) - )); - if let Some(ext) = bin.extension() { - bin_out = PathBuf::from(format!( - "{}/harmony.{}", - harmony_location, - ext.to_str().expect("couldn't convert OsStr to str") - )); - let _copy_res = fs::copy(bin.clone(), bin_out.clone()).await; - } else { - bin_out = PathBuf::from(format!("{}/harmony", harmony_location)); - let _copy_res = fs::copy(bin.clone(), bin_out.clone()).await; - } - } - } - None => (), - }, - None => (), - }; } // wait until container is no longer running while let Some(_) = wait.next().await {} - return bin_out; + // hack that should be cleaned up + if platform.contains("windows") { + return PathBuf::from(format!("{}/harmony.exe", harmony_location)); + } else { + return PathBuf::from(format!("{}/harmony", harmony_location)); + } } -- 2.39.5 From d1423c90c17bf2bf39d5bae4bb039ee2a620a740 Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Mon, 16 Jun 2025 10:15:50 -0400 Subject: [PATCH 10/52] couple of fixes --- harmony_composer/src/main.rs | 40 +++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/harmony_composer/src/main.rs b/harmony_composer/src/main.rs index 3881d76..ef2e9c6 100644 --- a/harmony_composer/src/main.rs +++ b/harmony_composer/src/main.rs @@ -4,12 +4,11 @@ use bollard::query_parameters::{ RemoveContainerOptions, StartContainerOptions, WaitContainerOptions, }; use bollard::secret::HostConfig; -use cargo_metadata::{Message, MetadataCommand}; +use cargo_metadata::{Artifact, Message, MetadataCommand}; use clap::{Args, Parser, Subcommand}; -use futures_util::{StreamExt, TryStreamExt}; +use futures_util::StreamExt; use log::info; use std::collections::HashMap; -use std::fmt::format; use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; use tokio::fs; @@ -77,8 +76,12 @@ async fn main() { let harmony_bin_path: PathBuf; match harmony_path { true => { - harmony_bin_path = - compile_harmony(cli_args.compile_method, None, cli_args.harmony_path.clone()).await + harmony_bin_path = compile_harmony( + cli_args.compile_method, + cli_args.compile_platform, + cli_args.harmony_path.clone(), + ) + .await } false => todo!("implement autodetect code"), } @@ -192,23 +195,20 @@ async fn compile_cargo(platform: String, harmony_location: String) -> PathBuf { .spawn() .expect("run cargo command failed"); - let mut bin = cargo_metadata::camino::Utf8PathBuf::new(); + let mut artifacts: Vec = vec![]; let reader = std::io::BufReader::new(cargo_build.stdout.take().unwrap()); for message in cargo_metadata::Message::parse_stream(reader) { match message.unwrap() { Message::CompilerMessage(_msg) => (), Message::CompilerArtifact(artifact) => { - // println!("{:?}", artifact); - if artifact.package_id.eq(&metadata - .root_package() - .expect("failed to get root package") - .id) + if artifact.manifest_path + == metadata + .root_package() + .expect("failed to get root package") + .manifest_path { - bin = artifact - .filenames - .first() - .expect("couldn't get artifact filename") - .clone() + println!("{:?}", artifact); + artifacts.push(artifact); } } Message::BuildScriptExecuted(_script) => (), @@ -219,7 +219,13 @@ async fn compile_cargo(platform: String, harmony_location: String) -> PathBuf { } } - // let bin = cargo_build.binaries.first().expect("no binaries built"); + let bin = artifacts + .last() + .expect("no binaries built") + .filenames + .first() + .expect("couldn't get filename"); + let bin_out; if let Some(ext) = bin.extension() { bin_out = PathBuf::from(format!("{}/harmony.{}", harmony_location, ext)); -- 2.39.5 From 700fce648606741fe2eaa1577bbed6e4a952c408 Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Mon, 16 Jun 2025 10:36:22 -0400 Subject: [PATCH 11/52] Add targets to docker image, test pipeline temporarily on PR --- .gitea/workflows/harmony_composer.yaml | 1 + Dockerfile | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index ae85e24..de9668c 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -1,5 +1,6 @@ name: Compile and package harmony_composer on: + pull_request: push: branches: - main diff --git a/Dockerfile b/Dockerfile index a938407..3228365 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,16 @@ FROM docker.io/rust:1.87.0 WORKDIR /app +RUN apt update + +RUN rustup target add x86_64-unknown-linux-gnu + +RUN apt install -y mingw-w64 +RUN rustup target add x86_64-pc-windows-gnu + +RUN apt install -y gcc-aarch64-linux-gnu +RUN rustup target add aarch64-unknown-linux-gnu + COPY --from=build /app/target/release/harmony_composer . ENTRYPOINT ["/app/harmony_composer"] \ No newline at end of file -- 2.39.5 From 5e88ef56df3c6aed7f8a47ceadd5a7afd042e12f Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Mon, 16 Jun 2025 10:41:29 -0400 Subject: [PATCH 12/52] rename job --- .gitea/workflows/harmony_composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index de9668c..ae02e6f 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -6,7 +6,7 @@ on: - main jobs: - check: + package_harmony_composer: runs-on: rust-cargo steps: - name: Checkout code -- 2.39.5 From 9eb1c748930b904b4bf002d16a09d42a8bcc4f56 Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Mon, 16 Jun 2025 10:42:27 -0400 Subject: [PATCH 13/52] Comment out ARM64 linux --- .gitea/workflows/harmony_composer.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index ae02e6f..870791c 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -15,8 +15,8 @@ jobs: - name: Build for Linux x86_64 run: cargo build --release --bin harmony_composer --target x86_64-unknown-linux-gnu - - name: Build for Linux ARM64 - run: cargo build --release --bin harmony_composer --target aarch64-unknown-linux-gnu + # - name: Build for Linux ARM64 + # run: cargo build --release --bin harmony_composer --target aarch64-unknown-linux-gnu - name: Build for Windows x86_64 GNU run: cargo build --release --bin harmony_composer --target x86_64-pc-windows-gnu -- 2.39.5 From 93fe97e7446cca8f6fd63213dd486cf27be18c19 Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Mon, 16 Jun 2025 10:43:30 -0400 Subject: [PATCH 14/52] remove artifact too --- .gitea/workflows/harmony_composer.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index 870791c..56b3117 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -29,7 +29,6 @@ jobs: name: binaries path: | target/x86_64-unknown-linux-gnu/release/harmony_composer - target/aarch64-unknown-linux-gnu/release/harmony_composer target/x86_64-pc-windows-gnu/release/harmony_composer.exe - name: Setup log into hub.nationtech.io -- 2.39.5 From 6616ea29af03cc5b69c99f4100844d494e245ae2 Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Mon, 16 Jun 2025 11:16:54 -0400 Subject: [PATCH 15/52] Remove ARM from supported targets --- .dockerignore | 3 ++- Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.dockerignore b/.dockerignore index 9f97022..2233067 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,2 @@ -target/ \ No newline at end of file +target/ +Dockerfile \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 3228365..b3811af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,8 +17,8 @@ RUN rustup target add x86_64-unknown-linux-gnu RUN apt install -y mingw-w64 RUN rustup target add x86_64-pc-windows-gnu -RUN apt install -y gcc-aarch64-linux-gnu -RUN rustup target add aarch64-unknown-linux-gnu +# RUN apt install -y gcc-aarch64-linux-gnu +# RUN rustup target add aarch64-unknown-linux-gnu COPY --from=build /app/target/release/harmony_composer . -- 2.39.5 From 8d06cc1407653efd351867b4f1cccff7085fb782 Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Mon, 16 Jun 2025 11:20:12 -0400 Subject: [PATCH 16/52] Try running in container --- .gitea/workflows/harmony_composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index 56b3117..43c412d 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -7,7 +7,7 @@ on: jobs: package_harmony_composer: - runs-on: rust-cargo + runs-on: hub.nationtech.io/harmony/harmony_composer steps: - name: Checkout code uses: actions/checkout@v4 -- 2.39.5 From c9894b78daf0dce758428a2ddaf9f246e7b3fbd1 Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Mon, 16 Jun 2025 11:38:34 -0400 Subject: [PATCH 17/52] try runs-on docker --- .gitea/workflows/harmony_composer.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index 43c412d..c9b4b0a 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -7,7 +7,9 @@ on: jobs: package_harmony_composer: - runs-on: hub.nationtech.io/harmony/harmony_composer + container: + image: hub.nationtech.io/harmony/harmony_composer:latest + runs-on: docker steps: - name: Checkout code uses: actions/checkout@v4 -- 2.39.5 From e1d63924f8976f291b136d2907e32150257ce871 Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Mon, 16 Jun 2025 12:05:09 -0400 Subject: [PATCH 18/52] Add nodejs for CI --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index b3811af..7a9b6cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,9 @@ WORKDIR /app RUN apt update +# For checkout action +RUN apt install -y nodejs + RUN rustup target add x86_64-unknown-linux-gnu RUN apt install -y mingw-w64 -- 2.39.5 From cc7a00b3ff1688b696116e56d15f0ff398a30282 Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Mon, 16 Jun 2025 12:23:38 -0400 Subject: [PATCH 19/52] change tag --- .gitea/workflows/harmony_composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index c9b4b0a..b0269a6 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -8,7 +8,7 @@ on: jobs: package_harmony_composer: container: - image: hub.nationtech.io/harmony/harmony_composer:latest + image: hub.nationtech.io/harmony/harmony_composer:ci runs-on: docker steps: - name: Checkout code -- 2.39.5 From a4b9c8ac86f5eab8250ead665a899719051ed4f5 Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Mon, 16 Jun 2025 16:29:55 -0400 Subject: [PATCH 20/52] try using v3 instead of v4 for upload artifact --- .gitea/workflows/harmony_composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index b0269a6..b84f7e0 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -26,7 +26,7 @@ jobs: # - name: Build for MacOS ARM64 # run: cargo build --release --bin harmony_composer --target aarch64-apple-darwin - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v3 with: name: binaries path: | -- 2.39.5 From 6822d22bd40c5aeb67d1e4d6191e2f94fdb874e6 Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Mon, 16 Jun 2025 16:39:27 -0400 Subject: [PATCH 21/52] docker/login-action@v2 -> docker/login-action@v3 --- .gitea/workflows/harmony_composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index b84f7e0..fe764a5 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -34,7 +34,7 @@ jobs: target/x86_64-pc-windows-gnu/release/harmony_composer.exe - name: Setup log into hub.nationtech.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: hub.nationtech.io username: ${{ secrets.HUB_BOT_USERNAME }} -- 2.39.5 From b49cad1f586d78479875d02fc38da76aa1d9fb42 Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Mon, 16 Jun 2025 16:57:22 -0400 Subject: [PATCH 22/52] fix username secret --- .gitea/workflows/harmony_composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index fe764a5..af831b6 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -37,7 +37,7 @@ jobs: uses: docker/login-action@v3 with: registry: hub.nationtech.io - username: ${{ secrets.HUB_BOT_USERNAME }} + username: ${{ secrets.HUB_BOT_USER }} password: ${{ secrets.HUB_BOT_PASSWORD }} # TODO: build ARM images too -- 2.39.5 From 4a4614b3a96ee48e29a7c5beb8b55ff71fa168d3 Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Mon, 16 Jun 2025 17:13:51 -0400 Subject: [PATCH 23/52] add docker into container, to be able to docker login --- .gitea/workflows/harmony_composer.yaml | 3 ++- Dockerfile | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index af831b6..4622558 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -8,7 +8,8 @@ on: jobs: package_harmony_composer: container: - image: hub.nationtech.io/harmony/harmony_composer:ci + image: hub.nationtech.io/harmony/harmony_composer:latest + force_pull: true runs-on: docker steps: - name: Checkout code diff --git a/Dockerfile b/Dockerfile index 7a9b6cd..5197e7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,8 @@ RUN apt update # For checkout action RUN apt install -y nodejs +RUN apt install -y docker.io + RUN rustup target add x86_64-unknown-linux-gnu RUN apt install -y mingw-w64 -- 2.39.5 From 9282a43f6fa48a315788206357fc22ee67ccad1a Mon Sep 17 00:00:00 2001 From: Taha Hawa Date: Mon, 16 Jun 2025 17:57:07 -0400 Subject: [PATCH 24/52] update image to use --- .gitea/workflows/harmony_composer.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index 4622558..092c42c 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -8,8 +8,7 @@ on: jobs: package_harmony_composer: container: - image: hub.nationtech.io/harmony/harmony_composer:latest - force_pull: true + image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:838940047132152817e63b783e8e0241498a94ce8ed245413727a9420d0a29db runs-on: docker steps: - name: Checkout code -- 2.39.5 From a3e53df000a254ef3284d80e125f406f92551c24 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Tue, 17 Jun 2025 12:39:57 -0400 Subject: [PATCH 25/52] Add TODO --- harmony_composer/src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/harmony_composer/src/main.rs b/harmony_composer/src/main.rs index ef2e9c6..0bdb7be 100644 --- a/harmony_composer/src/main.rs +++ b/harmony_composer/src/main.rs @@ -177,6 +177,7 @@ async fn compile_harmony( }; } +// TODO: make sure this works with cargo workspaces async fn compile_cargo(platform: String, harmony_location: String) -> PathBuf { let metadata = MetadataCommand::new() .manifest_path(format!("{}/Cargo.toml", harmony_location)) -- 2.39.5 From 3f69edf0591e833752eb560ba53bd39b6283c0ae Mon Sep 17 00:00:00 2001 From: tahahawa Date: Tue, 17 Jun 2025 15:45:08 -0400 Subject: [PATCH 26/52] Try using actions instead of commands --- .gitea/workflows/harmony_composer.yaml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index 092c42c..c228a10 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -41,8 +41,18 @@ jobs: password: ${{ secrets.HUB_BOT_PASSWORD }} # TODO: build ARM images too - - name: Build docker container - run: docker build . -t hub.nationtech.io/harmony/harmony_composer + # - name: Build docker container + # run: docker build . -t hub.nationtech.io/harmony/harmony_composer - - name: Push docker container - run: docker push hub.nationtech.io/harmony/harmony_composer + # - name: Push docker container + # run: docker push hub.nationtech.io/harmony/harmony_composer + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: hub.nationtech.io/harmony/harmony_composer:latest -- 2.39.5 From d285ae988c09a5fe27068e45defc58116994ea5f Mon Sep 17 00:00:00 2001 From: tahahawa Date: Tue, 17 Jun 2025 15:53:00 -0400 Subject: [PATCH 27/52] try without setting up buildx --- .gitea/workflows/harmony_composer.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index c228a10..ca06eac 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -47,8 +47,8 @@ jobs: # - name: Push docker container # run: docker push hub.nationtech.io/harmony/harmony_composer - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 - name: Build and push uses: docker/build-push-action@v6 -- 2.39.5 From 42c17345cfae0e72885185d76b24f3cd3c494b85 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Tue, 17 Jun 2025 15:58:29 -0400 Subject: [PATCH 28/52] add buildx step back, github having problems? --- .gitea/workflows/harmony_composer.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index ca06eac..c228a10 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -47,8 +47,8 @@ jobs: # - name: Push docker container # run: docker push hub.nationtech.io/harmony/harmony_composer - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Build and push uses: docker/build-push-action@v6 -- 2.39.5 From a4d8609b294678023510da4690c515c7e2fd3527 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Tue, 17 Jun 2025 16:43:07 -0400 Subject: [PATCH 29/52] try with podman? --- .gitea/workflows/harmony_composer.yaml | 26 +++++++++++++------------- Dockerfile | 3 ++- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index c228a10..6d3c40e 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -8,7 +8,7 @@ on: jobs: package_harmony_composer: container: - image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:838940047132152817e63b783e8e0241498a94ce8ed245413727a9420d0a29db + image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:72711ad44406223a02e2e17b7a0af5b660db7e9a500a89ce43003cfd92a55205 runs-on: docker steps: - name: Checkout code @@ -41,18 +41,18 @@ jobs: password: ${{ secrets.HUB_BOT_PASSWORD }} # TODO: build ARM images too - # - name: Build docker container - # run: docker build . -t hub.nationtech.io/harmony/harmony_composer + - name: Build docker container + run: docker build . -t hub.nationtech.io/harmony/harmony_composer - # - name: Push docker container - # run: docker push hub.nationtech.io/harmony/harmony_composer + - name: Push docker container + run: docker push hub.nationtech.io/harmony/harmony_composer - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: . - push: true - tags: hub.nationtech.io/harmony/harmony_composer:latest + # - name: Build and push + # uses: docker/build-push-action@v6 + # with: + # context: . + # push: true + # tags: hub.nationtech.io/harmony/harmony_composer:latest diff --git a/Dockerfile b/Dockerfile index 5197e7b..2798cb6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,8 @@ RUN apt update # For checkout action RUN apt install -y nodejs -RUN apt install -y docker.io +# RUN apt install -y docker.io +RUN apt install -y podman podman-docker RUN rustup target add x86_64-unknown-linux-gnu -- 2.39.5 From 275a470d00a15277e74769a0c5d1531570f05027 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Tue, 17 Jun 2025 17:00:48 -0400 Subject: [PATCH 30/52] try with --privileged --- .gitea/workflows/harmony_composer.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index 6d3c40e..7d7e7c6 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -9,6 +9,7 @@ jobs: package_harmony_composer: container: image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:72711ad44406223a02e2e17b7a0af5b660db7e9a500a89ce43003cfd92a55205 + options: --privileged runs-on: docker steps: - name: Checkout code -- 2.39.5 From be0fbf08fb8a948b1eed6f20dd9021ffd7ce5ece Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 09:53:27 -0400 Subject: [PATCH 31/52] switch back to docker --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2798cb6..e785a2c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,8 @@ RUN apt update # For checkout action RUN apt install -y nodejs -# RUN apt install -y docker.io -RUN apt install -y podman podman-docker +RUN apt install -y docker.io +# RUN apt install -y podman podman-docker RUN rustup target add x86_64-unknown-linux-gnu -- 2.39.5 From 49fc459674d461682eff70aaf41e9a47f112e23a Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 09:55:01 -0400 Subject: [PATCH 32/52] update SHA --- .gitea/workflows/harmony_composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index 7d7e7c6..edfbf53 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -8,7 +8,7 @@ on: jobs: package_harmony_composer: container: - image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:72711ad44406223a02e2e17b7a0af5b660db7e9a500a89ce43003cfd92a55205 + image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:7bd128d5b29b85ba9297fd6b0842c8860710551e39a1573d5d1271fafefa2c67 options: --privileged runs-on: docker steps: -- 2.39.5 From a7ed31d4f10594ff31c51154c0ce67c7d3f516e9 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 09:55:56 -0400 Subject: [PATCH 33/52] wrong SHA --- .gitea/workflows/harmony_composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index edfbf53..a09ae93 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -8,7 +8,7 @@ on: jobs: package_harmony_composer: container: - image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:7bd128d5b29b85ba9297fd6b0842c8860710551e39a1573d5d1271fafefa2c67 + image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:42884e0cea2063e0ce15d61b3edc64c2bc2069e845a4df8bd6529bc27e36e005 options: --privileged runs-on: docker steps: -- 2.39.5 From 1cb010342ed7ef3d637b1aa65b1596e9659f6cc7 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 09:58:03 -0400 Subject: [PATCH 34/52] run only on taha docker runner for debugging --- .gitea/workflows/harmony_composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index a09ae93..bcab197 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -10,7 +10,7 @@ jobs: container: image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:42884e0cea2063e0ce15d61b3edc64c2bc2069e845a4df8bd6529bc27e36e005 options: --privileged - runs-on: docker + runs-on: Taha-Linux steps: - name: Checkout code uses: actions/checkout@v4 -- 2.39.5 From 1bfd7a2dd5292f12d8089667b78653cafd4f0790 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 10:13:52 -0400 Subject: [PATCH 35/52] It worked with --privileged with rootful docker, try podman with rootless --- .gitea/workflows/harmony_composer.yaml | 28 +++++++++++--------------- Dockerfile | 4 ++-- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index bcab197..bc683a0 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -9,30 +9,26 @@ jobs: package_harmony_composer: container: image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:42884e0cea2063e0ce15d61b3edc64c2bc2069e845a4df8bd6529bc27e36e005 - options: --privileged runs-on: Taha-Linux steps: - name: Checkout code uses: actions/checkout@v4 - - name: Build for Linux x86_64 - run: cargo build --release --bin harmony_composer --target x86_64-unknown-linux-gnu + # - name: Build for Linux x86_64 + # run: cargo build --release --bin harmony_composer --target x86_64-unknown-linux-gnu # - name: Build for Linux ARM64 # run: cargo build --release --bin harmony_composer --target aarch64-unknown-linux-gnu - - name: Build for Windows x86_64 GNU - run: cargo build --release --bin harmony_composer --target x86_64-pc-windows-gnu + # - name: Build for Windows x86_64 GNU + # run: cargo build --release --bin harmony_composer --target x86_64-pc-windows-gnu - # - name: Build for MacOS ARM64 - # run: cargo build --release --bin harmony_composer --target aarch64-apple-darwin - - - uses: actions/upload-artifact@v3 - with: - name: binaries - path: | - target/x86_64-unknown-linux-gnu/release/harmony_composer - target/x86_64-pc-windows-gnu/release/harmony_composer.exe + # - uses: actions/upload-artifact@v3 + # with: + # name: binaries + # path: | + # target/x86_64-unknown-linux-gnu/release/harmony_composer + # target/x86_64-pc-windows-gnu/release/harmony_composer.exe - name: Setup log into hub.nationtech.io uses: docker/login-action@v3 @@ -43,10 +39,10 @@ jobs: # TODO: build ARM images too - name: Build docker container - run: docker build . -t hub.nationtech.io/harmony/harmony_composer + run: docker build . -t hub.nationtech.io/harmony/harmony_composer:latest - name: Push docker container - run: docker push hub.nationtech.io/harmony/harmony_composer + run: docker push -a hub.nationtech.io/harmony/harmony_composer # - name: Set up Docker Buildx # uses: docker/setup-buildx-action@v3 diff --git a/Dockerfile b/Dockerfile index e785a2c..2798cb6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,8 @@ RUN apt update # For checkout action RUN apt install -y nodejs -RUN apt install -y docker.io -# RUN apt install -y podman podman-docker +# RUN apt install -y docker.io +RUN apt install -y podman podman-docker RUN rustup target add x86_64-unknown-linux-gnu -- 2.39.5 From e49a0c6680f1572383f8a2b266275285ea70d105 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 10:59:08 -0400 Subject: [PATCH 36/52] update docker sha --- .gitea/workflows/harmony_composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index bc683a0..cbf69e3 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -8,7 +8,7 @@ on: jobs: package_harmony_composer: container: - image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:42884e0cea2063e0ce15d61b3edc64c2bc2069e845a4df8bd6529bc27e36e005 + image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:72711ad44406223a02e2e17b7a0af5b660db7e9a500a89ce43003cfd92a55205 runs-on: Taha-Linux steps: - name: Checkout code -- 2.39.5 From 6a855d67f290f9916d117287432ccca1747e360b Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 11:00:25 -0400 Subject: [PATCH 37/52] switch back to docker --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2798cb6..e785a2c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,8 @@ RUN apt update # For checkout action RUN apt install -y nodejs -# RUN apt install -y docker.io -RUN apt install -y podman podman-docker +RUN apt install -y docker.io +# RUN apt install -y podman podman-docker RUN rustup target add x86_64-unknown-linux-gnu -- 2.39.5 From 585595239f2776eb26e022cfa51fbae73539459d Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 11:01:27 -0400 Subject: [PATCH 38/52] update sha --- .gitea/workflows/harmony_composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index cbf69e3..bc683a0 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -8,7 +8,7 @@ on: jobs: package_harmony_composer: container: - image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:72711ad44406223a02e2e17b7a0af5b660db7e9a500a89ce43003cfd92a55205 + image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:42884e0cea2063e0ce15d61b3edc64c2bc2069e845a4df8bd6529bc27e36e005 runs-on: Taha-Linux steps: - name: Checkout code -- 2.39.5 From 1e50124dd5a97baa1d5cbc8898e6bda29aabefd3 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 11:10:32 -0400 Subject: [PATCH 39/52] update sha again --- .gitea/workflows/harmony_composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index bc683a0..87dc692 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -8,7 +8,7 @@ on: jobs: package_harmony_composer: container: - image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:42884e0cea2063e0ce15d61b3edc64c2bc2069e845a4df8bd6529bc27e36e005 + image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:2e200c4fba73ab33d40e7f14d9f7f8a3a3ffa69a086887c201f9eb0d51661081 runs-on: Taha-Linux steps: - name: Checkout code -- 2.39.5 From 2ef5ab8b29092e1ec12ddb3639609c5fa83b97d1 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 11:13:05 -0400 Subject: [PATCH 40/52] switch back to docker tag runs-on --- .gitea/workflows/harmony_composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index 87dc692..3381fc0 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -9,7 +9,7 @@ jobs: package_harmony_composer: container: image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:2e200c4fba73ab33d40e7f14d9f7f8a3a3ffa69a086887c201f9eb0d51661081 - runs-on: Taha-Linux + runs-on: docker steps: - name: Checkout code uses: actions/checkout@v4 -- 2.39.5 From 6ccbd3791c3286537d1ca0f9fd6ecb3dfcf5dfc1 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 11:17:23 -0400 Subject: [PATCH 41/52] try with rootless docker sock? --- .gitea/workflows/harmony_composer.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index 3381fc0..2cf3a65 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -8,6 +8,8 @@ on: jobs: package_harmony_composer: container: + env: + DOCKER_HOST: unix://$XDG_RUNTIME_DIR/docker.sock image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:2e200c4fba73ab33d40e7f14d9f7f8a3a3ffa69a086887c201f9eb0d51661081 runs-on: docker steps: -- 2.39.5 From 818e6086c55f67940a81c05b9cf477a6a220007b Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 11:19:08 -0400 Subject: [PATCH 42/52] hardcode user 1001 --- .gitea/workflows/harmony_composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index 2cf3a65..35c7b9e 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -9,7 +9,7 @@ jobs: package_harmony_composer: container: env: - DOCKER_HOST: unix://$XDG_RUNTIME_DIR/docker.sock + DOCKER_HOST: unix:///run/user/1001/docker.sock image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:2e200c4fba73ab33d40e7f14d9f7f8a3a3ffa69a086887c201f9eb0d51661081 runs-on: docker steps: -- 2.39.5 From ed07601772814d7258ca952f357ffad476b71cea Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 11:22:19 -0400 Subject: [PATCH 43/52] try mounting user docker.sock into container --- .gitea/workflows/harmony_composer.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index 35c7b9e..d75a4e4 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -8,8 +8,7 @@ on: jobs: package_harmony_composer: container: - env: - DOCKER_HOST: unix:///run/user/1001/docker.sock + options: -v /run/user/1001/docker.sock:/var/run/docker.sock image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:2e200c4fba73ab33d40e7f14d9f7f8a3a3ffa69a086887c201f9eb0d51661081 runs-on: docker steps: -- 2.39.5 From 9f0082b1e89bc12014865b48356be9e0c8772163 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 11:26:32 -0400 Subject: [PATCH 44/52] use proper volume option --- .gitea/workflows/harmony_composer.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index d75a4e4..c093f24 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -8,7 +8,8 @@ on: jobs: package_harmony_composer: container: - options: -v /run/user/1001/docker.sock:/var/run/docker.sock + volumes: + - /run/user/1001/docker.sock:/var/run/docker.sock image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:2e200c4fba73ab33d40e7f14d9f7f8a3a3ffa69a086887c201f9eb0d51661081 runs-on: docker steps: -- 2.39.5 From 3b30c9281ec6a979a567818899d8272a0b15e914 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 15:16:02 -0400 Subject: [PATCH 45/52] Switch to running on `dind` (Docker-in-Docker supporting) runners --- .gitea/workflows/harmony_composer.yaml | 52 +++++++++++--------------- Dockerfile | 4 +- 2 files changed, 22 insertions(+), 34 deletions(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index c093f24..f977978 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -8,29 +8,24 @@ on: jobs: package_harmony_composer: container: - volumes: - - /run/user/1001/docker.sock:/var/run/docker.sock - image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:2e200c4fba73ab33d40e7f14d9f7f8a3a3ffa69a086887c201f9eb0d51661081 - runs-on: docker + image: hub.nationtech.io/harmony/harmony_composer:latest + runs-on: dind steps: - name: Checkout code uses: actions/checkout@v4 - # - name: Build for Linux x86_64 - # run: cargo build --release --bin harmony_composer --target x86_64-unknown-linux-gnu + - name: Build for Linux x86_64 + run: cargo build --release --bin harmony_composer --target x86_64-unknown-linux-gnu - # - name: Build for Linux ARM64 - # run: cargo build --release --bin harmony_composer --target aarch64-unknown-linux-gnu + - name: Build for Windows x86_64 GNU + run: cargo build --release --bin harmony_composer --target x86_64-pc-windows-gnu - # - name: Build for Windows x86_64 GNU - # run: cargo build --release --bin harmony_composer --target x86_64-pc-windows-gnu - - # - uses: actions/upload-artifact@v3 - # with: - # name: binaries - # path: | - # target/x86_64-unknown-linux-gnu/release/harmony_composer - # target/x86_64-pc-windows-gnu/release/harmony_composer.exe + - uses: actions/upload-artifact@v3 + with: + name: binaries + path: | + target/x86_64-unknown-linux-gnu/release/harmony_composer + target/x86_64-pc-windows-gnu/release/harmony_composer.exe - name: Setup log into hub.nationtech.io uses: docker/login-action@v3 @@ -39,19 +34,14 @@ jobs: username: ${{ secrets.HUB_BOT_USER }} password: ${{ secrets.HUB_BOT_PASSWORD }} - # TODO: build ARM images too - - name: Build docker container - run: docker build . -t hub.nationtech.io/harmony/harmony_composer:latest + # TODO: build ARM images and MacOS binaries (or other targets) too - - name: Push docker container - run: docker push -a hub.nationtech.io/harmony/harmony_composer + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v3 - - # - name: Build and push - # uses: docker/build-push-action@v6 - # with: - # context: . - # push: true - # tags: hub.nationtech.io/harmony/harmony_composer:latest + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: hub.nationtech.io/harmony/harmony_composer:latest diff --git a/Dockerfile b/Dockerfile index e785a2c..4a68932 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,15 +16,13 @@ RUN apt update RUN apt install -y nodejs RUN apt install -y docker.io -# RUN apt install -y podman podman-docker RUN rustup target add x86_64-unknown-linux-gnu RUN apt install -y mingw-w64 RUN rustup target add x86_64-pc-windows-gnu -# RUN apt install -y gcc-aarch64-linux-gnu -# RUN rustup target add aarch64-unknown-linux-gnu +# TODO: Consider adding more supported targets COPY --from=build /app/target/release/harmony_composer . -- 2.39.5 From 66a300f1e484bec9a8ae517022f3ead77044e0ea Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 15:18:37 -0400 Subject: [PATCH 46/52] no longer runs on PRs, only on merge to master --- .gitea/workflows/harmony_composer.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index f977978..2339906 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -1,9 +1,8 @@ name: Compile and package harmony_composer on: - pull_request: push: branches: - - main + - master jobs: package_harmony_composer: @@ -27,6 +26,8 @@ jobs: target/x86_64-unknown-linux-gnu/release/harmony_composer target/x86_64-pc-windows-gnu/release/harmony_composer.exe + # TODO: build ARM images and MacOS binaries (or other targets) too + - name: Setup log into hub.nationtech.io uses: docker/login-action@v3 with: @@ -34,8 +35,6 @@ jobs: username: ${{ secrets.HUB_BOT_USER }} password: ${{ secrets.HUB_BOT_PASSWORD }} - # TODO: build ARM images and MacOS binaries (or other targets) too - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 -- 2.39.5 From 7c0fc389411ebb1e5f67b13ff348ef74f08580c0 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 15:22:51 -0400 Subject: [PATCH 47/52] Forget using the buildx step, it's not needed --- .gitea/workflows/harmony_composer.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index 2339906..8dfcca7 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -1,5 +1,6 @@ name: Compile and package harmony_composer on: + pull_request: push: branches: - master @@ -26,8 +27,6 @@ jobs: target/x86_64-unknown-linux-gnu/release/harmony_composer target/x86_64-pc-windows-gnu/release/harmony_composer.exe - # TODO: build ARM images and MacOS binaries (or other targets) too - - name: Setup log into hub.nationtech.io uses: docker/login-action@v3 with: @@ -35,8 +34,7 @@ jobs: username: ${{ secrets.HUB_BOT_USER }} password: ${{ secrets.HUB_BOT_PASSWORD }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + # TODO: build ARM images and MacOS binaries (or other targets) too - name: Build and push uses: docker/build-push-action@v6 -- 2.39.5 From 0fcc4a5734a4eda3bb970e9e186b0a4dde08f50f Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 15:26:22 -0400 Subject: [PATCH 48/52] buildx is needed, actually --- .gitea/workflows/harmony_composer.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index 8dfcca7..bdb9e75 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -1,6 +1,5 @@ name: Compile and package harmony_composer on: - pull_request: push: branches: - master @@ -36,6 +35,9 @@ jobs: # TODO: build ARM images and MacOS binaries (or other targets) too + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push uses: docker/build-push-action@v6 with: -- 2.39.5 From 0a42fa62ff03919d2d73c8c3a1912c71e3ab1966 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 15:33:46 -0400 Subject: [PATCH 49/52] don't run check script twice --- .gitea/workflows/check.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/check.yml b/.gitea/workflows/check.yml index b790ff0..b3b2b12 100644 --- a/.gitea/workflows/check.yml +++ b/.gitea/workflows/check.yml @@ -1,6 +1,8 @@ name: Run Check Script on: push: + branches: + - master pull_request: jobs: @@ -9,6 +11,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - + - name: Run check script run: bash check.sh -- 2.39.5 From 46985b561a4b94b8819e68d7edf400afcaaa65c7 Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 15:35:46 -0400 Subject: [PATCH 50/52] run check.sh in docker --- .gitea/workflows/check.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/check.yml b/.gitea/workflows/check.yml index b3b2b12..be71a09 100644 --- a/.gitea/workflows/check.yml +++ b/.gitea/workflows/check.yml @@ -7,7 +7,9 @@ on: jobs: check: - runs-on: rust-cargo + runs-on: docker + container: + image: rust:1.87.0 steps: - name: Checkout code uses: actions/checkout@v4 -- 2.39.5 From d8f50b28342e0968f1e857d9bf3cb5fbeffa788e Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 15:37:02 -0400 Subject: [PATCH 51/52] run in our docker image --- .gitea/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/check.yml b/.gitea/workflows/check.yml index be71a09..2014633 100644 --- a/.gitea/workflows/check.yml +++ b/.gitea/workflows/check.yml @@ -9,7 +9,7 @@ jobs: check: runs-on: docker container: - image: rust:1.87.0 + image: hub.nationtech.io/harmony/harmony_composer:latest steps: - name: Checkout code uses: actions/checkout@v4 -- 2.39.5 From f4a12ccbe3c043a754d24ca28cf881f84b7c0eeb Mon Sep 17 00:00:00 2001 From: tahahawa Date: Wed, 18 Jun 2025 15:43:19 -0400 Subject: [PATCH 52/52] update dockerfile with rustfmt --- .gitea/workflows/check.yml | 2 +- .gitea/workflows/harmony_composer.yaml | 2 +- Dockerfile | 16 ++++++---------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/check.yml b/.gitea/workflows/check.yml index 2014633..ae2d001 100644 --- a/.gitea/workflows/check.yml +++ b/.gitea/workflows/check.yml @@ -9,7 +9,7 @@ jobs: check: runs-on: docker container: - image: hub.nationtech.io/harmony/harmony_composer:latest + image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:eb0406fcb95c63df9b7c4b19bc50ad7914dd8232ce98e9c9abef628e07c69386 steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.gitea/workflows/harmony_composer.yaml b/.gitea/workflows/harmony_composer.yaml index bdb9e75..6c7bc0f 100644 --- a/.gitea/workflows/harmony_composer.yaml +++ b/.gitea/workflows/harmony_composer.yaml @@ -7,7 +7,7 @@ on: jobs: package_harmony_composer: container: - image: hub.nationtech.io/harmony/harmony_composer:latest + image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:eb0406fcb95c63df9b7c4b19bc50ad7914dd8232ce98e9c9abef628e07c69386 runs-on: dind steps: - name: Checkout code diff --git a/Dockerfile b/Dockerfile index 4a68932..b7b690d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,19 +10,15 @@ FROM docker.io/rust:1.87.0 WORKDIR /app +RUN rustup target add x86_64-pc-windows-gnu +RUN rustup target add x86_64-unknown-linux-gnu +RUN rustup component add rustfmt + RUN apt update -# For checkout action -RUN apt install -y nodejs - -RUN apt install -y docker.io - -RUN rustup target add x86_64-unknown-linux-gnu - -RUN apt install -y mingw-w64 -RUN rustup target add x86_64-pc-windows-gnu - # TODO: Consider adding more supported targets +# nodejs for checkout action, docker for building containers, mingw for cross-compiling for windows +RUN apt install -y nodejs docker.io mingw-w64 COPY --from=build /app/target/release/harmony_composer . -- 2.39.5