#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

#2093 in Development tools

Download history 99/week @ 2024-11-23 4/week @ 2024-11-30 56/week @ 2024-12-07 47/week @ 2024-12-14 14/week @ 2024-12-28 49/week @ 2025-01-11 39/week @ 2025-01-18 16/week @ 2025-01-25 758/week @ 2025-02-01 1500/week @ 2025-02-08 975/week @ 2025-02-15 1562/week @ 2025-02-22 1956/week @ 2025-03-01

6,370 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.3–2MB
~41K SLoC