From 630c50a64a82789dc3718f1368c2c83a1f3bcfaa Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Thu, 27 Jun 2024 21:27:18 +0200 Subject: [PATCH] feat(cli): add libpt-cli and reexport essential cli deps #84 --- Cargo.toml | 4 ++++ members/libpt-cli/Cargo.toml | 20 ++++++++++++++++++++ members/libpt-cli/src/lib.rs | 6 ++++++ members/libpt-cli/src/repl/mod.rs | 0 4 files changed, 30 insertions(+) create mode 100644 members/libpt-cli/Cargo.toml create mode 100644 members/libpt-cli/src/lib.rs create mode 100644 members/libpt-cli/src/repl/mod.rs diff --git a/Cargo.toml b/Cargo.toml index e9e9ba2..1536913 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ members = [ "members/libpt-core", "members/libpt-log", "members/libpt-py", + "members/libpt-cli", ] default-members = [".", "members/libpt-core"] @@ -31,6 +32,7 @@ thiserror = "1.0.56" libpt-core = { version = "0.4.0", path = "members/libpt-core" } libpt-bintols = { version = "0.5.1", path = "members/libpt-bintols" } libpt-log = { version = "0.4.2", path = "members/libpt-log" } +libpt-cli = { version = "0.1.0", path = "members/libpt-cli" } [package] name = "libpt" @@ -52,6 +54,7 @@ core = [] full = ["default", "core", "log", "bintols"] log = ["dep:libpt-log"] bintols = ["dep:libpt-bintols", "log"] +cli = ["dep:libpt-cli", "core"] # py = ["dep:libpt-py"] [lib] @@ -66,3 +69,4 @@ crate-type = [ libpt-core = { workspace = true } libpt-bintols = { workspace = true, optional = true } libpt-log = { workspace = true, optional = true } +libpt-cli = { workspace = true, optional = true } diff --git a/members/libpt-cli/Cargo.toml b/members/libpt-cli/Cargo.toml new file mode 100644 index 0000000..c8f9a60 --- /dev/null +++ b/members/libpt-cli/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "libpt-cli" +publish.workspace = true +version = "0.1.0" +edition.workspace = true +authors.workspace = true +license.workspace = true +description.workspace = true +readme.workspace = true +homepage.workspace = true +repository.workspace = true +keywords.workspace = true +categories.workspace = true + +[dependencies] +clap = "4.5.7" +comfy-table = "7.1.1" +console = "0.15.8" +dialoguer = "0.11.0" +indicatif = "0.17.8" diff --git a/members/libpt-cli/src/lib.rs b/members/libpt-cli/src/lib.rs new file mode 100644 index 0000000..8d79d47 --- /dev/null +++ b/members/libpt-cli/src/lib.rs @@ -0,0 +1,6 @@ +pub mod repl; + +pub use indicatif; +pub use console; +pub use dialoguer; +pub use comfy_table; diff --git a/members/libpt-cli/src/repl/mod.rs b/members/libpt-cli/src/repl/mod.rs new file mode 100644 index 0000000..e69de29