6
6
//!
7
7
//! # How to Use
8
8
//!
9
+ //! In your `Cargo.toml`
10
+ //!
11
+ //! ```toml,no_compile
12
+ //! [dependencies]
13
+ //! ergo_std = "0.1"
14
+ //! serde = "1.0"
15
+ //! serde_derive = "1.0"
16
+ //! ```
17
+ //!
18
+ //! > You have to put the other crates in your `Cargo.toml` in order for `#[derive(...)]` to work
19
+ //! > correctly.
20
+ //!
9
21
//! ```rust
10
- //! #[macro_use] extern crate failure;
11
- //! extern crate serde;
12
- //! #[macro_use] extern crate serde_derive;
13
22
//! #[macro_use] extern crate ergo_std;
14
23
//! use ergo_std::*;
15
- //! # fn main() {
16
- //! # }
24
+ //! fn main() {
25
+ //! /* Your code goes here */
26
+ //! }
17
27
//! ```
18
28
//!
19
- //! > _As you notice, this crate does not include `serde` or `failure`. This is due to a bug
20
- //! > which makes it impossible for this crate to rexport their `#[derive(...)]` macros.
21
- //!
22
29
//! # Exported Items
23
30
//!
24
31
//! The following crates and types are exported. See their docs for how to use them.
25
32
//!
26
- //! - **[`std_prelude`]**: extends rust's additional prelude with commonly used types. The
33
+ //! - **[`std_prelude`]**: extends rust's `std:: prelude` with commonly used types. The
27
34
//! crate is well documented with justification and usecases for each type.
35
+ //! - **[`serde`]**: the defacto serialization library of rust. Also imports `serde_derive`
36
+ //! so you can use `#[derive(Serialize, Deserialize)]`.
28
37
//! - **[`lazy_static!`]**: the `lazy_static!` macro is the current standard way to create
29
- //! global variables and constants in a majority of crates.
38
+ //! global variables and constants. Warning that they are created lazily (at run time)!
30
39
//! - **[`itertools`]**: the itertools prelude provides traits that extends rust's already
31
40
//! extensive iterator API.
32
41
//! - **[`maplit`]**: provides `hashmap!`, `hashset!`, `btreemap!` and `btreeset!` macros to
44
53
//!
45
54
//! The crates that are exported are:
46
55
//!
47
- //! - [**std_prelude**](https://github.com/vitiral/std_prelude):
48
- //! Multi-producer multi-consumer channels for message passing
49
- //! - [**lazy_static**](TODO): TODO
50
- //! - [**itertools**](TODO): TODO
51
- //! - [**maplit**](TODO): TODO
52
- //! - [**regex**](TODO): TODO
56
+ //! - [**serde**](https://github.com/serde-rs/serde): Serialization framework for Rust
57
+ //! - [**std_prelude**](https://github.com/vitiral/std_prelude): prelude that the rust stdlib
58
+ //! should have always had
59
+ //! - [**lazy_static**](https://github.com/rust-lang-nursery/lazy-static.rs): A small macro for
60
+ //! defining lazy evaluated static variables in Rust.
61
+ //! - [**itertools**](https://github.com/bluss/rust-itertools): Extra iterator adaptors, iterator
62
+ //! methods, free functions, and macros.
63
+ //! - [**maplit**](https://github.com/bluss/maplit): Rust container / collection literal macros for
64
+ //! HashMap, HashSet, BTreeMap, BTreeSet.
65
+ //! - [**regex**](https://github.com/rust-lang/regex): An implementation of regular expressions for
66
+ //! Rust. This implementation uses finite automata and guarantees linear time matching on all
67
+ //! inputs.
53
68
//!
54
69
//! Consider supporting their development individually and starring them on github.
55
- //!
56
- //! ## Future crates
57
- //!
58
- //! The following crates will be added in the future:
59
- //!
60
- //! - `indexmap`: the current crate is `ordermap`, which is renaming itself
61
- //! `indexmap` and changing what `ordermap` is... it's confusing but it
62
- //! will be comming shortly
70
+ #![ allow( unused_imports) ]
63
71
64
72
#[ macro_use]
65
73
pub extern crate itertools;
@@ -69,11 +77,15 @@ pub extern crate lazy_static;
69
77
pub extern crate maplit;
70
78
pub extern crate std_prelude;
71
79
pub extern crate regex;
80
+ pub extern crate serde;
81
+ #[ macro_use]
82
+ pub extern crate serde_derive;
72
83
73
84
pub use std_prelude:: * ;
74
- pub use itertools:: prelude:: * ;
75
85
pub use lazy_static:: * ;
76
86
pub use itertools:: Itertools ;
77
87
pub use maplit:: * ;
78
88
pub use regex:: Regex ;
89
+ pub use serde:: * ;
90
+ pub use serde_derive:: * ;
79
91
0 commit comments