Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/crates/bevy_reflect/Cargo.toml
6595 views
1
[package]
2
name = "bevy_reflect"
3
version = "0.17.0-dev"
4
edition = "2024"
5
description = "Dynamically interact with rust types"
6
homepage = "https://bevy.org"
7
repository = "https://github.com/bevyengine/bevy"
8
license = "MIT OR Apache-2.0"
9
keywords = ["bevy"]
10
rust-version = "1.85.0"
11
12
[features]
13
default = ["std", "smallvec", "debug", "auto_register_inventory"]
14
15
# Features
16
17
## When enabled, allows documentation comments to be accessed via reflection
18
documentation = ["bevy_reflect_derive/documentation"]
19
20
## Enables function reflection
21
functions = ["bevy_reflect_derive/functions"]
22
23
# Debugging Features
24
25
## Enables features useful for debugging reflection
26
debug = ["debug_stack"]
27
28
## When enabled, keeps track of the current serialization/deserialization context for better error messages
29
debug_stack = ["std"]
30
31
# Integrations
32
33
## Adds reflection support to `glam` types.
34
glam = ["dep:glam"]
35
36
## Adds reflection support to `hashbrown` types.
37
hashbrown = ["dep:hashbrown"]
38
39
## Adds reflection support to `petgraph` types.
40
petgraph = ["dep:petgraph", "std"]
41
42
## Adds reflection support to `smallvec` types.
43
smallvec = ["dep:smallvec"]
44
45
## Adds reflection support to `uuid` types.
46
uuid = ["dep:uuid"]
47
48
## Adds reflection support to `wgpu-types` types.
49
wgpu-types = ["dep:wgpu-types"]
50
51
# Platform Compatibility
52
53
## Allows access to the `std` crate. Enabling this feature will prevent compilation
54
## on `no_std` targets, but provides access to certain additional features on
55
## supported platforms.
56
std = [
57
"erased-serde/std",
58
"downcast-rs/std",
59
"serde/std",
60
"glam?/std",
61
"smol_str?/std",
62
"uuid?/std",
63
"bevy_platform/std",
64
"wgpu-types?/std",
65
]
66
67
## `critical-section` provides the building blocks for synchronization primitives
68
## on all platforms, including `no_std`.
69
critical-section = ["bevy_platform/critical-section"]
70
71
# Enables automatic reflect registration. Does nothing by itself,
72
# must select `auto_register_inventory` or `auto_register_static` to make it work.
73
auto_register = []
74
## Enables automatic reflect registration using inventory. Not supported on all platforms.
75
auto_register_inventory = [
76
"auto_register",
77
"bevy_reflect_derive/auto_register_inventory",
78
"dep:inventory",
79
]
80
## Enable automatic reflect registration without inventory. This feature has precedence over `auto_register_inventory`.
81
## See `load_type_registrations` for more info.
82
auto_register_static = [
83
"auto_register",
84
"bevy_reflect_derive/auto_register_static",
85
]
86
87
## Enables use of browser APIs.
88
## Note this is currently only applicable on `wasm32` architectures.
89
web = ["bevy_platform/web", "uuid?/js"]
90
91
[dependencies]
92
# bevy
93
bevy_reflect_derive = { path = "derive", version = "0.17.0-dev" }
94
bevy_utils = { path = "../bevy_utils", version = "0.17.0-dev", default-features = false }
95
bevy_ptr = { path = "../bevy_ptr", version = "0.17.0-dev" }
96
bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev", default-features = false, features = [
97
"alloc",
98
"serialize",
99
] }
100
101
# used by bevy-utils, but it also needs reflect impls
102
foldhash = { version = "0.2.0", default-features = false }
103
hashbrown = { version = "0.16.0", optional = true, default-features = false }
104
105
# other
106
erased-serde = { version = "0.4", default-features = false, features = [
107
"alloc",
108
] }
109
disqualified = { version = "1.0", default-features = false }
110
downcast-rs = { version = "2", default-features = false }
111
thiserror = { version = "2", default-features = false }
112
derive_more = { version = "2", default-features = false, features = ["from"] }
113
serde = { version = "1", default-features = false, features = ["alloc"] }
114
assert_type_match = "0.1.1"
115
smallvec = { version = "1", default-features = false, optional = true }
116
glam = { version = "0.30.1", default-features = false, features = [
117
"serde",
118
], optional = true }
119
petgraph = { version = "0.8", features = ["serde-1"], optional = true }
120
smol_str = { version = "0.2.0", default-features = false, features = [
121
"serde",
122
], optional = true }
123
uuid = { version = "1.13.1", default-features = false, optional = true, features = [
124
"v4",
125
"serde",
126
] }
127
variadics_please = "1.1"
128
wgpu-types = { version = "26", features = [
129
"serde",
130
], optional = true, default-features = false }
131
132
# deps for automatic type registration
133
inventory = { version = "0.3", optional = true }
134
135
[dev-dependencies]
136
ron = "0.10"
137
rmp-serde = "1.1"
138
bincode = { version = "2.0", features = ["serde"] }
139
serde_json = "1.0.140"
140
serde = { version = "1", features = ["derive"] }
141
static_assertions = "1.1.0"
142
143
[[example]]
144
name = "reflect_docs"
145
path = "examples/reflect_docs.rs"
146
required-features = ["documentation"]
147
148
[lints]
149
workspace = true
150
151
[package.metadata.docs.rs]
152
rustdoc-args = ["-Zunstable-options", "--generate-link-to-definition"]
153
all-features = true
154
155