Contents

About

Package bootstrap is an embeddable installer for Rust binaries that allows the reuse of the code in your project to generate shell completions, manpages and other artifacts and install them into directories appropriate for a Unix system.

Usage

```toml

Cargo.toml

[[bin]] name = "bootstrap" path = "src/bootstrap.rs

[dependencies.packagebootstrap] version = "0.1" features = ["complete", "mangen"] Rust // bootstrap.rs use clap::Command; use packagebootstrap::Bootstrap;

fn main() -> Result<(), Box> { let cmd = Command::new("foo") .about("manage all of your bars");

let bootstrap = Bootstrap::new("foo", cmd);
bootstrap.install(Path::new("pkg/usr", 1)?;

} With a little extra setup, bootstrap can use the same function as your binary to generate the `clap::Command` struct. toml

Cargo.toml

[workspace] members = "cli"

[workspace.dependencies] clap = 4.1 cli = { path = "cli" } Rust // cli/src/lib.rs pub fn cli() -> clap::Command { Command::new("foo") .about("Handle all of your bars") } ```

Features