@@ -9,25 +9,55 @@ license = "MIT OR Apache-2.0"
99keywords = [" bevy" ]
1010
1111[features ]
12- trace = [" tracing-error" ]
13- trace_tracy_memory = [" dep:tracy-client" ]
12+ default = [" std" ]
13+ trace = [" std" , " dep:tracing-error" ]
14+ trace_tracy_memory = [" std" , " dep:tracy-client" ]
15+
16+ # Platform Compatibility
17+
18+ # Allows access to the `std` crate. Enabling this feature will prevent compilation
19+ # on `no_std` targets, but provides access to certain additional features on
20+ # supported platforms.
21+ std = [
22+ " bevy_app/std" ,
23+ " bevy_utils/std" ,
24+ " bevy_ecs/std" ,
25+ " tracing/std" ,
26+ " tracing-subscriber/std" ,
27+ " tracing-log/std" ,
28+ ]
29+
30+ # # `critical-section` provides the building blocks for synchronization primitives
31+ # # on all platforms, including `no_std`.
32+ critical-section = [
33+ # TODO: wait for `tracing-subscriber` release
34+ # "tracing-subscriber/critical-section"
35+ ]
36+
37+ # Enables use of browser APIs.
38+ # Note this is currently only applicable on `wasm32` architectures.
39+ web = [" bevy_app/web" , " dep:tracing-wasm" ]
1440
1541[dependencies ]
1642# bevy
17- bevy_app = { path = " ../bevy_app" , version = " 0.18.0-dev" }
18- bevy_utils = { path = " ../bevy_utils" , version = " 0.18.0-dev" }
19- bevy_platform = { path = " ../bevy_platform" , version = " 0.18.0-dev" }
20- bevy_ecs = { path = " ../bevy_ecs" , version = " 0.18.0-dev" }
43+ bevy_app = { path = " ../bevy_app" , version = " 0.18.0-dev" , default-features = false }
44+ bevy_utils = { path = " ../bevy_utils" , version = " 0.18.0-dev" , default-features = false }
45+ bevy_platform = { path = " ../bevy_platform" , version = " 0.18.0-dev" , default-features = false }
46+ bevy_ecs = { path = " ../bevy_ecs" , version = " 0.18.0-dev" , default-features = false }
2147
2248# other
23- tracing-subscriber = { version = " 0.3.20" , features = [
49+ tracing-subscriber = { version = " 0.3.20" , default-features = false , features = [
2450 " registry" ,
2551 " env-filter" ,
52+ " fmt" ,
53+ " tracing-log" ,
2654] }
2755tracing-chrome = { version = " 0.7.0" , optional = true }
28- tracing-log = " 0.2.0"
56+ tracing-log = { version = " 0.2.0" , default-features = false , features = [
57+ " log-tracer" ,
58+ ] }
2959tracing-error = { version = " 0.2.0" , optional = true }
30- tracing = { version = " 0.1" , default-features = false , features = [ " std " ] }
60+ tracing = { version = " 0.1" , default-features = false }
3161
3262# Tracy dependency compatibility table:
3363# https://github.com/nagisa/rust_tracy_client
@@ -38,15 +68,17 @@ tracy-client = { version = "0.18.3", optional = true }
3868android_log-sys = " 0.3.0"
3969
4070[target .'cfg(target_arch = "wasm32")' .dependencies ]
41- tracing-wasm = " 0.2.1"
42- # TODO: Assuming all wasm builds are for the browser. Require `no_std` support to break assumption.
43- bevy_app = { path = " ../bevy_app" , version = " 0.18.0-dev" , default-features = false , features = [
44- " web" ,
45- ] }
71+ tracing-wasm = { version = " 0.2.1" , optional = true }
4672
4773[target .'cfg(target_os = "ios")' .dependencies ]
4874tracing-oslog = " 0.3"
4975
76+ [target .'cfg(not(all(target_has_atomic = "8", target_has_atomic = "16", target_has_atomic = "32", target_has_atomic = "64", target_has_atomic = "ptr")))' .dependencies ]
77+ tracing-subscriber = { version = " 0.3.1" , default-features = false , features = [
78+ # TODO: wait for `tracing-subscriber` release
79+ # "portable-atomic",
80+ ] }
81+
5082[lints ]
5183workspace = true
5284
0 commit comments