Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/crates/bevy_reflect/Cargo.toml
9395 views
1
[package]
2
name = "bevy_reflect"
3
version = "0.19.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.87.0"
11
12
[features]
13
default = ["std", "smallvec", "indexmap", "debug", "auto_register_inventory"]
14
15
# Features
16
17
## When enabled, allows documentation comments to be accessed via reflection
18
reflect_documentation = ["bevy_reflect_derive/reflect_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 `indexmap` types.
40
indexmap = ["dep:indexmap"]
41
42
## Adds reflection support to `petgraph` types.
43
petgraph = ["dep:petgraph", "std"]
44
45
## Adds reflection support to `smallvec` types.
46
smallvec = ["dep:smallvec"]
47
48
## Adds reflection support to `uuid` types.
49
uuid = ["dep:uuid"]
50
51
## Adds reflection support to `wgpu-types` types.
52
wgpu-types = ["dep:wgpu-types"]
53
54
# Platform Compatibility
55
56
## Allows access to the `std` crate. Enabling this feature will prevent compilation
57
## on `no_std` targets, but provides access to certain additional features on
58
## supported platforms.
59
std = [
60
"erased-serde/std",
61
"downcast-rs/std",
62
"serde/std",
63
"glam?/std",
64
"smol_str?/std",
65
"uuid?/std",
66
"bevy_platform/std",
67
"wgpu-types?/std",
68
]
69
70
## `critical-section` provides the building blocks for synchronization primitives
71
## on all platforms, including `no_std`.
72
critical-section = ["bevy_platform/critical-section"]
73
74
# Enables automatic reflect registration. Does nothing by itself,
75
# must select `auto_register_inventory` or `auto_register_static` to make it work.
76
auto_register = []
77
## Enables automatic reflect registration using inventory. Not supported on all platforms.
78
auto_register_inventory = [
79
"auto_register",
80
"bevy_reflect_derive/auto_register_inventory",
81
"dep:inventory",
82
]
83
## Enable automatic reflect registration without inventory. This feature has precedence over `auto_register_inventory`.
84
## See `load_type_registrations` for more info.
85
auto_register_static = [
86
"auto_register",
87
"bevy_reflect_derive/auto_register_static",
88
]
89
90
## Enables use of browser APIs.
91
## Note this is currently only applicable on `wasm32` architectures.
92
web = ["bevy_platform/web", "uuid?/js"]
93
94
[dependencies]
95
# bevy
96
bevy_reflect_derive = { path = "derive", version = "0.19.0-dev" }
97
bevy_utils = { path = "../bevy_utils", version = "0.19.0-dev", default-features = false }
98
bevy_ptr = { path = "../bevy_ptr", version = "0.19.0-dev" }
99
bevy_platform = { path = "../bevy_platform", version = "0.19.0-dev", default-features = false, features = [
100
"alloc",
101
"serialize",
102
] }
103
104
# used by bevy-utils, but it also needs reflect impls
105
foldhash = { version = "0.2.0", default-features = false }
106
hashbrown = { version = "0.16.0", optional = true, default-features = false }
107
108
# other
109
erased-serde = { version = "0.4", default-features = false, features = [
110
"alloc",
111
] }
112
disqualified = { version = "1.0", default-features = false }
113
downcast-rs = { version = "2", default-features = false }
114
thiserror = { version = "2", default-features = false }
115
derive_more = { version = "2", default-features = false, features = ["from"] }
116
serde = { version = "1", default-features = false, features = ["alloc"] }
117
assert_type_match = "0.1.1"
118
smallvec = { version = "1", default-features = false, optional = true }
119
glam = { version = "0.31.0", default-features = false, features = [
120
"serde",
121
], optional = true }
122
indexmap = { version = "2.5.0", default-features = false, optional = true }
123
petgraph = { version = "0.8", features = ["serde-1"], optional = true }
124
smol_str = { version = "0.2.0", default-features = false, features = [
125
"serde",
126
], optional = true }
127
uuid = { version = "1.13.1", default-features = false, optional = true, features = [
128
"v4",
129
"serde",
130
] }
131
variadics_please = "1.1"
132
wgpu-types = { version = "28", features = [
133
"serde",
134
], optional = true, default-features = false }
135
136
# deps for automatic type registration
137
inventory = { version = "0.3", optional = true }
138
139
[dev-dependencies]
140
ron = "0.12"
141
rmp-serde = "1.1"
142
postcard = { version = "1.0", features = ["alloc"] }
143
serde_json = "1.0.140"
144
serde = { version = "1", features = ["derive"] }
145
static_assertions = "1.1.0"
146
147
[[example]]
148
name = "reflect_docs"
149
path = "examples/reflect_docs.rs"
150
required-features = ["reflect_documentation"]
151
152
[lints]
153
workspace = true
154
155
[package.metadata.docs.rs]
156
rustdoc-args = ["-Zunstable-options", "--generate-link-to-definition"]
157
all-features = true
158
159