Skip to content

Commit 534e424

Browse files
committed
refactor: extract process and finding types into dedicated crates
Extracts two pristine leaf modules into path-only crates: - homeboy-process (455 LOC, 20 importers): process spawn/signal/lifecycle helpers; depends only on homeboy-error + libc + ctrlc. - homeboy-finding (381 LOC, 22 importers): structured finding/diagnostic types for audit and review output; serde only. Both re-exported via core/mod.rs so crate::core::{process,finding}::* call sites are unchanged. Not published to crates.io; still ships as the single homeboy binary. cargo check --lib passes; both crates' unit tests pass.
1 parent 5060c84 commit 534e424

7 files changed

Lines changed: 61 additions & 3 deletions

File tree

Cargo.lock

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ path = "src/bin/bench-audit-self.rs"
3838
[dependencies]
3939
# Internal workspace crates (path-only, not published)
4040
homeboy-error = { path = "crates/homeboy-error" }
41+
homeboy-finding = { path = "crates/homeboy-finding" }
4142
homeboy-output = { path = "crates/homeboy-output" }
43+
homeboy-process = { path = "crates/homeboy-process" }
4244
homeboy-product-identity = { path = "crates/homeboy-product-identity" }
4345
homeboy-engine-primitives = { path = "crates/homeboy-engine-primitives" }
4446
homeboy-redaction = { path = "crates/homeboy-redaction" }

crates/homeboy-finding/Cargo.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[package]
2+
name = "homeboy-finding"
3+
version = "0.1.0"
4+
edition = "2021"
5+
license = "MIT"
6+
authors = ["Chris Huber <chubes@extrachill.com>"]
7+
description = "Structured finding/diagnostic types for homeboy audit and review output"
8+
repository = "https://github.com/Extra-Chill/homeboy"
9+
10+
[lib]
11+
name = "homeboy_finding"
12+
path = "src/lib.rs"
13+
14+
[dependencies]
15+
serde = { version = "1.0", features = ["derive"] }
16+
serde_json = "1.0"

crates/homeboy-process/Cargo.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "homeboy-process"
3+
version = "0.1.0"
4+
edition = "2021"
5+
license = "MIT"
6+
authors = ["Chris Huber <chubes@extrachill.com>"]
7+
description = "Process spawning, signaling, and lifecycle helpers for homeboy"
8+
repository = "https://github.com/Extra-Chill/homeboy"
9+
10+
[lib]
11+
name = "homeboy_process"
12+
path = "src/lib.rs"
13+
14+
[dependencies]
15+
homeboy-error = { path = "../homeboy-error" }
16+
libc = "0.2"
17+
ctrlc = "3.4"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::core::error::{Error, Result};
1+
use homeboy_error::{Error, Result};
22
use std::path::PathBuf;
33
#[cfg(unix)]
44
use std::process::Command;

src/core/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ pub mod execution;
8888
pub mod execution_contract;
8989
pub(crate) mod expand;
9090
pub mod extension;
91-
pub mod finding;
91+
// finding moved to the internal `homeboy-finding` crate. Re-exported so existing
92+
// `crate::core::finding::*` call sites keep working unchanged.
93+
pub use homeboy_finding as finding;
9294
pub mod fleet;
9395
pub mod fuzz;
9496
pub mod gate;
@@ -122,7 +124,9 @@ pub mod preview_consumer;
122124
pub mod preview_ingress;
123125
#[cfg(test)]
124126
mod preview_ingress_tests;
125-
pub mod process;
127+
// process moved to the internal `homeboy-process` crate. Re-exported so existing
128+
// `crate::core::process::*` call sites keep working unchanged.
129+
pub use homeboy_process as process;
126130
// product_identity moved to the internal `homeboy-product-identity` crate.
127131
// Re-exported so `crate::core::product_identity::*` call sites keep working.
128132
pub use homeboy_product_identity as product_identity;

0 commit comments

Comments
 (0)