Skip to content

Commit 43d99bb

Browse files
committed
Remove bevy_dynamic_plugin as a default (#2578)
It doesn't compile on wasm, and it's full of footguns # Objective - If bevy is used with default features on wasm, there's more of a chance it will compile - Note that I haven't done a full audit - it's possible that there are other problematic crates ## Solution - `bevy_dynamic_plugin` is no longer a default plugin - I've also done an accidental drive by reformatting of the root `Cargo.toml`, as I have [Even Better Toml](https://github.com/tamasfe/taplo) installed. - (Please, rustfmt do this for us)
1 parent 54ff7aa commit 43d99bb

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

Cargo.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ members = ["crates/*", "examples/ios", "tools/ci"]
2222
[features]
2323
default = [
2424
"bevy_audio",
25-
"bevy_dynamic_plugin",
2625
"bevy_gilrs",
2726
"bevy_gltf",
2827
"bevy_wgpu",
@@ -38,7 +37,13 @@ default = [
3837
dynamic = ["bevy_dylib"]
3938

4039
# Rendering support (Also needs the bevy_wgpu feature or a third-party rendering backend)
41-
render = ["bevy_internal/bevy_pbr", "bevy_internal/bevy_render", "bevy_internal/bevy_sprite", "bevy_internal/bevy_text", "bevy_internal/bevy_ui"]
40+
render = [
41+
"bevy_internal/bevy_pbr",
42+
"bevy_internal/bevy_render",
43+
"bevy_internal/bevy_sprite",
44+
"bevy_internal/bevy_text",
45+
"bevy_internal/bevy_ui",
46+
]
4247

4348
# Optional bevy crates
4449
bevy_audio = ["bevy_internal/bevy_audio"]
@@ -82,14 +87,14 @@ subpixel_glyph_atlas = ["bevy_internal/subpixel_glyph_atlas"]
8287
bevy_ci_testing = ["bevy_internal/bevy_ci_testing"]
8388

8489
[dependencies]
85-
bevy_dylib = {path = "crates/bevy_dylib", version = "0.5.0", default-features = false, optional = true}
86-
bevy_internal = {path = "crates/bevy_internal", version = "0.5.0", default-features = false}
90+
bevy_dylib = { path = "crates/bevy_dylib", version = "0.5.0", default-features = false, optional = true }
91+
bevy_internal = { path = "crates/bevy_internal", version = "0.5.0", default-features = false }
8792

8893
[dev-dependencies]
8994
anyhow = "1.0.4"
9095
rand = "0.8.0"
9196
ron = "0.6.2"
92-
serde = {version = "1", features = ["derive"]}
97+
serde = { version = "1", features = ["derive"] }
9398
# Needed to poll Task examples
9499
futures-lite = "1.11.3"
95100

docs/cargo_features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
|feature name|description|
66
|-|-|
77
|bevy_audio|Audio support. Support for all audio formats depends on this.|
8-
|bevy_dynamic_plugin|Plugin for dynamic loading (libloading).|
98
|bevy_gilrs|Adds gamepad support.|
109
|bevy_gltf|[glTF](https://www.khronos.org/gltf/) support.|
1110
|bevy_winit|GUI support.|
@@ -20,6 +19,7 @@
2019

2120
|feature name|description|
2221
|-|-|
22+
|bevy_dynamic_plugin|Plugin for dynamic loading (using [libloading](https://crates.io/crates/libloading)).|
2323
|dynamic|Forces bevy to be dynamically linked, which improves iterative compile times.|
2424
|trace|Enables system tracing (useful in tandem with a feature like trace_chrome).|
2525
|trace_chrome|Enables [tracing-chrome](https://github.com/thoren-d/tracing-chrome) as bevy_log output. This allows you to visualize system execution.|

0 commit comments

Comments
 (0)