summaryrefslogtreecommitdiffstats
path: root/software/rust.page
blob: af5ea3a75c06874339c3568f2fe6684508b8b13f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Rust
==================

## Resources

- [http://xion.io/post/code/rust-iter-patterns.html]()
- [https://deterministic.space/rust-cli-tips.html]()

Optimization: use `RUSTFLAGS="-C target-cpu=native"` to take advantage of CPU
special features.

(via http://vfoley.xyz/rust-compilation-tip/)

For local rust/std documentation, do `rustup doc`.

## Little tricks

Run tests with stdout output:

    cargo test -- --nocapture

To run tests with logging enabled (eg, with `env_logger`), make sure you add
`env_logger::init()` to the test function itself.