Make theinstant dependency optional, behind a profiler cargo feature

This commit is contained in:
Sébastien Crozet
2022-05-31 11:49:36 +02:00
parent fb1bfc762c
commit 10ca3474e6
10 changed files with 29 additions and 15 deletions

View File

@@ -29,6 +29,7 @@ wasm-bindgen = [ "instant/wasm-bindgen" ]
serde-serialize = [ "nalgebra/serde-serialize", "parry3d/serde-serialize", "serde", "bit-vec/serde" ]
enhanced-determinism = [ "simba/libm_force", "parry3d/enhanced-determinism" ]
debug-render = [ ]
profiler = [ "instant" ] # Enables the internal profiler.
# Feature used for debugging only.
debug-disable-legitimate-fe-exceptions = [ ]
@@ -45,7 +46,7 @@ required-features = [ "dim3", "f32" ]
[dependencies]
vec_map = { version = "0.8", optional = true }
instant = { version = "0.1", features = [ "now" ]}
instant = { version = "0.1", features = [ "now" ], optional = true }
num-traits = "0.2"
nalgebra = "0.31"
parry3d = "0.9"