aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-01-09 17:37:05 -0800
committerAlex Crichton <alex@alexcrichton.com>2017-01-09 17:37:05 -0800
commitdb39a682e2ce5552388fa4da5f8eb869b7da3df8 (patch)
tree1f4efacec3f5322987d3d1581bedc39c40dc5a5b
parentc391600de19a326a5c9cacba3e833c95de9750a1 (diff)
downloadmilf-rs-db39a682e2ce5552388fa4da5f8eb869b7da3df8.tar.gz
milf-rs-db39a682e2ce5552388fa4da5f8eb869b7da3df8.zip
Clarify that serde is supported
Closes #122
-rw-r--r--README.md31
-rw-r--r--src/lib.rs9
2 files changed, 40 insertions, 0 deletions
diff --git a/README.md b/README.md
index d8520bb..97c35c3 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,37 @@ date with the TOML specification as changes happen.
toml = "0.2"
```
+By default this crate supports [`rustc-serialize`] style serialization. This can
+be disabled though by disabling the default feature set:
+
+[`rustc-serialize`]: http://github.com/rust-lang/rustc-serialize
+
+```toml
+# Cargo.toml
+[dependencies]
+toml = { version = "0.2", default-features = false }
+```
+
+If you'd like to enable support for [serde] you can enable the `serde` feature:
+
+[serde]: https://github.com/serde-rs/serde
+
+```toml
+# Cargo.toml
+[dependencies]
+toml = { version = "0.2", features = ["serde"] }
+```
+
+If you'd like to *only* support serde, you can also write:
+
+[serde]: https://github.com/serde-rs/serde
+
+```toml
+# Cargo.toml
+[dependencies]
+toml = { version = "0.2", features = ["serde"], default-features = false }
+```
+
# License
`toml-rs` is primarily distributed under the terms of both the MIT license and
diff --git a/src/lib.rs b/src/lib.rs
index 74fe1b8..51d85b4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -34,6 +34,15 @@
//!
//! [1]: https://github.com/mojombo/toml
//! [2]: https://github.com/BurntSushi/toml-test
+//!
+//! # Encoding support
+//!
+//! This crate optionally supports the [`rustc-serialize`] crate and also the
+//! [`serde`] crate through respective feature names. The `rustc-serialize`
+//! feature is enabled by default.
+//!
+//! [`rustc-serialize`]: http://github.com/rust-lang/rustc-serialize
+//! [`serde`]: http://github.com/serde-rs/serde
#![doc(html_root_url = "http://alexcrichton.com/toml-rs")]
#![deny(missing_docs)]