#manifest #feature #generator

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

#8 in #manifest

Download history 48/week @ 2023-10-29 3/week @ 2023-11-05 136/week @ 2023-11-12 139/week @ 2023-11-19 20/week @ 2023-11-26 120/week @ 2023-12-03 21/week @ 2023-12-10 111/week @ 2023-12-17 12/week @ 2023-12-24 107/week @ 2023-12-31 197/week @ 2024-01-07 32/week @ 2024-01-14 25/week @ 2024-01-21 10/week @ 2024-01-28 61/week @ 2024-02-04 22/week @ 2024-02-11

118 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
~45K SLoC