diff --git a/examples/dodge-the-creeps/rust/Cargo.toml b/examples/dodge-the-creeps/rust/Cargo.toml index b2b51ac3e..4797baef7 100644 --- a/examples/dodge-the-creeps/rust/Cargo.toml +++ b/examples/dodge-the-creeps/rust/Cargo.toml @@ -8,5 +8,5 @@ publish = false crate-type = ["cdylib"] [dependencies] -godot = { path = "../../../godot", features = ["minimal"] } +godot = { path = "../../../godot", default-features = false, features = ["formatted", "convenience"] } rand = "0.8" diff --git a/godot-codegen/Cargo.toml b/godot-codegen/Cargo.toml index 5327ab6f6..9ef07e5c7 100644 --- a/godot-codegen/Cargo.toml +++ b/godot-codegen/Cargo.toml @@ -3,11 +3,13 @@ name = "godot-codegen" version = "0.1.0" edition = "2021" rust-version = "1.63" +license = "MPL-2.0" +keywords = ["gamedev", "godot", "engine", "codegen"] +categories = ["game-engines", "graphics"] -# Note: features not additive, but this is an internal crate [features] codegen-fmt = [] -minimal = ["codegen-fmt"] +codegen-full = [] [dependencies] quote = "1" diff --git a/godot-codegen/src/class_generator.rs b/godot-codegen/src/class_generator.rs index 515ecbddf..19d78cdb5 100644 --- a/godot-codegen/src/class_generator.rs +++ b/godot-codegen/src/class_generator.rs @@ -26,7 +26,7 @@ pub(crate) fn generate_class_files( let mut modules = vec![]; for class in api.classes.iter() { - #[cfg(feature = "minimal")] + #[cfg(not(feature = "codegen-full"))] if !crate::SELECTED_CLASSES.contains(&class.name.as_str()) { continue; } @@ -277,7 +277,7 @@ fn make_enums(enums: &Option>, _class_name: &str, _ctx: &Context) } } -#[cfg(feature = "minimal")] +#[cfg(not(feature = "codegen-full"))] fn is_type_excluded(ty: &str, ctx: &mut Context) -> bool { let is_class_excluded = |class: &str| !crate::SELECTED_CLASSES.contains(&class); @@ -308,7 +308,7 @@ fn is_method_excluded(method: &Method, #[allow(unused_variables)] ctx: &mut Cont // As such support could be added later (if at all), with possibly safe interfaces (e.g. Vec for void*+size pairs) // -- FIXME remove when impl complete - #[cfg(feature = "minimal")] + #[cfg(not(feature = "codegen-full"))] if method .return_value .as_ref() @@ -333,12 +333,12 @@ fn is_method_excluded(method: &Method, #[allow(unused_variables)] ctx: &mut Cont .map_or(false, |args| args.iter().any(|arg| arg.type_.contains("*"))) } -#[cfg(not(feature = "minimal"))] +#[cfg(feature = "codegen-full")] fn is_function_excluded(_function: &UtilityFunction, _ctx: &mut Context) -> bool { false } -#[cfg(feature = "minimal")] +#[cfg(not(feature = "codegen-full"))] fn is_function_excluded(function: &UtilityFunction, ctx: &mut Context) -> bool { function .return_type diff --git a/godot-codegen/src/context.rs b/godot-codegen/src/context.rs index 5abdfa423..9802b2b22 100644 --- a/godot-codegen/src/context.rs +++ b/godot-codegen/src/context.rs @@ -32,7 +32,8 @@ impl<'a> Context<'a> { for class in api.classes.iter() { let class_name = class.name.as_str(); - #[cfg(feature = "minimal")] + + #[cfg(not(feature = "codegen-full"))] if !crate::SELECTED_CLASSES.contains(&class_name) { continue; } diff --git a/godot-codegen/src/lib.rs b/godot-codegen/src/lib.rs index 8622a2e94..fa8b46cfd 100644 --- a/godot-codegen/src/lib.rs +++ b/godot-codegen/src/lib.rs @@ -188,7 +188,7 @@ struct GeneratedModule { // Shared config // Classes for minimal config -#[cfg(feature = "minimal")] +#[cfg(not(feature = "codegen-full"))] const SELECTED_CLASSES: &[&str] = &[ "AnimatedSprite2D", "Area2D", diff --git a/godot-core/Cargo.toml b/godot-core/Cargo.toml index 34194ba19..1367d252d 100644 --- a/godot-core/Cargo.toml +++ b/godot-core/Cargo.toml @@ -8,11 +8,11 @@ keywords = ["gamedev", "godot", "engine", "2d", "3d"] # possibly: "ffi" categories = ["game-engines", "graphics"] [features] -default = ["convenience"] +default = [] trace = [] -convenience = [] codegen-fmt = ["godot-ffi/codegen-fmt"] -minimal = ["godot-ffi/minimal"] +codegen-full = ["godot-codegen/codegen-full"] +convenience = [] unit-test = ["godot-ffi/unit-test"] # If this crate is built for a downstream unit test [dependencies] diff --git a/godot-ffi/Cargo.toml b/godot-ffi/Cargo.toml index a37f2c670..e42e4be7b 100644 --- a/godot-ffi/Cargo.toml +++ b/godot-ffi/Cargo.toml @@ -3,12 +3,15 @@ name = "godot-ffi" version = "0.1.0" edition = "2021" rust-version = "1.63" +license = "MPL-2.0" +keywords = ["gamedev", "godot", "engine", "ffi"] +categories = ["game-engines", "graphics"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] codegen-fmt = ["godot-codegen/codegen-fmt"] -minimal = ["godot-codegen/minimal"] +#codegen-full = ["godot-codegen/codegen-full"] unit-test = [] # If this crate is built for a downstream unit test [dependencies] diff --git a/godot-macros/Cargo.toml b/godot-macros/Cargo.toml index b46220766..237dcfbbc 100644 --- a/godot-macros/Cargo.toml +++ b/godot-macros/Cargo.toml @@ -3,6 +3,9 @@ name = "godot-macros" version = "0.1.0" edition = "2021" rust-version = "1.63" +license = "MPL-2.0" +keywords = ["gamedev", "godot", "engine", "derive", "macro"] +categories = ["game-engines", "graphics"] [lib] proc-macro = true diff --git a/godot/Cargo.toml b/godot/Cargo.toml index 37c0d0e28..976b30c42 100644 --- a/godot/Cargo.toml +++ b/godot/Cargo.toml @@ -3,13 +3,18 @@ name = "godot" version = "0.1.0" edition = "2021" rust-version = "1.63" +license = "MPL-2.0" +keywords = ["gamedev", "godot", "engine", "2d", "3d"] # possibly: "ffi" +categories = ["game-engines", "graphics"] [features] -default = ["convenience"] +default = ["convenience", "codegen-full"] +convenience = ["godot-core/convenience"] +formatted = ["godot-core/codegen-fmt"] trace = ["godot-core/trace"] -convenience = [] -codegen-fmt = ["godot-core/codegen-fmt"] -minimal = ["godot-core/minimal"] + +# Private features, they are under no stability guarantee +codegen-full = ["godot-core/codegen-full"] unit-test = [] [dependencies] diff --git a/itest/rust/Cargo.toml b/itest/rust/Cargo.toml index 955f39144..f22fdfdb5 100644 --- a/itest/rust/Cargo.toml +++ b/itest/rust/Cargo.toml @@ -3,6 +3,7 @@ name = "itest" version = "0.1.0" edition = "2021" rust-version = "1.63" +publish = false [lib] crate-type = ["cdylib"] @@ -12,7 +13,7 @@ default = [] trace = ["godot/trace"] [dependencies] -godot = { path = "../../godot", features = ["minimal"] } +godot = { path = "../../godot", default-features = false, features = ["formatted", "convenience"] } [build-dependencies] quote = "1"