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)); + } }