Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/crates/bevy_math/Cargo.toml
6592 views
1
[package]
2
name = "bevy_math"
3
version = "0.17.0-dev"
4
edition = "2024"
5
description = "Provides math functionality for Bevy Engine"
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
[dependencies]
13
glam = { version = "0.30.1", default-features = false, features = ["bytemuck"] }
14
thiserror = { version = "2", default-features = false }
15
derive_more = { version = "2", default-features = false, features = [
16
"from",
17
"into",
18
] }
19
itertools = { version = "0.14.0", default-features = false }
20
serde = { version = "1", default-features = false, features = [
21
"derive",
22
], optional = true }
23
libm = { version = "0.2", optional = true }
24
approx = { version = "0.5", default-features = false, optional = true }
25
rand = { version = "0.9", default-features = false, optional = true }
26
rand_distr = { version = "0.5", optional = true }
27
smallvec = { version = "1", default-features = false }
28
bevy_reflect = { path = "../bevy_reflect", version = "0.17.0-dev", default-features = false, features = [
29
"glam",
30
], optional = true }
31
variadics_please = "1.1"
32
33
[dev-dependencies]
34
approx = "0.5"
35
# Supply rngs for examples and tests
36
rand = "0.9"
37
rand_chacha = "0.9"
38
# Enable the approx feature when testing.
39
bevy_math = { path = ".", default-features = false, features = ["approx"] }
40
glam = { version = "0.30.1", default-features = false, features = ["approx"] }
41
42
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
43
getrandom = { version = "0.3", default-features = false, features = [
44
"wasm_js",
45
] }
46
47
[features]
48
default = ["std", "rand", "curve"]
49
std = [
50
"alloc",
51
"glam/std",
52
"derive_more/std",
53
"itertools/use_std",
54
"serde?/std",
55
"approx?/std",
56
"rand?/std",
57
"rand_distr?/std",
58
"bevy_reflect?/std",
59
]
60
alloc = [
61
"itertools/use_alloc",
62
"serde?/alloc",
63
"rand?/alloc",
64
"rand_distr?/alloc",
65
]
66
67
serialize = ["dep:serde", "glam/serde"]
68
# Enable approx for glam types to approximate floating point equality comparisons and assertions
69
approx = ["dep:approx", "glam/approx"]
70
# Enable interoperation of glam types with mint-compatible libraries
71
mint = ["glam/mint"]
72
# Enable libm mathematical functions for glam types to ensure consistent outputs
73
# across platforms at the cost of losing hardware-level optimization using intrinsics
74
libm = ["dep:libm", "glam/libm"]
75
# Enable assertions to check the validity of parameters passed to glam
76
glam_assert = ["glam/glam-assert"]
77
# Enable assertions in debug builds to check the validity of parameters passed to glam
78
debug_glam_assert = ["glam/debug-glam-assert"]
79
# Enable the rand dependency for shape_sampling
80
rand = ["dep:rand", "dep:rand_distr", "glam/rand"]
81
# Include code related to the Curve trait
82
curve = []
83
# Enable bevy_reflect (requires alloc)
84
bevy_reflect = ["dep:bevy_reflect", "alloc"]
85
# Enable libm mathematical functions as a fallback for no_std environments.
86
# Can be overridden with std feature.
87
nostd-libm = ["dep:libm", "glam/nostd-libm"]
88
89
[lints]
90
workspace = true
91
92
[package.metadata.docs.rs]
93
rustdoc-args = ["-Zunstable-options", "--generate-link-to-definition"]
94
all-features = true
95
96