3 releases
Uses old Rust 2015
0.0.3 | Apr 21, 2018 |
---|---|
0.0.2 | Apr 21, 2018 |
0.0.1 | Feb 5, 2018 |
#13 in #ergo
33 downloads per month
Used in 2 crates
(via ergo)
7KB
ergo_std: items that could be in the standard library.
See the library docs for more information
LICENSE
The source code in this repository is Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
lib.rs
:
ergo_std: items that could be in the standard library.
This is the "core types" library as part of the ergo
crates ecosystem. It contains useful
types, traits and functions for general purpose programming projects which do not fall
into the other ergo
crates but which are boons to ergonomics and productivity.
How to Use
In your Cargo.toml
[dependencies]
ergo_std = "0.1"
serde = "1.0"
serde_derive = "1.0"
You have to put the other crates in your
Cargo.toml
in order for#[derive(...)]
to work correctly.
#[macro_use] extern crate ergo_std;
use ergo_std::*;
fn main() {
/* Your code goes here */
}
Exported Items
The following crates and types are exported. See their docs for how to use them.
std_prelude
: extends rust'sstd::prelude
with commonly used types. The crate is well documented with justification and usecases for each type.serde
: the defacto serialization library of rust. Also importsserde_derive
so you can use#[derive(Serialize, Deserialize)]
.lazy_static!
: thelazy_static!
macro is the current standard way to create global variables and constants. Warning that they are created lazily (at run time)!itertools
: the itertools prelude provides traits that extends rust's already extensive iterator API.indexmap
: indexable and sortable map and set types with similar performance tostd
types and beter performance when iterating.maplit
: provideshashmap!
,hashset!
,btreemap!
andbtreeset!
macros to compliment rust's existingvec!
macro. TheseRegex
: the regular expression type from theregex
crate.
Special thanks
The crates that are exported are:
- serde: Serialization framework for Rust
- std_prelude: prelude that the rust stdlib should have always had
- lazy_static: A small macro for defining lazy evaluated static variables in Rust.
- itertools: Extra iterator adaptors, iterator methods, free functions, and macros.
- indexmap: A hash table with consistent order and
fast iteration (previously named
ordermap
) - maplit: Rust container / collection literal macros for HashMap, HashSet, BTreeMap, BTreeSet.
- regex: An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
Consider supporting their development individually and starring them on github.
Dependencies
~5.5MB
~118K SLoC