Provide better feature gates.

- `serialization` becomes `serde`.
- `impl-nalgebra` becomes `nalgebra`.
- `impl-cgmath` becomes `cgmath`.
- `impl-glam` becomes `glam`.

Already existing feature gates are kept around so that we don’t
introduce a breaking change.
This commit is contained in:
Dimitri Sabadie
2021-07-11 16:18:47 +02:00
parent ee4230340b
commit fb678f9613
5 changed files with 23 additions and 21 deletions

View File

@ -24,15 +24,14 @@ default = ["std"]
impl-cgmath = ["cgmath"]
impl-glam = ["glam"]
impl-nalgebra = ["nalgebra"]
serialization = ["serde", "serde_derive"]
serialization = ["serde"]
std = []
[dependencies]
cgmath = { version = ">=0.17, <0.19", optional = true }
glam = { version = ">=0.10, <0.15", optional = true }
nalgebra = { version = ">=0.21, <0.25", optional = true }
serde = { version = "1", optional = true }
serde_derive = { version = "1", optional = true }
serde = { version = "1", features = ["derive"], optional = true }
[dev-dependencies]
float-cmp = ">=0.6, < 0.9"
@ -46,4 +45,4 @@ name = "hello-world"
[[example]]
name = "serialization"
required-features = ["serialization"]
required-features = ["serde"]