Our great sponsors
-
There’s a little thing with rust - you probably dont want to write a linked list in it (or do entirely too many linked lists to boot). There are almost always better container structures to use.
-
Are you using clippy by any chance? Clippy has taught me more about how to navigate the Rust language in my own code than reading just about anything else.
-
SonarLint
Deliver Cleaner and Safer Code - Right in Your IDE of Choice!. SonarLint is a free and open source IDE extension that identifies and catches bugs and vulnerabilities as you code, directly in the IDE. Install from your favorite IDE marketplace today.
-
rust-analyzer
A Rust compiler front-end for IDEs [Moved to: https://github.com/rust-lang/rust-analyzer] (by rust-analyzer)
Oh, try Rust-Analyzer, too!
-
Fundamentally, Rust is very much about this sort of "Build a piece using unsafe, wrap it in an API which ensures correct usage, audit the crap out of it using tools like Miri, Loom, cargo-fuzz and/or afl.rs, Valgrind, etc., and then let your safe code rely on it."
-
Like others have said, you really should start with a simpler project. If I were you, I would follow along with the book. That's where I started, and there are some great little projects in there to get you going. After you've gotten more familiar, you can come back to linked lists and have a much better time.
-
Did you try the rustlings already?
-
An invalid value (e.g. reading bool from a memory that contains something other than true or false) is UB. It's unsafe to "produce" such value even if you never inspect it and only ever send it to mem::forget(). (See this PR for an interesting discussion.)
-
Scout APM
Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.