Add 'rustc-serialize' and 'serde-serialize' features.#134
Add 'rustc-serialize' and 'serde-serialize' features.#134qrlpx wants to merge 1 commit intodimforge:masterfrom qrlpx:master
Conversation
|
I'm a bit concerned about this feature-based approach. If two libraries end up using the same version of |
|
serde serializers and deserializers can live side by side with rustc-serialize encoders and decoders, so I don't think these need to be optional. There is some minor trickiness required to |
|
@sebcrozet That's not my impression. Cargo will union the feature flags, and it will be just one compilation of nalgebra. (And features need to be additive for this reason). I'm not actually sure the docs cover this well enough. http://doc.crates.io/manifest.html#the-[features]-section |
|
@erickt They should be optional though, since it slows down the compile too much otherwise? |
|
I'm very interested in serialization support as well! |
|
Now that rust 1.15 is out and rust_derive works on stable this seems like a great idea. |
|
I am also looking for this right now, particularly now that serde_derive is supported on stable. This PR needs to be modified to use it though. |
|
I have an updated version of the pull request in a branch. Tests seem to pass but I haven't tried using the traits yet: https://github.com/robo-hamburger/nalgebra |
This allows users to choose rustc-serialize or serde (or both or none) for serializiation.
'rustc-serialize' is a default feature, serde is activated through the 'serde-serialize' feature.
If there's any interest in it, I'll eventually do the same for ncollide and nphysics.