mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-28 08:58:07 +00:00
conditional compilation of async compat (#95)
Problems with the previous code: - `async-compat` is necessary for headless mode (cli server rendering) to load remote scenes from the API without blowing up. Without it, the code complains about the lack of a Tokio runtime. - Unfortunately, `async-compat` doesn't work with WASM and the entire web build is broken by its presence. This change introduces conditional compilation so `async-compat` is only leveraged in headless mode.
This commit is contained in:
@@ -15,6 +15,7 @@ path = "src/main.rs"
|
||||
[[bin]]
|
||||
name = "studio-headless"
|
||||
path = "src/main-headless.rs"
|
||||
required-features = ["headless_cli"]
|
||||
|
||||
[dependencies]
|
||||
bevy-inspector-egui = "0.22.0"
|
||||
@@ -69,6 +70,7 @@ wasm = [
|
||||
"bevy_rapier3d/wasm-bindgen",
|
||||
]
|
||||
desktop = []
|
||||
headless_cli = []
|
||||
|
||||
[dependencies.bevy]
|
||||
workspace = true
|
||||
|
||||
Reference in New Issue
Block a user