| 1 |
[package] |
| 2 |
name = "glam" |
| 3 |
version = "0.30.10" # remember to update html_root_url |
| 4 |
edition = "2021" |
| 5 |
authors = ["Cameron Hart <[email protected]>"] |
| 6 |
description = "A simple and fast 3D math library for games and graphics" |
| 7 |
repository = "https://github.com/bitshifter/glam-rs" |
| 8 |
readme = "README.md" |
| 9 |
license = "MIT OR Apache-2.0" |
| 10 |
keywords = ["gamedev", "math", "matrix", "vector", "quaternion"] |
| 11 |
categories = ["game-engines", "no-std"] |
| 12 |
rust-version = "1.68.2" |
| 13 |
|
| 14 |
[badges] |
| 15 |
maintenance = { status = "actively-developed" } |
| 16 |
|
| 17 |
[features] |
| 18 |
default = ["std"] |
| 19 |
|
| 20 |
# enable support for the standard library |
| 21 |
std = [] |
| 22 |
|
| 23 |
# enable additional glam checks if debug assertions are enabled |
| 24 |
debug-glam-assert = [] |
| 25 |
# always enable additional glam checks |
| 26 |
glam-assert = [] |
| 27 |
|
| 28 |
# this is primarily for testing the fallback implementation |
| 29 |
scalar-math = [] |
| 30 |
|
| 31 |
# align types to match CUDA requirements |
| 32 |
cuda = [] |
| 33 |
|
| 34 |
# Enables platform specific optimizations that might speed-up certain operations. |
| 35 |
# This will cause APIs to output different results depending on the platform used |
| 36 |
# and will likely break cross-platform determinism. |
| 37 |
# This should NOT be enabled by intermediate libraries, deferring the decision to |
| 38 |
# the end binary build instead. |
| 39 |
fast-math = [] |
| 40 |
|
| 41 |
serde = ["dep:serde_core"] |
| 42 |
|
| 43 |
# experimental nightly portable-simd support |
| 44 |
core-simd = ["bytemuck?/nightly_portable_simd"] |
| 45 |
|
| 46 |
bytecheck = ["rkyv/bytecheck"] |
| 47 |
|
| 48 |
zerocopy = ["dep:zerocopy", "dep:zerocopy-derive"] |
| 49 |
|
| 50 |
# enables libm and prefers it over std |
| 51 |
libm = ["dep:libm"] |
| 52 |
|
| 53 |
# enables libm but will prefer std if available |
| 54 |
nostd-libm = ["dep:libm"] |
| 55 |
|
| 56 |
[dependencies] |
| 57 |
approx = { version = "0.5", optional = true, default-features = false } |
| 58 |
bytemuck = { version = "1.9", optional = true, default-features = false, features = ["derive", "aarch64_simd", "wasm_simd"] } |
| 59 |
mint = { version = "0.5.8", optional = true, default-features = false } |
| 60 |
rand = { version = "0.9", optional = true, default-features = false } |
| 61 |
serde_core = { version = "1.0", optional = true, default-features = false } |
| 62 |
rkyv = { version = "0.8", optional = true, default-features = false } |
| 63 |
libm = { version = "0.2", optional = true, default-features = false } |
| 64 |
speedy = { version = "0.8", optional = true, default-features = false } |
| 65 |
encase = { version = "0.12", optional = true, default-features = false } |
| 66 |
zerocopy = { version = "0.8", optional = true, default-features = false, features = ["simd"] } |
| 67 |
zerocopy-derive = { version = "0.8", optional = true, default-features = false } |
| 68 |
arbitrary = { version = "1.4.2", default-features = false, optional = true } |
| 69 |
|
| 70 |
[dev-dependencies] |
| 71 |
# rand_xoshiro is required for tests if rand is enabled |
| 72 |
rand_xoshiro = "0.7" |
| 73 |
# "alloc" is needed to support to_bytes()/deserialize() in tests. |
| 74 |
rkyv = { version = "0.8", default-features = false, features = ["alloc"] } |
| 75 |
serde_json = "1.0" |
| 76 |
|
| 77 |
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] |
| 78 |
criterion = { version = "0.8", features = ["html_reports"] } |
| 79 |
iai-callgrind = "0.16" |
| 80 |
|
| 81 |
[target.'cfg(target_arch = "wasm32")'.dev-dependencies] |
| 82 |
wasm-bindgen-test = "0.3" |
| 83 |
|
| 84 |
[lib] |
| 85 |
bench = false |
| 86 |
|
| 87 |
[[bench]] |
| 88 |
name = "mat2" |
| 89 |
harness = false |
| 90 |
|
| 91 |
[[bench]] |
| 92 |
name = "mat3" |
| 93 |
harness = false |
| 94 |
|
| 95 |
[[bench]] |
| 96 |
name = "mat3a" |
| 97 |
harness = false |
| 98 |
|
| 99 |
[[bench]] |
| 100 |
name = "affine2" |
| 101 |
harness = false |
| 102 |
|
| 103 |
[[bench]] |
| 104 |
name = "affine3" |
| 105 |
harness = false |
| 106 |
|
| 107 |
[[bench]] |
| 108 |
name = "mat4" |
| 109 |
harness = false |
| 110 |
|
| 111 |
[[bench]] |
| 112 |
name = "quat" |
| 113 |
harness = false |
| 114 |
|
| 115 |
[[bench]] |
| 116 |
name = "support" |
| 117 |
bench = false |
| 118 |
|
| 119 |
[[bench]] |
| 120 |
name = "vec2" |
| 121 |
harness = false |
| 122 |
|
| 123 |
[[bench]] |
| 124 |
name = "vec3" |
| 125 |
harness = false |
| 126 |
|
| 127 |
[[bench]] |
| 128 |
name = "vec3a" |
| 129 |
harness = false |
| 130 |
|
| 131 |
[[bench]] |
| 132 |
name = "vec4" |
| 133 |
harness = false |
| 134 |
|
| 135 |
[[bench]] |
| 136 |
name = "iai" |
| 137 |
harness = false |
| 138 |
|
| 139 |
[workspace] |
| 140 |
members = [ |
| 141 |
"codegen", |
| 142 |
"swizzlegen", |
| 143 |
"test_no_std", |
| 144 |
] |
| 145 |
|
| 146 |
[lints.rust] |
| 147 |
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_arch, values("spirv"))'] } |