Skip to main content

Crate battery_pack

Crate battery_pack 

Source
Expand description

battery-pack: Framework for building and using battery packs.

Battery packs are curated collections of crates that work well together. The CLI (cargo bp) syncs real dependencies into your Cargo.toml, and this library provides build-time documentation generation and drift validation.

§For Battery Pack Authors

Your build.rs generates documentation:

fn main() {
    battery_pack::build::generate_docs().unwrap();
}

Your lib.rs includes the generated docs:

#![doc = include_str!(concat!(env!("OUT_DIR"), "/docs.md"))]

Structs§

BatteryPackSpec
Parsed battery pack specification.
CrateSpec
A curated crate within a battery pack.

Enums§

DepKind
The dependency kind, determined by which section of the battery pack’s Cargo.toml the crate appears in.

Functions§

validate
Validate that the calling crate’s dependencies match a battery pack’s specs.