Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Comments¶
rand::rngs::StdRng (currently, ChaCha block cipher with 12 rounds) is the default recommended RNG which is a trade off among speed, quality and security. While rand::rngs::StdRng is a good default choice as a secure PRNG, it might be too slow for statistical simulations where security is not of a critical concern. rand::rngs::SmallRng
Const Generic in Rust
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
-
Starting from Rust 1.51, constant generics is supported for integral types.
-
The crate static_assertions can be used to assert that a const generic parameter satisfy certain conditions at compile time …
Embeddable Scriting Language
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Lua
- Lua Bindings for Rust discusses Lua bindings for Rust.
JavaScript
It is possible to use JavaScript as an embedded scripting language. For more discussions, please refer to Engine and Runtime …
Tips on rustc
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Optimization & High Performance
Cheap tricks for high-performance Rust
Optimizations: the speed size tradeoff
A performance retrospective using Rust (part 3)
Useful Rust Crates for Filesystem
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
std::fs
camino
Camino is an extension of the std::path module that adds new Utf8PathBuf and Utf8Path types.
glob
glob supports matching file paths against Unix shell style patterns.
jwalk …
Unit Test in Rust
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
https://crates.io/crates/test-with
Tips and Traps
-
std::assert! and std::assert_eq! can be used to assert whether certain conditions are met. They are typically used for testing but they …