#cargo-manifest #manifest #generator #features

manifest-feature-gen

Feature generator for cargo manifest

4 releases

0.1.3 Nov 14, 2023
0.1.2 Dec 13, 2022
0.1.1 Dec 12, 2022
0.1.0 Dec 11, 2022

#1614 in Development tools

Download history 169/week @ 2024-01-04 35/week @ 2024-01-11 6/week @ 2024-01-18 17/week @ 2024-02-01 17/week @ 2024-02-08 6/week @ 2024-02-22 5/week @ 2024-02-29 6/week @ 2024-03-07 4/week @ 2024-03-14 21/week @ 2024-03-21 15/week @ 2024-03-28 20/week @ 2024-04-04 50/week @ 2024-04-11 22/week @ 2024-04-18

116 downloads per month

Custom license

15KB
284 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()?;
    let optional_features = manifest.add_features([
        Features::Feature1,
        Features::Feature2,
    ].into_iter(), |_, _| {}).unwrap();
    manifest.write()?;
    Ok(())
}

Dependencies

~1.5–2.2MB
~46K SLoC