Skip to content

Commit 75b2928

Browse files
Document making serde an optional dependency (#746)
1 parent 5727e67 commit 75b2928

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/features/serde/mod.rs

+11
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,19 @@
5252
//!
5353
//! **Using any of the above attributes can and will cause issues with bincode and will result in lost data**. Consider using bincode's own derive macro instead.
5454
//!
55+
//! # Why move away from serde?
56+
//!
57+
//! Serde is a great library, but it has some issues that makes us want to be decoupled from serde:
58+
//! - The issues documented above with attributes.
59+
//! - Serde has chosen to not have a MSRV ([source](https://github.com/serde-rs/serde/pull/2257)). We think MSRV is important, bincode 1 still compiles with rust 1.18.
60+
//! - Before serde we had rustc-serializer. Serde has more than replaced rustc-serializer, but we can imagine a future where serde is replaced by something else.
61+
//! - We believe that less dependencies is better, and that you should be able to choose your own dependencies. If you disable all features, bincode 2 only has 1 dependency. ([`unty`], a micro crate we manage ourselves)
62+
//!
63+
//! **note:** just because we're making serde an optional dependency, it does not mean we're dropping support for serde. Serde will still be fully supported, we're just giving you the option to not use it.
64+
//!
5565
//! [Decode]: ../de/trait.Decode.html
5666
//! [Encode]: ../enc/trait.Encode.html
67+
//! [`unty`]: https://crates.io/crates/unty
5768
5869
mod de_borrowed;
5970
mod de_owned;

0 commit comments

Comments
 (0)