Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
no-panic
Discontinued Attribute macro to require that the compiler prove a function can't ever panic
-
maturin
Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
The best way to start is probably Rust By Example https://doc.rust-lang.org/stable/rust-by-example/ and Rustlings https://github.com/rust-lang/rustlings/ . The key is to do the exercises "the hard way" and get some familiarity with the mechanics of coding in Rust. Once you've done that, reading TRPL will make a lot more sense.
The best way to start is probably Rust By Example https://doc.rust-lang.org/stable/rust-by-example/ and Rustlings https://github.com/rust-lang/rustlings/ . The key is to do the exercises "the hard way" and get some familiarity with the mechanics of coding in Rust. Once you've done that, reading TRPL will make a lot more sense.
One surprise perhaps is that both Python and C++ have multiple inheritance whereas Rust doesn't have implementation inheritance at all (Rust's traits can inherit but data structures and implementations cannot).
Both C++ and Rust have similar Quiz sites:
https://dtolnay.github.io/rust-quiz/
dead_code is required because Rust compiles each integration test as a separate crate. This causes spurious warnings to be emitted if you want to share code between tests. See https://github.com/rust-lang/rust/issues/46379
Modules and crates continues to be one of the most confusing aspects of Rust, for me at least.
This kind of already exists in the form of #[no_panic] [1]?
> If the function does panic (or the compiler fails to prove that the function cannot panic), the program fails to compile with a linker error that identifies the function name.
1: https://github.com/dtolnay/no-panic