mirror of
https://github.com/rust-lang-nursery/rust-cookbook
synced 2024-11-22 03:23:05 +00:00
b61c8e588a
* Update to edition 2018 Update mdbook to 0.3.5 Command: sed -i '/extern crate/ {N;s/\n$//}' src/**.md; sed -i 's/extern crate error_chain;/use error_chain::error_chain;/; s/extern crate lazy_static;/use lazy_static::lazy_static;/; s/extern crate bitflags;/use bitflags::bitflags;/; s/extern crate serde_json;/ use serde_json::json;/; s/extern crate serde_derive;/use serde::{Serialize, Deserialize};/; /macro_use/d; /extern crate/ d; s/```rust/```rust,edition2018/; s/bail!/error_chain::&/; s/\(debug\|info\|warn\|error\)!/log::&/;' src/**.md Fix #530 * Update rand-dist.md * Fixes #569 * dump syslog version 4 depends on error-chain v 0.11 and version 5 depends on v 0.12 !!!! Co-authored-by: Andrew Gauger <andygauge@gmail.com>
58 lines
2 KiB
Markdown
58 lines
2 KiB
Markdown
# A Rust Cookbook   [![Build Status travis]][travis]
|
|
|
|
[Build Status travis]: https://api.travis-ci.com/rust-lang-nursery/rust-cookbook.svg?branch=master
|
|
[travis]: https://travis-ci.com/rust-lang-nursery/rust-cookbook
|
|
|
|
**[Read it here]**.
|
|
|
|
This _Rust Cookbook_ is a collection of simple [Rust] examples that
|
|
demonstrate good practices to accomplish common programming tasks,
|
|
using the crates of the Rust ecosystem.
|
|
|
|
These examples are complete, and suitable for copying directly into
|
|
new cargo projects. They are tested and guaranteed to work.
|
|
|
|
## Read it offline
|
|
|
|
If you'd like to read it locally:
|
|
|
|
```bash
|
|
$ git clone https://github.com/rust-lang-nursery/rust-cookbook
|
|
$ cd rust-cookbook
|
|
$ cargo install mdbook --vers "0.3.5"
|
|
$ mdbook serve --open
|
|
```
|
|
|
|
The output can also be opened from the `book` subdirectory in your web browser.
|
|
|
|
```bash
|
|
$ xdg-open ./book/index.html # linux
|
|
$ start .\book\index.html # windows
|
|
$ open ./book/index.html # mac
|
|
```
|
|
|
|
[Read it here]: https://rust-lang-nursery.github.io/rust-cookbook
|
|
[Rust]: https://www.rust-lang.org/
|
|
|
|
## Contributing
|
|
|
|
This project is intended to be easy for new [Rust] programmers to
|
|
contribute to, and an easy way to get involved with the Rust
|
|
community. It needs and welcomes help.
|
|
|
|
For details see [CONTRIBUTING.md] on GitHub.
|
|
|
|
[CONTRIBUTING.md]: https://github.com/rust-lang-nursery/rust-cookbook/blob/master/CONTRIBUTING.md
|
|
|
|
## License [![CC0-badge]][CC0-deed]
|
|
|
|
Rust Cookbook is licensed under Creative Commons Zero v1.0 Universal License
|
|
([LICENSE-CC0](LICENSE-CC0) or https://creativecommons.org/publicdomain/zero/1.0/legalcode)
|
|
|
|
Unless you explicitly state otherwise, any contribution intentionally submitted
|
|
for inclusion in Rust Cookbook by you, as defined in the CC0-1.0 license, shall be
|
|
[dedicated to the public domain][CC0-deed] and licensed as above, without any additional
|
|
terms or conditions.
|
|
|
|
[CC0-deed]: https://creativecommons.org/publicdomain/zero/1.0/deed.en
|
|
[CC0-badge]: https://mirrors.creativecommons.org/presskit/buttons/80x15/svg/cc-zero.svg
|