Warning: Some posts on this platform may contain adult material intended for mature audiences only. Viewer discretion is advised. By clicking ‘Continue’, you confirm that you are 18 years or older and consent to viewing explicit content.
The Rust book is the official standard resource for learning Rust. It assumes some experience in another programming language, but it doesn’t matter which one (that is, it isn’t aimed at teaching Rust as a first programming language), so there’s no reason why you couldn’t read it with some experience in C.
Good choice. Follow it with this Little Book of Rust Macros. And don’t verge into the unsafe stuff early, and don’t verge into it later unless it’s really necessary.
Yes agree, I need unsafe super rarely, and often it’s just for small optimizations (like std::mem::transmute::(kind) where SyntaxKind is an enum with #[repr(u16)]).
But I guess it depends on what you’re doing exactly though (the higher-level, the less unsafe you need).
Also checkout https://doc.rust-lang.org/rust-by-example/. It often goes a little bit more into actual detailed code examples and often contains stuff that isn’t in the book. Basics are well explained in the book though (like lifetimes)
The Rust book is the official standard resource for learning Rust. It assumes some experience in another programming language, but it doesn’t matter which one (that is, it isn’t aimed at teaching Rust as a first programming language), so there’s no reason why you couldn’t read it with some experience in C.
Depending on what sort of C programmer you are, you may find Learn Rust the Dangerous Way of interest as well.
deleted by creator
Good choice. Follow it with this Little Book of Rust Macros. And don’t verge into the
unsafe
stuff early, and don’t verge into it later unless it’s really necessary.Yes agree, I need
unsafe
super rarely, and often it’s just for small optimizations (likestd::mem::transmute::(kind)
whereSyntaxKind
is an enum with#[repr(u16)]
).But I guess it depends on what you’re doing exactly though (the higher-level, the less unsafe you need).
Also checkout https://doc.rust-lang.org/rust-by-example/. It often goes a little bit more into actual detailed code examples and often contains stuff that isn’t in the book. Basics are well explained in the book though (like lifetimes)