What is a Battery Pack?
A battery pack is a curated set of crates arranged around a common theme. There’s one for building CLIs, one for error handling, one for setting up CI, one for embedded development, and more. You install cargo bp and then:
cargo bp ls # search crates.io for available battery packs
cargo bp add cli # add CLI libraries to your project
cargo bp add embedded # pick your HAL, concurrency model, peripherals
cargo bp new cli # scaffold a new project from a template
The key ideas:
- You use the real crates directly. Battery packs don’t wrap or re-export anything.
cargo bp add cliputsclapanddialoguerin yourCargo.toml— you use their APIs, their docs, their proc macros. A battery pack is just a list of recommendations. - Anybody can publish one. A battery pack is itself a crate on crates.io. If you have opinions about what crates people should use for some domain, you can package those opinions and share them.
- You’re never locked in. You don’t depend on a battery pack at runtime. It’s purely a source of truth for
cargo bpto read. If you don’t like one of its choices, swap it out — your code doesn’t know the difference.
What’s next
- Getting Started — install the CLI and use your first battery pack
- Templates — scaffold projects and add CI workflows
- Our Battery Packs — what’s available today
- Create Your Own — publish a battery pack for your domain