#cargo-manifest #manifest #features #generator

manifest-feature-gen

Feature generator for cargo manifest

5 releases

0.2.0 Aug 8, 2024
0.1.3 Nov 14, 2023
0.1.2 Dec 13, 2022
0.1.1 Dec 12, 2022
0.1.0 Dec 11, 2022

#1211 in Development tools

Download history 97/week @ 2024-07-27 166/week @ 2024-08-03 62/week @ 2024-08-10 2/week @ 2024-08-17 93/week @ 2024-08-31 3/week @ 2024-09-07 70/week @ 2024-09-14 194/week @ 2024-09-21 24/week @ 2024-09-28 2/week @ 2024-10-05 29/week @ 2024-10-12 19/week @ 2024-10-19 29/week @ 2024-10-26 26/week @ 2024-11-02

103 downloads per month

Custom license

15KB
290 lines

manifest-feature-gen

manifest-feature-gen helps generating features of cargo manifest


lib.rs:

manifest-feature-gen helps generating features of cargo manifest

Usage

use manifest_feature_gen::{Manifest, ToFeatureName};

enum Features {
    Feature1,
    Feature2,
}

impl ToFeatureName for Features {
    fn to_feature_name(&self) -> String {
        unimplemented!()
    }
}

fn main() -> Result<(), manifest_feature_gen::Error> {
    let mut manifest = Manifest::new_with_env(true)?;
    let optional_features = manifest.add_features([
        Features::Feature1,
        Features::Feature2,
    ].into_iter(), |_, _| {}).unwrap();
    manifest.write()?;
    Ok(())
}

Dependencies

~1.4–2.1MB
~44K SLoC