Skip to content

Commit 8ec7b47

Browse files
committed
fixes
1 parent a0afaf3 commit 8ec7b47

32 files changed

+8332
-6916
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ bevy_text_bindings = ["bevy_mod_scripting_functions/bevy_text"]
7474
bevy_time_bindings = ["bevy_mod_scripting_functions/bevy_time"]
7575
bevy_transform_bindings = ["bevy_mod_scripting_functions/bevy_transform"]
7676
bevy_window_bindings = ["bevy_mod_scripting_functions/bevy_window"]
77-
bevy_winit_bindings = ["bevy_mod_scripting_functions/bevy_winit"]
7877

7978
# optional
8079
unsafe_lua_modules = ["bevy_mod_scripting_lua?/unsafe_lua_modules"]

codegen/src/args.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ pub struct Args {
6363
/// The path to the bevy_mod_scripting_core crate, used to bootstrap necessary traits
6464
#[arg(global = true, long, default_value = ".")]
6565
pub bms_core_path: Utf8PathBuf,
66+
67+
/// Crates to exclude from code generation
68+
#[arg(
69+
global = true,
70+
short,
71+
long,
72+
default_value = "bevy_winit",
73+
use_value_delimiter = true,
74+
value_delimiter = ','
75+
)]
76+
pub exclude_crates: Option<Vec<String>>,
6677
}
6778

6879
#[derive(clap::Args, Debug, Clone, Default, Serialize, Deserialize)]

codegen/src/bin/main.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ fn main() {
6666
),
6767
)]));
6868

69-
let dependencies = graph
69+
let mut dependencies = graph
7070
.workspace
7171
.workspace_crates
7272
.iter()
@@ -77,6 +77,11 @@ fn main() {
7777
// log all dependencies
7878
debug!("Enabled dependencies: {}", dependencies.join(","));
7979

80+
if let Some(excluded_crates) = &args.exclude_crates {
81+
dependencies.retain(|c| !excluded_crates.contains(c));
82+
info!("Excluding crates: {excluded_crates:?}");
83+
}
84+
8085
Some(dependencies)
8186
} else {
8287
None

codegen/templates/footer.tera

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl {{item.import_path}} {
2525
{%- if arg.proxy_ty is matching("Mut.*")-%}
2626
mut {% endif -%}
2727
{{- arg.ident | to_arg_pattern() -}}
28-
: {{- arg.proxy_ty -}},
28+
: {{ arg.proxy_ty -}},
2929
{%- endfor -%}
3030
) -> {{ function.output.proxy_ty }} {
3131
let output: {{ function.output.proxy_ty }} =

crates/bevy_mod_scripting_functions/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ bevy_text = ["dep:bevy_text"]
3535
bevy_time = ["dep:bevy_time"]
3636
bevy_transform = ["dep:bevy_transform"]
3737
bevy_window = ["dep:bevy_window"]
38-
bevy_winit = ["dep:bevy_winit"]
3938

4039
core_functions = []
4140
lua_bindings = ["bevy_mod_scripting_lua"]
@@ -81,6 +80,7 @@ bevy_color = { version = "0.16.0", default-features = false, optional = true }
8180
bevy_core_pipeline = { version = "0.16.0", default-features = false, optional = true }
8281
bevy_gizmos = { version = "0.16.0", default-features = false, optional = true, features = [
8382
"bevy_render",
83+
"bevy_pbr",
8484
] }
8585
bevy_gltf = { version = "0.16.0", default-features = false, optional = true }
8686
bevy_image = { version = "0.16.0", default-features = false, optional = true }
@@ -97,9 +97,6 @@ bevy_sprite = { version = "0.16.0", default-features = false, optional = true, f
9797
] }
9898
bevy_text = { version = "0.16.0", default-features = false, optional = true }
9999
bevy_window = { version = "0.16.0", default-features = false, optional = true }
100-
bevy_winit = { version = "0.16.0", default-features = false, optional = true, features = [
101-
"custom_cursor",
102-
] }
103100

104101
profiling = { workspace = true }
105102

0 commit comments

Comments
 (0)