diff --git a/Cargo.lock b/Cargo.lock index fc5c174e..d9bfebc5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1024,6 +1024,16 @@ dependencies = [ "tokio", ] +[[package]] +name = "rama-fp" +version = "0.2.0" +dependencies = [ + "anyhow", + "clap", + "rama", + "tokio", +] + [[package]] name = "rama-hyper" version = "0.1001000.0" diff --git a/Cargo.toml b/Cargo.toml index 0ae8e0aa..3c4f0cb8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = [".", "rama-cli"] +members = [".", "rama-cli", "rama-fp"] [workspace.package] version = "0.2.0" diff --git a/rama-fp/Cargo.toml b/rama-fp/Cargo.toml new file mode 100644 index 00000000..568e495a --- /dev/null +++ b/rama-fp/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "rama-fp" +description = "a fingerprinting service for rama to generate and test fingerprints" +version = { workspace = true } +license = { workspace = true } +edition = { workspace = true } +repository = { workspace = true } +keywords = { workspace = true } +categories = { workspace = true } +authors = { workspace = true } +rust-version = { workspace = true } +default-run = "rama-fp" + +[dependencies] +anyhow = "1.0" +clap = { version = "4.4", features = [ "derive" ] } +rama = { version = "0.2", path = ".." } +tokio = { version = "1.35", features = [ "rt-multi-thread", "macros" ] } + +[[bin]] +name = "rama-fp" +path = "src/main.rs" diff --git a/rama-fp/src/main.rs b/rama-fp/src/main.rs new file mode 100644 index 00000000..cee0a48b --- /dev/null +++ b/rama-fp/src/main.rs @@ -0,0 +1,27 @@ +use clap::{Parser, Subcommand}; + +mod service; + +/// a fingerprinting service for ramae +#[derive(Debug, Parser)] // requires `derive` feature +#[command(name = "rama-fp")] +#[command(about = "a fingerprinting service for rama", long_about = None)] +struct Cli { + #[command(subcommand)] + command: Commands, +} + +#[derive(Debug, Subcommand)] +enum Commands { + /// Run the FP service + Run, +} + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let args = Cli::parse(); + + match args.command { + Commands::Run => service::run().await, + } +} diff --git a/rama-fp/src/service/mod.rs b/rama-fp/src/service/mod.rs new file mode 100644 index 00000000..47a8c2c8 --- /dev/null +++ b/rama-fp/src/service/mod.rs @@ -0,0 +1,3 @@ +pub async fn run() -> anyhow::Result<()> { + Ok(()) +}