Tag about-rust

25 bookmarks have this tag.

2024-08-17

145.

Piccolo - A Stackless Lua Interpreter

kyju.org/blog/piccolo-a-stackless-lua-interpreter

a really interesting exploration of interpreter design, a lot of repls and thoughts on various coroutines

144.

Techniques for Safe Garbage Collection in Rust

kyju.org/blog/rust-safe-garbage-collection

a really cool post explaining design of gc-arena

2024-06-14

139.

effing-mad: Algebraic effects for Rust

github.com/rosefromthedead/effing-mad

Very much not-production-ready (didn’t even compile on my machine), but looks pretty cool (rad, even).

2024-05-20

132.

Refinement Proofs in Rust Using Ghost Locks

arxiv.org/pdf/2311.14452

Something about tying abstract models to Rust programs, looks useful.

124.

rustaceanvim: fork of rust-tools.nvim

github.com/mrcjkb/rustaceanvim

Has some interesting features like “View HIR”, grouped code actions and failed test diagnostics.

117.

may: rust stackful coroutine library

github.com/Xudong-Huang/may

Looks interesting, supports cancellation and other useful stuff.

112.

RalfJung/cargo-careful: Execute Rust code carefully, with extra checking along the way

github.com/RalfJung/cargo-careful

Enables std debug assertions + presents an interface for building with a sanitizer.

2024-01-24

105.

Learning Async Rust With Entirely Too Many Web Servers

ibraheem.ca/posts/too-many-web-servers

A nice explanation of async that’s not about “threads slow”, but rather about how async as an abstraction emerges from sensible design decisions.

2024-01-17

103.

A universal lowering strategy for control effects in Rust

www.abubalay.com/blog/2024/01/14/rust-effect-lowering

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.

2023-12-15

93.

mfio: Completion I/O for Everyone

blaz.is/blog/post/mfio-release

Another take on io_uring in Rust. Doesn’t bring its own runtime, instead choosing to integrate with tokio.

2023-12-12

91.

FireDBG: Time Travel Visual Debugger for Rust

firedbg.sea-ql.org

Looks really cool. I wonder what’s inside.

2023-11-30

85.

Semantic fuzzing of the Rust compiler and interpreter

ethz.ch/content/dam/ethz/special-interest/infk/inst-pls/plf-dam/documents/StudentProjects/MasterTheses/2023-Andy-Thesis.pdf

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.

2023-11-28

80.

Mutexes Are Faster Than Spinlocks

matklad.github.io/2020/01/04/mutexes-are-faster-than-spinlocks.html

Microbenchmark for futexes + spinlocks and some useful links at the bottom.

79.

Spinlocks Considered Harmful

matklad.github.io/2020/01/02/spinlocks-considered-harmful.html

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!

2023-11-27

77.

Surprisingly Slow

gregoryszorc.com/blog/2021/04/06/surprisingly-slow

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.

2023-11-26

66.

Let's Build a Cargo Compatible Build Tool

ductile.systems/freight-part-1

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.

56.

Modeling graphs in Rust using vector indices

smallcultfollowing.com/babysteps/blog/2015/04/06/modeling-graphs-in-rust-using-vector-indices

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.

55.

Handles are the better pointers

floooh.github.io/2018/06/17/handles-vs-pointers.html

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.

2023-11-25

47.

Implementing truly safe semaphores in rust

neosmart.net/blog/implementing-truly-safe-semaphores-in-rust
35.

A non-overlapping type level contains operation for heterogeneous lists

blog.weiznich.de/blog/eurorust-non-overlapping-contains-for-hlists

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

23.

Index 1,600,000,000 Keys with Automata and Rust

blog.burntsushi.net/transducers

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.

18.

Rust Atomics and Locks by Mara Bos

marabos.nl/atomics

A free book about atomics and locks that also serves as a nice cheatsheet for x86_64, aarch64 and futexes.

16.

What I learned from making a DNS client in Rust

blog.adamchalmers.com/making-a-dns-client

A lot about sockets, syscalls and bits

5.

A close encounter with false sharing

morestina.net/blog/1976/a-close-encounter-with-false-sharing

An example of false sharing in real-ish workload.

2.

Building Segmented Logs in Rust: From Theory to Production!

arindas.github.io/blog/segmented-log-rust

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.