mirror of
https://github.com/rust-lang-nursery/rust-cookbook
synced 2024-11-24 04:23:06 +00:00
Improve presentation of toc
This commit is contained in:
parent
de132fe777
commit
a296abdf7c
3 changed files with 138 additions and 35 deletions
75
Cargo.lock
generated
75
Cargo.lock
generated
|
@ -3,6 +3,7 @@ name = "rust-cookbook"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clap 2.22.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"error-chain 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"json 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -15,6 +16,21 @@ dependencies = [
|
|||
"toml 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ansi_term"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "atty"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "backtrace"
|
||||
version = "0.3.0"
|
||||
|
@ -43,6 +59,11 @@ name = "bitflags"
|
|||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.0.0"
|
||||
|
@ -53,6 +74,21 @@ name = "cfg-if"
|
|||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "2.22.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"term_size 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"vec_map 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam"
|
||||
version = "0.2.10"
|
||||
|
@ -209,6 +245,11 @@ dependencies = [
|
|||
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "0.11.9"
|
||||
|
@ -235,6 +276,16 @@ dependencies = [
|
|||
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "term_size"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.3.1"
|
||||
|
@ -243,11 +294,26 @@ dependencies = [
|
|||
"serde 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "vec_map"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.2.8"
|
||||
|
@ -259,11 +325,15 @@ version = "0.1.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[metadata]
|
||||
"checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6"
|
||||
"checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159"
|
||||
"checksum backtrace 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80"
|
||||
"checksum backtrace-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d192fd129132fbc97497c1f2ec2c2c5174e376b95f535199ef4fe0a293d33842"
|
||||
"checksum bitflags 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f67931368edf3a9a51d29886d245f1c3db2f1ef0dcc9e35ff70341b78c10d23"
|
||||
"checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4"
|
||||
"checksum byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c40977b0ee6b9885c9013cd41d9feffdd22deb3bb4dc3a71d901cc7a77de18c8"
|
||||
"checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c"
|
||||
"checksum clap 2.22.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3cae8c5a1108961e9bafb1096b8cbb6a31c17ab1a276ce9b52334be99962f653"
|
||||
"checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97"
|
||||
"checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850"
|
||||
"checksum deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1614659040e711785ed8ea24219140654da1729f3ec8a47a9719d041112fe7bf"
|
||||
|
@ -286,10 +356,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
"checksum serde_codegen_internals 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4d52006899f910528a10631e5b727973fe668f3228109d1707ccf5bad5490b6e"
|
||||
"checksum serde_derive 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f15ea24bd037b2d64646b4d934fa99c649be66e3f7b29fb595a5543b212b1452"
|
||||
"checksum skeptic 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "18e054ee4f4ade553f1e43f0071acb04127dc14786be3f3ddc3241250142b16b"
|
||||
"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"
|
||||
"checksum syn 0.11.9 (registry+https://github.com/rust-lang/crates.io-index)" = "480c834701caba3548aa991e54677281be3a5414a9d09ddbdf4ed74a569a9d19"
|
||||
"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
|
||||
"checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6"
|
||||
"checksum term_size 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "07b6c1ac5b3fffd75073276bca1ceed01f67a28537097a2a9539e116e50fb21a"
|
||||
"checksum toml 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3474f3c6eaf32eedb4f4a66a26214f020f828a6d96c37e38a35e3a379bbcfd11"
|
||||
"checksum unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18127285758f0e2c6cf325bb3f3d138a12fee27de4f23e146cd6a179f26c2cf3"
|
||||
"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f"
|
||||
"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
|
||||
"checksum vec_map 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8cdc8b93bd0198ed872357fb2e667f7125646b1762f16d60b2c96350d361897"
|
||||
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
|
||||
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
|
||||
|
|
|
@ -16,6 +16,7 @@ crossbeam = "0.2"
|
|||
serde_derive = "0.9.11"
|
||||
serde = "0.9.11"
|
||||
rayon = "0.6.0"
|
||||
clap = "2.22.2"
|
||||
|
||||
[build-dependencies]
|
||||
skeptic = "0.7.1"
|
||||
|
|
|
@ -4,49 +4,76 @@ A practical guide to the Rust crate ecosystem.
|
|||
|
||||
## Recipes
|
||||
|
||||
- [Math](pages/math.html)
|
||||
- [rand](pages/rand.html) [![rand-badge]][rand]
|
||||
- [petgraph](pages/petgraph.html) [![petgraph-badge]][petgraph]
|
||||
- [crossbeam](pages/crossbeam.html) [![crossbeam-badge]][crossbeam]
|
||||
- [Algorithms](pages/algorithms.html)
|
||||
- [IO](pages/IO.html)
|
||||
- [File IO](pages/file_io.html) [![file-badge]][file]
|
||||
- [Command Line Parsing](pages/cli_parsing.html) [![clap-badge]][clap]
|
||||
- [Serialization](pages/serialization.html)
|
||||
- [Byteorder](pages/byteorder.html) [![byteorder-badge]][byteorder]
|
||||
- [JSON](pages/json.html) [![json-badge]][json]
|
||||
- [TOML](pages/toml.html) [![toml-badge]][toml]
|
||||
- [Networking](pages/networking.html)
|
||||
- [Concurrency](pages/concurrency.html)
|
||||
- [Rayon](pages/rayon.html)
|
||||
### Foundations
|
||||
|
||||
| Recipe | Crates | Categories |
|
||||
|--------|--------|------------|
|
||||
| [Read and write integers in little-endian byte order][ex-byteorder-le] | [![byteorder-badge]][byteorder] | [![cat-serialization-badge]][cat-serialization] |
|
||||
| [Generate random floating point numbers][ex-rand-float] | [![rand-badge]][rand] | [![cat-math-badge]][cat-math] |
|
||||
| [Generate random values on a custom type][ex-rand-custom] | [![rand-badge]][rand] | [![cat-math-badge]][cat-math] |
|
||||
| [Construct a graph of objects][ex-petgraph-basic] | [![petgraph-badge]][petgraph] | [![cat-math-badge]][cat-math] |
|
||||
| [Serialize and deserialize unstructured JSON][ex-json-basic] | [![json-badge]][json] | [![cat-serialization-badge]][cat-serialization] |
|
||||
| [Deserialize an unstructured TOML configuration file][ex-toml-basic] | [![toml-badge]][toml] | [![cat-serialization-badge]][cat-serialization] |
|
||||
|
||||
### Concurrency
|
||||
|
||||
| Recipe | Crates | Categories |
|
||||
|--------|--------|------------|
|
||||
| [Mutate the elements of an array in parallel][ex-rayon-iter-mut] | [![rayon-badge]][rayon] | [![cat-concurrency-badge]][cat-concurrency] |
|
||||
|
||||
### I/O
|
||||
|
||||
### Application development
|
||||
|
||||
| Recipe | Crates | Categories |
|
||||
|--------|--------|------------|
|
||||
| [Parse command line arguments][ex-clap-basic] | [![clap-badge]][clap] | [![cat-app-badge]][cat-app] |
|
||||
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
If you'd like to make changes to the project, please see [this guide](pages/contributing.html).
|
||||
|
||||
## License
|
||||
|
||||
MIT/Apache-2.0
|
||||
|
||||
<!- Categories -->
|
||||
|
||||
<!-- Links -->
|
||||
[cat-serialization-badge]: https://img.shields.io/badge/-serialization-orange.svg
|
||||
[cat-serialization]: https://crates.io
|
||||
[cat-math-badge]: https://img.shields.io/badge/-rand-orange.svg
|
||||
[cat-math]: https://crates.io
|
||||
[cat-app-badge]: https://img.shields.io/badge/-app-orange.svg
|
||||
[cat-app]: https://crates.io
|
||||
[cat-concurrency-badge]: https://img.shields.io/badge/-concurrency-orange.svg
|
||||
[cat-concurrency]: https://crates.io
|
||||
|
||||
[byteorder-badge]: https://img.shields.io/crates/v/byteorder.svg?label=byteorder
|
||||
[byteorder]: https://docs.rs/byteorder
|
||||
[file-badge]: https://img.shields.io/crates/v/file.svg?label=file
|
||||
[file]: https://doc.rust-lang.org/std/fs/struct.File.html
|
||||
[clap-badge]: https://img.shields.io/crates/v/clap.svg?label=clap
|
||||
[clap]: https://kbknapp.github.io/clap-rs/clap/struct.Arg.html
|
||||
[json-badge]: https://img.shields.io/crates/v/json.svg?label=json
|
||||
[json]: http://json.rs/doc/json
|
||||
[toml-badge]: https://img.shields.io/crates/v/toml.svg?label=toml
|
||||
[toml]: http://alexcrichton.com/toml-rs/toml/
|
||||
[rand-badge]: https://img.shields.io/crates/v/rand.svg?label=rand
|
||||
[rand]: https://doc.rust-lang.org/rand/rand/index.html
|
||||
[error-docs]: https://doc.rust-lang.org/book/error-handling.html
|
||||
[error-blog]: https://brson.github.io/2016/11/30/starting-with-error-chain
|
||||
[petgraph-badge]: https://img.shields.io/crates/v/petgraph.svg?label=petgraph
|
||||
<!-- Crates -->
|
||||
|
||||
[byteorder-badge]: https://img.shields.io/badge/byteorder-1.0.0-blue.svg
|
||||
[byteorder]: https://docs.rs/byteorder/1.0.0/byteorder/
|
||||
[petgraph-badge]: https://img.shields.io/badge/petgraph-0.4.3-blue.svg
|
||||
[petgraph]: https://docs.rs/petgraph/0.4.3/petgraph/
|
||||
[crossbeam-badge]: https://img.shields.io/crates/v/crossbeam.svg?label=crossbeam
|
||||
[crossbeam]: https://docs.rs/crossbeam
|
||||
[rayon-badge]: https://img.shields.io/crates/v/rayon.svg?label=rayon
|
||||
[rayon]: https://docs.rs/rayon
|
||||
[rand-badge]: https://img.shields.io/badge/rand-0.3.15-blue.svg
|
||||
[rand]: https://docs.rs/rand/0.3.15/rand/
|
||||
[clap-badge]: https://img.shields.io/badge/clap-2.22.2-blue.svg
|
||||
[clap]: https://docs.rs/clap/2.22.0/rand/
|
||||
[rayon-badge]: https://img.shields.io/badge/rayon-0.6.0-blue.svg
|
||||
[rayon]: https://docs.rs/rayon/0.6.0/rayon/
|
||||
[json-badge]: https://img.shields.io/badge/json-0.11.5-blue.svg
|
||||
[json]: https://docs.rs/json/0.11.5/json/
|
||||
[toml-badge]: https://img.shields.io/badge/toml-0.3.0-blue.svg
|
||||
[toml]: https://docs.rs/toml/0.3.0/toml/
|
||||
|
||||
<!-- Examples -->
|
||||
|
||||
[ex-byteorder-le]: todo
|
||||
[ex-rand-float]: todo
|
||||
[ex-rand-custom]: todo
|
||||
[ex-petgraph-basic]: todo
|
||||
[ex-clap-basic]: todo
|
||||
[ex-json-basic]: todo
|
||||
[ex-toml-basic]: todo
|
||||
[ex-rayon-iter-mut]: todo
|
||||
|
|
Loading…
Reference in a new issue