nomicon
book
Our great sponsors
nomicon | book | |
---|---|---|
68 | 556 | |
1,316 | 11,802 | |
3.3% | 3.4% | |
6.3 | 9.6 | |
14 days ago | 4 days ago | |
CSS | Rust | |
Apache License 2.0 | GNU General Public License v3.0 or later |
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
-
Bypassing the borrow checker with unsafe?
If you are interested in learning more about unsafe rust, read the nomicon.
-
I love rust, I have a pet peeve with the community
Have you read the nomicon? I'm not sure it fits "in between," but it's definitely not on the "BNF and little explanation" spectrum of things. But if you're coming from years of C or C++ and are totally cool with raw pointers and just want to do stuff with them, then I'd probably point you to the nomicon.
-
I wanna be a crab.
The Nomicon for learning the dark arts of unsafe rust 😳
-
How to Practice and Learn Rust for Production Level Code?
Also rust book https://doc.rust-lang.org/book/ and Rustonomicon https://doc.rust-lang.org/nomicon/ should be enough
-
Wondering if my project can be ported to rust
Because of this you should really read the Rustonomicon before you go anywhere near unsafe Rust: a lot of things can go very wrong very quickly.
-
What's everyone working on this week (6/2023)?
You should read The Rustonomicon before you use unsafe since it's essentially the unsafe guidelines and covers much more than I can here
-
Stop Comparing Rust to Old C++
Rust doesn't have similar obscure details? May I interest you with the Rustonomicon?
-
Rust from a security perspective, where is it vulnerable?
For more details on this kind of thing, you might be interested in the Rustonomicon, which is the goto guide for the details of writing unsafe Rust code.
The "Rustonomicon" is a book about unsafe code in Rust: https://doc.rust-lang.org/nomicon/
-
Red Black Tree in Rust
Getting into unsafe Rust is generally more for intermediate to advanced users, but the Rustonomicon has good information on how to do it safely: https://doc.rust-lang.org/nomicon/
book
-
What rustisms would you port to another language?
I make something cool, but I don't know how reliable it is, so I consult the book.
-
Ask HN: Is it possible to compile TypeScript to Golang?
It sounds like you need a language that supports stronger types and concurrency.
There are many good programming languages that might work if neither Go nor Typescript individually would meet your needs.
I recommend examining the following to see if they would work better for you:
Ada: https://learn.adacore.com/courses/intro-to-ada/index.html
Elixir: https://elixir-lang.org/
Java: https://docs.oracle.com/javase/tutorial/
Rust: https://doc.rust-lang.org/book/
All of them have excellent support for concurrency and strong typing to various degrees that help you to write complex logic quickly.
-
How to learn writing a Wayland compositor?
Understand Wayland concepts: Familiarize yourself with the basic concepts and principles of Wayland. This will help you gain a solid understanding of how the system works. You can refer to the official Wayland documentation (https://wayland.freedesktop.org/docs/html/) and the Wayland book (https://wayland-book.com/). Learn Rust: If you're not already proficient in Rust, take some time to learn the language. The Rust Book (https://doc.rust-lang.org/book/) is a great place to start. Study existing Wayland compositors: Since you mentioned Anvil and smallvil, you can study their source code to gain insights into how they're designed and implemented. Try to understand the structure and how different components interact with each other. Dive into Smithay: Smithay (https://github.com/Smithay/smithay) is a Rust library for building Wayland compositors. Familiarize yourself with the library and its components. You can start by studying the provided examples and reading the API documentation. Learn graphics programming: Since you're interested in graphics effects, you'll need to learn about graphics programming concepts, such as shaders, framebuffers, and texturing. Vulkan (https://www.vulkan.org/) is a popular graphics API that you can use with Rust. Check out the following resources to learn more about Vulkan and graphics programming in Rust: Vulkan Tutorial (https://vulkan-tutorial.com/) gfx-rs (https://github.com/gfx-rs/gfx), a Rust graphics library Vulkano (https://github.com/vulkano-rs/vulkano), a safe, pure-Rust wrapper around the Vulkan API Start small: Break down the compositor project into smaller, manageable tasks. Begin by implementing basic functionality, like setting up a window and drawing simple shapes. Gradually add more features, such as input handling and window management. Ask for help: Join the Wayland and Rust communities to ask questions and seek advice. You can find them on forums, mailing lists, and chat platforms like Discord or IRC. The Wayland mailing list (https://lists.freedesktop.org/mailman/listinfo/wayland-devel) and the Rust programming subreddit (https://www.reddit.com/r/rust/) are good places to start. Iterate and experiment: As you progress, keep experimenting with different graphics effects and shaders. Try to implement the features you're interested in, such as blur, window previews, and window switching.
-
Learn Rust using puzzle?
You might like Rustlings, which you should probably work through alongside The Book. Rustlings is an interactive learning tool that gives you pieces of Rust code that you need to fix and make compile. It's not really a challenge in the same way as Advent of Code, but it should help to learn the language. Couple that with the book, which is the standard learning resource for Rust, and you should pick up the concepts you are unsure of.
-
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.
-
Fellow Rust enthusiasts: What "sucks" about Rust?
Firstly, I recommend you read the book. It explains pretty much everything you are confused about.
-
Rust VS. Go
if you want to learn, unambiguously the best resource is "The Book": https://doc.rust-lang.org/book/
-
Anyone from a Typescript/React background who tried out Rust for the 1st time?
If you choose to learn Rust, then I'd strongly recommend reading the first ~15 chapters of https://doc.rust-lang.org/book before getting stuck in to a real project. It covers most of the things you'll likely be unfamilar as TS dev (such as what the Stack and the Heap are, and how ownership semantics work).
-
Programming block?
A good starter would be https://doc.rust-lang.org/book/
-
I wanna be a crab.
The Rust Book provides a bottom up approach to learning the language. From your background, you'll probably be comfortable with a lot of things in it but it's definitely worth reading through to get insight on the unique features of Rust such as the borrow checker, lifetimes, traits, error handling, etc.
What are some alternatives?
rust-by-example - Learn Rust with examples (Live code editor included)
Rustlings - :crab: Small exercises to get you used to reading and writing Rust code!
solana-program-library - A collection of Solana programs maintained by Solana Labs
github-cheat-sheet - A list of cool features of Git and GitHub.
mdBook - Create book from markdown files. Like Gitbook but implemented in Rust
rust-raspberrypi-OS-tutorials - :books: Learn to write an embedded OS in Rust :crab:
tour_of_rust - A tour of rust's language features
too-many-lists - Learn Rust by writing Entirely Too Many linked lists
sqlx - 🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, SQLite, and MSSQL.
rust - Empowering everyone to build reliable and efficient software.
Theseus - Theseus is a modern OS written from scratch in Rust that explores 𝐢𝐧𝐭𝐫𝐚𝐥𝐢𝐧𝐠𝐮𝐚𝐥 𝐝𝐞𝐬𝐢𝐠𝐧: closing the semantic gap between compiler and hardware to maximally leverage the power of language safety and thus shift OS responsibilities like resource management into the compiler.
Rust-Full-Stack - Rust projects here are easy to use. There are blog posts for them also.