Rust is a programming language that does exactly what you tell it to. It is one of the fastest languages in the world, but it does not crash like comparable languages. It is suitable for the most performance- and safety-critical systems, as well as for daily software development, and it runs everywhere.
TODO
https://github.com/brson/my-rust-lists/blob/master/rust-quotes-and-press.md
+---------------+ +---------------+ | | | | | I'm the | | I'm the | | CPU +-----------+ RAM | | | | | | | ^ | | +---------------+ | +---------------+ | (this is slow)
5b080 <alloc::box_free>: 5b080: 48 89 f0 mov %rsi, %rax 5b083: 48 8b 76 08 mov 0x8(%rsi), %rsi 5b087: 48 85 f6 test %rsi, %rsi 5b08a: 74 0a je 5b096 <alloc::box_free+0x16>
fn main() { let a = 1; foo(&a); }
|=============| 0x00 | fn main | | a = 1 | |=============|
fn main() { let a = 1; foo(&a); } fn foo(ptr_a: &i32) { let b = 2; bar(ptr_a, &b); }
|=============| 0x00 | fn main | | a = 1 | |=============| 0x10 | fn foo | | <main regs> | | ptr_a = &a | | b = 2 | |=============|
fn foo(ptr_a: &i32) { let b = 2; bar(ptr_a, &b); } fn bar(ptr_a: &i32, ptr_b: &i32) { ... }
... |=============| 0x10 | fn foo | | <main regs> | | ptr_a = &a | | b = 2 | |=============| 0x20 | fn bar | | <foo regs> | | ptr_a = &a | | ptr_b = &b | |=============|
fn main() { let a = 1; foo(&a); } fn foo(ptr_a: &i32) { let b = 2; bar(ptr_a, &b); }
|=============| 0x00 | fn main | | a = 1 | |=============| 0x10 | fn foo | | <main regs> | | ptr_a = &a | | b = 2 | |=============|
fn main() { let a = 1; foo(&a); }
|=============| 0x00 | fn main | | a = 1 | |=============|
malloc
See README.md
This is the thing Rust solves.
See README.md for links
Just clone stuff.
struct Bar; struct Foo(Bar); impl Drop for Foo { fn drop(&mut self) { } } fn main() { // XXX can't destructure let Foo(i) = Foo(Bar); }
The defaults are not always what you want. Save time by being precise with your `cargo` invocations.
cargo check --all cargo test --all --no-run cargo check --all --no-run --profile=dev cargo test -p subproject
println!("{:?}", qux); println!("{:#?}", qux);
Foo { bar: 0, baz: 1 } Foo { bar: 0, baz: 1, }
cargo generate-lockfile cargo fetch cargo build --locked --offline cargo test --locked --offline
cargo clippy cargo fmt cargo outdated cargo audit