209 private links
[fiction] From C code with a lot of bugs to Rust with improvments
About Huffman coding
strace
programm allow us to figure out what a program does under the hood.
Part 2 (x86 asm, linux kernel)
Part 3 (ftrace, disk layouts, ext4)
To be clear, we don’t think you should rewrite everything in rust just because.
Tendance to RIIR x)
&str
, String
or &String
?
In most cases, &str
is what is needed.
A list of useful crate for testing, particularly :
debug_assert()
is run only in debug mode and removed in production builds.
The crate static_assertions
with the macro const_assert!
test const functions-and data during compilation.
(shared by Riduidel)
Solution : box
the iterator and give the proper lifetime in signature function :
pub fn values<'a>(&'a self) -> Box<Iterator<Item = &i32> + 'a> {
// ...
}
Thanks a lot for this post; it is much clearer in my mind.
And the explanation for the prelude
module.
reify (verb):to consider or represent (something abstract) as a material or concrete thing : to give definite content and form to (a concept or idea).
monomorphization is the term used in Rust.
About the classical couple heap/stack in rust, memory allocation, ... very instructive !
About asynchronous streams: default behavior is that it terminates earlier when an error is generated by the stream. How to close the stream before returning the error ?
A new web framework for Rust; seems that Actix has suffered recently and other web framework in Rust are emerging
Memo for the turbofish name
Covering Rust syntax and most used concept as fast as possible : that's great !
-
Add code example in Rust in the examples/ directory located at the same level as src/.
-
Then run it with
cargo run --example code_sample.rs
. -
Add specific dependencies used by the examples in the [dev-dependencies] of the Cargo.toml; these are not necessary to run the main programm