nomicon
patterns
Our great sponsors
nomicon | patterns | |
---|---|---|
87 | 63 | |
1,655 | 7,581 | |
3.9% | 1.7% | |
5.5 | 7.6 | |
4 days ago | 11 days ago | |
CSS | Handlebars | |
Apache License 2.0 | Mozilla Public License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
nomicon
-
[Media] I'm comparing writing a double-linked list in C++ vs with Rust. The Rust implementation looks substantially more complex. Is this a bad example? (URL in the caption)
itโs even written by the same person that wrote the Nomicon (the guide to the dark arts of unsafe)
-
Rust books to read
If you want to dive deeper you can always have other options but now there are concrete cases, if you want to do low level thing https://doc.rust-lang.org/nomicon/ while if you want multi thread/concurrency stuff https://marabos.nl/atomics/ . There are many many books so you will have to point yourself to what you want
-
Unsafe Rust
Nice video! Glad I could help out. This stuff is hard, and I'm still learning a lot about it myself even years later. The Rustonomicon is a great read if you haven't already.
-
Stepping up the YAML engineer game
Have you got a moment to read through the good book , after reading through this perhaps try the Rustonomicon.
- Questions about ownership rule
-
How to write deserializer for custom binary protocol?
However, this is a wide topic out of scope for a Reddit comment, so maybe just read the Rustonomicon. It explains everything about data handling in Rust.
-
Performance critical ML: How viable is Rust as an alternative to C++
The ownership model & borrow checker makes rust a bit of an awkward language in which to write complex data structures like trees and graphs. It can be done - since you can always use raw pointers & unsafe code when you absolutely need to to treat rust like C. But the language fights you, and the community can get a bit moralistic about this sort of thing. The rust nomicon is a fantastic resource for learning the limits of the borrow checker, and where and how to use unsafe code correctly. You will need unsafe less than you think you will, but sometimes you will have no choice.
-
Sudo and Su Being Rewritten in Rust for Memory Safety
That's a really good point that I feel like isn't talked about enough. Unsafe rust is a lot harder to write correctly than bog standard C, because you have to uphold the invariants to avoid undefined behavior (1). It's why there's a whole ebook about it (2).
That doesn't mean it's impossible to write correct unsafe code, it's just not as obvious as "trust me bro I know better than borrowck." You can't actually elide the invariants Rust upholds, you just have to take over from the compiler when it can't prove them.
(1) https://doc.rust-lang.org/reference/behavior-considered-unde...
-
C++ to Rust Books?
If you are interested in the theoretical stuff that doesn't have much overlap with C++, give the Nomicon a try, or even Learn Rust the Dangerous Way.
-
How can I use rust libraries in zig/C
There's also cbindgen for automating the generation of C headers once you've got your code in the right shape and you'll also want to read the Rustonomicon.
patterns
- Best practices for designing traits in public crates?
-
Ask HN: Learning new coding patterns โ how to start?
For OOP design patterns in Rust, see: https://rust-unofficial.github.io/patterns/
For a book on FP, see: https://www.manning.com/books/grokking-simplicity
-
Functional Options Pattern in Go and Rust
Just wanting to let this here for some further input: - https://rust-lang.github.io/api-guidelines/ - https://rust-unofficial.github.io/patterns/ - https://deterministic.space/elegant-apis-in-rust.html
-
Rust exercices for tech interview
Rust Design Patterns
-
I want some help learning design patterns
I know about Rust Design Pattern what are your reviews for the same?
-
I've been writing C# for nearly a decade, but I want to learn how to build programs with Rust. What do I need to change about how I structure my code?
Once you've finished with The Book and possibly Programming Rust, 2nd Edition if you've got the cash for a paid book, read Learning Rust With Entirely Too Many Linked Lists (it helps to solidify what ownership and borrowing mean for data structures) and Rust Design Patterns.
-
Is there a coding style and set of best-practices that avoid (not bypass) "fighting the borrow checker"?
Well, there's https://rust-unofficial.github.io/patterns/ for a start.
-
Comprehensive Rust ๐ฆ is now available in Korean!
Love the translation pipeline, currently looking into adopting that as well for the Rust patterns book!
-
Picking Up Rust Before C With My Goals In Mind?
Finally, there's also the Little Book of Rust Books where you could look for tutorial materials or things like like Rust Design Patterns, Rust API Guidelines, and The Rust Performance Book. (See also rust-learning)
- Are books underrated as a source for learning?
What are some alternatives?
book - The Rust Programming Language
mdBook - Create book from markdown files. Like Gitbook but implemented in Rust
rust-ffmpeg - Safe FFmpeg wrapper.
Theseus - Theseus is a modern OS written from scratch in Rust that explores ๐ข๐ง๐ญ๐ซ๐๐ฅ๐ข๐ง๐ ๐ฎ๐๐ฅ ๐๐๐ฌ๐ข๐ ๐ง: closing the semantic gap between compiler and hardware by maximally leveraging the power of language safety and affine types. Theseus aims to shift OS responsibilities like resource management into the compiler.
Exercism - website - The codebase for Exercism's website.
seL4 - The seL4 microkernel
miri - An interpreter for Rust's mid-level intermediate representation
rust-typed-builder - Compile-time type-checked builder derive
CppCoreGuidelines - The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++
unsafe-code-guidelines - Forum for discussion about what unsafe code can and can't do
rust - Empowering everyone to build reliable and efficient software.
too-many-lists - Learn Rust by writing Entirely Too Many linked lists