| Crates.io | noprocess |
| lib.rs | noprocess |
| version | 0.0.2 |
| created_at | 2026-01-07 14:33:39.424796+00 |
| updated_at | 2026-01-07 15:13:39.139953+00 |
| description | A lightweight Rust library for managing long-running processes with graceful shutdown, restart capabilities, and error handling |
| homepage | |
| repository | https://git.kjuulh.io/kjuulh/noprocess |
| max_upload_size | |
| id | 2028338 |
| size | 79,964 |
A lightweight Rust library for managing long-running processes with graceful shutdown, restart capabilities, and error handling.

Designed to work with nocontrol for distributed orchestration of Rust workloads — think Kubernetes pods, but for native Rust code.
use noprocess::{Process, ProcessHandler, ProcessManager, ProcessResult};
use tokio_util::sync::CancellationToken;
struct MyPipeline;
impl ProcessHandler for MyPipeline {
fn call(&self, cancel: CancellationToken) -> impl Future<Output = ProcessResult> + Send {
async move {
loop {
tokio::select! {
_ = cancel.cancelled() => break,
_ = do_work() => {}
}
}
Ok(())
}
}
}
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let manager = ProcessManager::new();
let id = manager.add_process(Process::new(MyPipeline)).await;
manager.start_process(&id).await?;
// Later: stop, restart, or kill
manager.stop_process(&id).await?;
Ok(())
}
cargo run --bin simple # Basic start/stop/restart
cargo run --bin pipeline # Data pipeline with backpressure
cargo run --bin worker # Worker pool pattern
MIT