Skip to content
Merged
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
crates/bevy_script_api/providers/*.rs linguist-generated
crates/bevy_script_api/providers/*.rs -diff -merge
crates/bevy_mod_scripting_functions/src/bevy_bindings/*.rs linguist-generated
crates/bevy_mod_scripting_functions/src/bevy_gindings/*.rs -diff -merge
115 changes: 90 additions & 25 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,45 +67,110 @@ rhai = ["bevy_mod_scripting_rhai", "bevy_mod_scripting_functions/rhai_bindings"]
# rune = ["bevy_mod_scripting_rune"]

### Profiling
profile_with_tracy = ["bevy/trace_tracy"]
profile_with_tracy = ["bevy?/trace_tracy", "dep:bevy"]

[dependencies]
bevy = { workspace = true }
bevy_math = { workspace = true }
bevy_reflect = { workspace = true }
bevy = { workspace = true, optional = true }
bevy_app = { workspace = true }
bevy_mod_scripting_core = { workspace = true }
bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", version = "0.15.1", optional = true }
bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.15.1", optional = true }
# bevy_mod_scripting_rune = { path = "crates/languages/bevy_mod_scripting_rune", version = "0.9.0-alpha.2", optional = true }
bevy_mod_scripting_lua = { workspace = true, optional = true }
bevy_mod_scripting_rhai = { workspace = true, optional = true }
bevy_mod_scripting_functions = { workspace = true }
bevy_mod_scripting_derive = { workspace = true }

[workspace.dependencies]
profiling = { version = "1.0" }

bevy = { version = "0.16.0", default-features = false }
bevy_math = { version = "0.16.0" }
bevy_reflect = { version = "0.16.0" }
bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.15.1" }
# local crates
script_integration_test_harness = { path = "crates/testing_crates/script_integration_test_harness" }
test_utils = { path = "crates/testing_crates/test_utils" }
bevy_mod_scripting_functions = { path = "crates/bevy_mod_scripting_functions", version = "0.15.1", default-features = false }
bevy_mod_scripting_derive = { path = "crates/bevy_mod_scripting_derive", version = "0.15.1" }
bevy_system_reflection = { path = "crates/bevy_system_reflection", version = "0.2.0", default-features = false }
ladfile = { path = "crates/ladfile", version = "0.5.0" }
ladfile_builder = { path = "crates/ladfile_builder", version = "0.5.1" }
bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", version = "0.15.1", default-features = false }
bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.15.1", default-features = false }
# bevy

# test utilities
script_integration_test_harness = { path = "crates/testing_crates/script_integration_test_harness" }
test_utils = { path = "crates/testing_crates/test_utils" }
bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.15.1" }
bevy = { version = "0.16.0", default-features = false }
bevy_math = { version = "0.16.0", default-features = false, features = ["std"] }
bevy_transform = { version = "0.16.0", default-features = false }
bevy_reflect = { version = "0.16.0", default-features = false }
bevy_ecs = { version = "0.16.0", default-features = false }
bevy_asset = { version = "0.16.0", default-features = false }
bevy_app = { version = "0.16.0", default-features = false }
bevy_log = { version = "0.16.0", default-features = false }
bevy_internal = { version = "0.16.0", default-features = false }
bevy_diagnostic = { version = "0.16.0", default-features = false }
bevy_platform = { version = "0.16.0", default-features = false }
bevy_time = { version = "0.16.0", default-features = false }
bevy_input = { version = "0.16.0", default-features = false }
glam = { version = "0.29.3", default-features = false }
uuid = { version = "1.11", default-features = false }
smol_str = { version = "0.2.0", default-features = false }

# other
serde_json = { version = "1.0", default-features = false }
indexmap = { version = "2.7", default-features = false, features = ["std"] }
profiling = { version = "1.0", default-features = false, features = [
"procmacros",
] }
regex = { version = "1.11", default-features = false }
serde = { version = "1.0", default-features = false }
dot-writer = { version = "0.1.4", default-features = false }
parking_lot = { version = "0.12.1", default-features = false }
strum = { version = "0.26", default-features = false }
rhai = { version = "1.21", default-features = false }
mlua = { version = "0.10", default-features = false }
log = { version = "0.4", default-features = false }
env_logger = { version = "0.11", default-features = false }
clap = { version = "4", default-features = false }
mdbook = { version = "0.4", default-features = false }
quote = { version = "1.0", default-features = false }
syn = { version = "2.0", default-features = false }
proc-macro2 = { version = "1.0", default-features = false }
smallvec = { version = "1.11", default-features = false }
itertools = { version = "0.14", default-features = false }
fixedbitset = { version = "0.5", default-features = false }
variadics_please = { version = "1.1.0", default-features = false }
anyhow = { version = "1.0", default-features = false }


# development and testing

pretty_assertions = { version = "1.4", default-features = false, features = [
"std",
] }
manifest-dir-macros = { version = "0.1.18", default-features = false }
assert_cmd = { version = "2.0", default-features = false }
tokio = { version = "1", default-features = false }
bevy_console = { version = "0.14", default-features = false }
tracing-tracy = { version = "0.11", default-features = false }
libtest-mimic = { version = "0.8", default-features = false }
criterion = { version = "0.5", default-features = false }
rand = { version = "0.9", default-features = false }
rand_chacha = { version = "0.9", default-features = false }

[dev-dependencies]
bevy = { workspace = true, default-features = true, features = ["std"] }
clap = { version = "4.1", features = ["derive"] }
rand = "0.9.1"
criterion = { version = "0.5" }
ladfile_builder = { path = "crates/ladfile_builder", version = "0.5.1" }
bevy = { workspace = true, features = [
"bevy_render",
"bevy_window",
"bevy_asset",
"bevy_core_pipeline",
"bevy_sprite",
] }
bevy_platform = { workspace = true }
clap = { workspace = true, features = ["derive"] }
rand = { workspace = true, features = ["thread_rng"] }
criterion = { workspace = true }
ladfile_builder = { workspace = true }
script_integration_test_harness = { workspace = true }
test_utils = { workspace = true }
libtest-mimic = "0.8"
tracing-tracy = "0.11"
regex = "1.11"
bevy_console = "0.14"
libtest-mimic = { workspace = true }
tracing-tracy = { workspace = true }
regex = { workspace = true }
bevy_console = { workspace = true }


[workspace]
members = [
Expand Down
3 changes: 2 additions & 1 deletion benches/benchmarks.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
extern crate bevy_mod_scripting;
extern crate script_integration_test_harness;
extern crate test_utils;
use std::{collections::HashMap, path::PathBuf, sync::LazyLock, time::Duration};
use bevy_platform::collections::HashMap;
use std::{path::PathBuf, sync::LazyLock, time::Duration};

use bevy::{
log::{
Expand Down
4 changes: 2 additions & 2 deletions codegen/templates/footer.tera
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ impl {{item.import_path}} {
}
{% endfor %}

impl ::bevy::app::Plugin for {{ "ScriptingPlugin" | prefix_cratename | convert_case(case="upper_camel")}} {
fn build(&self, app: &mut ::bevy::prelude::App) {
impl Plugin for {{ "ScriptingPlugin" | prefix_cratename | convert_case(case="upper_camel")}} {
fn build(&self, app: &mut App) {
let mut world = app.world_mut();

{% for item in items %}
Expand Down
2 changes: 2 additions & 0 deletions codegen/templates/header.tera
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ use bevy_mod_scripting_core::{
function::{from::{Ref, Mut, Val}, namespace::{NamespaceBuilder}}
}
};
use bevy_ecs::{prelude::*};


use bevy_mod_scripting_derive::script_bindings;

Expand Down
8 changes: 1 addition & 7 deletions codegen/templates/import.tera
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
{%- if import is starting_with("bevy_") -%}
bevy::{{- import | substring(start=5) -}}
{%- elif import is starting_with("glam::") -%}
bevy::math::{{- import | substring(start=6) -}}
{%- else -%}
::{{import}}
{%- endif -%}
::{{import}}
2 changes: 1 addition & 1 deletion codegen/templates/macros.tera
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn index(_self: Self, idx: usize, lua: &tealr::mlu::mlua::Lua) -> Result<tealr::
_ => "unknown_axis"
};

let parsed_path = ::bevy::reflect::ParsedPath::parse_static(path).expect("invariant");
let parsed_path = ::bevy_reflect::ParsedPath::parse_static(path).expect("invariant");
curr_ref.index_path(bevy_mod_scripting_core::bindings::ReflectionPathElem::new_reflection(parsed_path));
crate::bindings::reference::LuaReflectReference(curr_ref).to_lua_proxy(lua)
}
Expand Down
39 changes: 21 additions & 18 deletions crates/bevy_mod_scripting_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,32 @@ mlua_impls = ["mlua"]
rhai_impls = ["rhai"]

[dependencies]
mlua = { version = "0.10", default-features = false, optional = true }
rhai = { version = "1.21", default-features = false, features = [
"sync",
], optional = true }
bevy = { workspace = true, default-features = false, features = [
"bevy_asset",
"std",
] }
parking_lot = "0.12.1"
smallvec = "1.11"
itertools = "0.14"
mlua = { workspace = true, optional = true }
rhai = { workspace = true, features = ["sync"], optional = true }

bevy_reflect = { workspace = true, default-features = false, features = [] }
bevy_ecs = { workspace = true, default-features = false, features = [] }
bevy_app = { workspace = true, default-features = false, features = [] }
bevy_log = { workspace = true, default-features = false, features = [] }
bevy_asset = { workspace = true, default-features = false, features = [] }
bevy_diagnostic = { workspace = true, default-features = false, features = [] }
bevy_platform = { workspace = true, default-features = false, features = [] }

parking_lot = { workspace = true }
smallvec = { workspace = true }
itertools = { workspace = true }
profiling = { workspace = true }
bevy_mod_scripting_derive = { workspace = true }
fixedbitset = "0.5"
bevy_system_reflection = { path = "../bevy_system_reflection", version = "0.2.0" }
serde = { version = "1.0", features = ["derive"] }
uuid = "1.11"
variadics_please = "1.1.0"
fixedbitset = { workspace = true }
bevy_system_reflection = { workspace = true }
serde = { workspace = true, features = ["derive"] }
uuid = { workspace = true }
variadics_please = { workspace = true }

[dev-dependencies]
test_utils = { workspace = true }
tokio = { version = "1", features = ["rt", "macros"] }
pretty_assertions = "1.4"
tokio = { workspace = true, features = ["rt", "macros"] }
pretty_assertions = { workspace = true, features = ["alloc"] }

[lints]
workspace = true
Loading
Loading