diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b2dfb6c..1a08105 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -16,6 +16,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: check + args: --workspace test: name: Test Suite @@ -31,6 +32,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: test + args: --workspace fmt: name: Rustfmt @@ -63,4 +65,4 @@ jobs: - uses: actions-rs/cargo@v1 with: command: clippy - args: -- -D warnings + args: --workspace -- -D warnings diff --git a/Cargo.lock b/Cargo.lock index 9323414..f8fd9d7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,7 +44,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] -name = "bakatsugi-injector" +name = "bakatsugi" version = "0.1.0" dependencies = [ "anyhow", diff --git a/Cargo.toml b/Cargo.toml index aa26ac5..5c8ba49 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,27 @@ -[profile.release] -strip = true +[package] +name = "bakatsugi" +version = "0.1.0" +edition = "2021" [workspace] - members = [ - "bakatsugi-injector", "bakatsugi-stage2", "bakatsugi-payload", "bakatsugi-protocol", ] + +[dependencies] +bakatsugi-payload = { path = "bakatsugi-payload" } +bakatsugi-stage2 = { path = "bakatsugi-stage2", artifact = "cdylib" } +bakatsugi-protocol = { path = "bakatsugi-protocol" } +anyhow = "1.0.53" +goblin = "0.5.1" +nix = "0.23.1" +proc-maps = "0.2.0" +regex = "1.5.4" +ctor = "0.1.21" +rand = "0.8.4" +clap = { version = "3.1.2", features = ["derive"] } + +[profile.release] +strip = true diff --git a/bakatsugi-injector/Cargo.toml b/bakatsugi-injector/Cargo.toml deleted file mode 100644 index 879d38a..0000000 --- a/bakatsugi-injector/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "bakatsugi-injector" -version = "0.1.0" -edition = "2021" - -[dependencies] -bakatsugi-payload = { path = "../bakatsugi-payload" } -bakatsugi-stage2 = { path = "../bakatsugi-stage2", artifact = "cdylib" } -bakatsugi-protocol = { path = "../bakatsugi-protocol" } -anyhow = "1.0.53" -goblin = "0.5.1" -nix = "0.23.1" -proc-maps = "0.2.0" -regex = "1.5.4" -ctor = "0.1.21" -rand = "0.8.4" -clap = { version = "3.1.2", features = ["derive"] } diff --git a/bakatsugi-injector/src/inspection.rs b/src/inspection.rs similarity index 100% rename from bakatsugi-injector/src/inspection.rs rename to src/inspection.rs diff --git a/bakatsugi-injector/src/lib.rs b/src/lib.rs similarity index 100% rename from bakatsugi-injector/src/lib.rs rename to src/lib.rs diff --git a/bakatsugi-injector/src/main.rs b/src/main.rs similarity index 93% rename from bakatsugi-injector/src/main.rs rename to src/main.rs index 2f37ee3..bcefef7 100644 --- a/bakatsugi-injector/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ use std::path::PathBuf; use anyhow::Result; -use bakatsugi_injector::do_inject; +use bakatsugi::do_inject; use clap::Parser; use nix::{libc::pid_t, unistd::Pid};