diff --git a/Cargo.lock b/Cargo.lock index 0c45523..d4ee1d7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,15 +19,15 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -40,15 +40,15 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "cc" -version = "1.0.90" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" [[package]] name = "cfg-if" @@ -58,9 +58,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "color-eyre" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a667583cca8c4f8436db8de46ea8233c42a7d9ae424a82d338f2e4675229204" +checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5" dependencies = [ "backtrace", "color-spantrace", @@ -84,16 +84,23 @@ dependencies = [ ] [[package]] -name = "crosec-rs" +name = "crosec" version = "0.1.0" dependencies = [ - "color-eyre", "nix", "num-derive", "num-traits", "thiserror", ] +[[package]] +name = "ectool" +version = "0.1.0" +dependencies = [ + "color-eyre", + "crosec", +] + [[package]] name = "eyre" version = "0.6.12" @@ -130,9 +137,9 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "miniz_oxide" @@ -197,24 +204,24 @@ checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -236,9 +243,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.49" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", @@ -247,18 +254,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 81c204d..fdf4423 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,3 @@ -[package] -name = "crosec-rs" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -color-eyre = "0.6.2" -nix = { version = "0.27.1", features = ["ioctl"] } -num-derive = "0.4.2" -num-traits = "0.2.18" -thiserror = "1.0.57" +[workspace] +members = ["crosec", "ectool"] +resolver = "2" diff --git a/crosec/Cargo.toml b/crosec/Cargo.toml new file mode 100644 index 0000000..ab2338d --- /dev/null +++ b/crosec/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "crosec" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +nix = { version = "0.27.1", features = ["ioctl"] } +num-derive = "0.4.2" +num-traits = "0.2.18" +thiserror = "1.0.57" \ No newline at end of file diff --git a/src/commands/get_chip_info.rs b/crosec/src/commands/get_chip_info.rs similarity index 100% rename from src/commands/get_chip_info.rs rename to crosec/src/commands/get_chip_info.rs diff --git a/src/commands/hello.rs b/crosec/src/commands/hello.rs similarity index 100% rename from src/commands/hello.rs rename to crosec/src/commands/hello.rs diff --git a/src/commands/mod.rs b/crosec/src/commands/mod.rs similarity index 100% rename from src/commands/mod.rs rename to crosec/src/commands/mod.rs diff --git a/src/commands/version.rs b/crosec/src/commands/version.rs similarity index 100% rename from src/commands/version.rs rename to crosec/src/commands/version.rs diff --git a/src/crosec/dev.rs b/crosec/src/crosec/dev.rs similarity index 100% rename from src/crosec/dev.rs rename to crosec/src/crosec/dev.rs diff --git a/src/crosec/mod.rs b/crosec/src/crosec/mod.rs similarity index 100% rename from src/crosec/mod.rs rename to crosec/src/crosec/mod.rs diff --git a/src/lib.rs b/crosec/src/lib.rs similarity index 100% rename from src/lib.rs rename to crosec/src/lib.rs diff --git a/ectool/Cargo.toml b/ectool/Cargo.toml new file mode 100644 index 0000000..5d88f32 --- /dev/null +++ b/ectool/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "ectool" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +crosec = { version = "0.1.0", path = "../crosec" } +color-eyre = "0.6.2" \ No newline at end of file diff --git a/src/bin/ectool.rs b/ectool/src/main.rs similarity index 97% rename from src/bin/ectool.rs rename to ectool/src/main.rs index a33b1e0..ca73d0d 100644 --- a/src/bin/ectool.rs +++ b/ectool/src/main.rs @@ -1,5 +1,5 @@ use color_eyre::eyre::Result; -use crosec_rs::commands::{ +use crosec::commands::{ get_chip_info::ec_cmd_get_chip_info, hello::ec_cmd_hello, version::ec_cmd_version, }; @@ -30,4 +30,4 @@ fn main() -> Result<()> { println!(" revision: {revision}"); Ok(()) -} +} \ No newline at end of file