#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

#820 in Development tools

Download history 8/week @ 2024-03-10 21/week @ 2024-03-24 33/week @ 2024-03-31 29/week @ 2024-04-07 45/week @ 2024-04-14 26/week @ 2024-05-05 34/week @ 2024-05-12 79/week @ 2024-05-19 65/week @ 2024-06-16 1/week @ 2024-06-23

66 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.4–2MB
~43K SLoC