Skip to content

Commit

Permalink
Fix wasm build of bevy_egui
Browse files Browse the repository at this point in the history
  • Loading branch information
mattzque committed Mar 19, 2024
1 parent d781710 commit fe34b3a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
BEVY_ASSET_ROOT = "."

[build]
rustflags = ["-Z", "threads=8"]
rustflags = ["-Z", "threads=8", "--cfg=web_sys_unstable_apis"]
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_iconwars"
version = "0.1.5"
version = "0.1.6"
edition = "2021"
license = "MIT OR Apache-2.0"

Expand All @@ -22,10 +22,8 @@ thiserror = "1.0"
serde = "1.0"
serde_json = "1.0"
rand = "0.8"
bevy_prototype_lyon = "0.11"

[target.'cfg(target_arch = "x86_64")'.dependencies]
bevy_egui = "0.26"
bevy_prototype_lyon = "0.11"

# cargo build / cargo build --release --no-default-features
[features]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ can be adjusted in real-time, but it may crash the game.

## Changelog

* `v0.1.6` fix issue with wasm build of bevy_egui
* `v0.1.4` update bevy version and lock movement rotation
* `v0.1.3` (**this version was the Bevy Jam entry**) removed some verbose debug logging; fixed player allowed to shoot in dropzone
* `v0.1.2` fixed a bug where the game crashed when all music tracks were played
Expand Down
5 changes: 1 addition & 4 deletions src/game/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use bevy::prelude::*;
mod assets;
mod audio;
mod camera;
#[cfg(not(target_arch = "wasm32"))]
mod debug;
mod hud;
mod icons;
Expand All @@ -28,8 +27,6 @@ impl Plugin for GamePlugin {
hud::HudPlugin,
audio::AudioPlugin,
));
#[cfg(not(target_arch = "wasm32"))]
app.add_plugins(debug::DebugPlugin);
app.add_plugins(FrameTimeDiagnosticsPlugin);
app.add_plugins((debug::DebugPlugin, FrameTimeDiagnosticsPlugin));
}
}

0 comments on commit fe34b3a

Please sign in to comment.