Tag about-rust
25 bookmarks have this tag.
25 bookmarks have this tag.
a really interesting exploration of interpreter design, a lot of repls and thoughts on various coroutines
a really cool post explaining design of gc-arena
Very much not-production-ready (didn’t even compile on my machine), but looks pretty cool (rad, even).
Something about tying abstract models to Rust programs, looks useful.
Has some interesting features like “View HIR”, grouped code actions and failed test diagnostics.
Looks interesting, supports cancellation and other useful stuff.
Enables std debug assertions + presents an interface for building with a sanitizer.
A nice explanation of async that’s not about “threads slow”, but rather about how async as an abstraction emerges from sensible design decisions.
The Rust language has incrementally grown a set of patterns to support control-flow effects including error handling, iteration, and asynchronous I/O. In The registers of Rust, boats lays out four aspects of this pattern shared by Rust’s three effects. Today these effects are typically used in isolation, or at most combined in bespoke ways, but the Rust project has been working on ways to integrate them more deeply with each other, such as async gen blocks.
The theory of algebraic effects and handlers has explored this design space and offers answers to many of the questions that the Rust project has encountered during this work. This post will relate the patterns employed by Rust to the terminology and semantics of effects, to help build a shared vocabulary and understanding of the implications of combining multiple effects.
Another take on io_uring in Rust. Doesn’t bring its own runtime, instead choosing to integrate with tokio.
Looks really cool. I wonder what’s inside.
A very nice paper about fuzzing Rust compiler by generating custom MIR. Found some bugs in both rustc and LLVM, but notably not in Cranelift.
Microbenchmark for futexes + spinlocks and some useful links at the bottom.
Because spin locks are so simple and fast, it seems to be a good idea to use them for short-lived critical sections. For example, if you only need to increment a couple of integers, should you really bother with complicated syscalls? In the worst case, the other thread will spin just for a couple of iterations…
Unfortunately, this logic is flawed! A thread can be preempted at any time, including during a short critical section. If it is preempted, that means that all other threads will need to spin until the original thread gets its share of CPU again. And, because a spinning thread looks like a good, busy thread to the OS, the other threads will spin until they exhaust their quants, preventing the unlucky thread from getting back on the processor!
This is the closing-file-handles-on-Windows post.
I'm titling this post Surprisingly Slow because the slowness was either surprising to me or the sub-optimal practices leading to slowness are prevalent enough that I think many programmers would be surprised by their existence.
Tutorial about building a self-hosting cargo-compatible build tool. I have many problems with cargo and was interested in nixifying our job builds for eternity, so maybe there’s something useful there.
Niko’s post about using vectors (≈ arenas) instead of reference counters to model graphs. Explains how it relates to ownership and borrowing.
See also: Handles are the better pointers.
A blog post explaining the “single owner of data, everyone has indices instead of pointers” model. Not actually about Rust per se, just happens to be really useful for Rust.
See also: Modeling graphs in Rust using vector indices.
In this blog post we explore how to write a type level contains
operation for HList inspired type lists without running into overlapping trait implementations
It turns out that finite state machines are useful for things other than expressing computation. Finite state machines can also be used to compactly represent ordered sets or maps of strings that can be searched very quickly.
A free book about atomics and locks that also serves as a nice cheatsheet for x86_64, aarch64 and futexes.
A lot about sockets, syscalls and bits
An example of false sharing in real-ish workload.
Explore a Rust implementation of the persistence mechanism behind message-queues and write-ahead-logs in databases. Embark on a journey from the theoretical underpinnings to a production grade implementation of the segmented-log data structure.