Tag about-rust

22 bookmarks have this tag.

Refinement Proofs in Rust Using Ghost Locks

arxiv.org/pdf/2311.14452

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

about-rust,is-paper,to-read

rustaceanvim: fork of rust-tools.nvim

github.com/mrcjkb/rustaceanvim

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

about-nvim,about-rust,is-repo,to-try

may: rust stackful coroutine library

github.com/Xudong-Huang/may

Looks interesting, supports cancellation and other useful stuff.

about-rust,is-repo,to-try

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.

about-rust,about-tools,for-memequeue,is-repo,to-try

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.

about-rust,is-blog,to-show

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.

about-compilers,about-rust,is-blog,to-show

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.

about-rust,is-project,to-try

FireDBG: Time Travel Visual Debugger for Rust

firedbg.sea-ql.org

Looks really cool. I wonder what’s inside.

about-rust,about-tools,for-memequeue,is-project,to-try

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.

about-compilers,about-rust,is-paper,to-show

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.

about-low-level,about-rust,for-memequeue,is-blog,to-show

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!

about-low-level,about-rust,is-blog,to-show

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.

about-programming,about-rust,is-blog,to-show

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.

about-rust,for-job,is-blog,to-read

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.

about-rust,is-blog,to-show

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.

about-programming,about-rust,is-blog,to-show

Implementing truly safe semaphores in rust

neosmart.net/blog/implementing-truly-safe-semaphores-in-rust
about-rust,is-blog,to-read

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

about-rust,is-blog,to-read

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.

about-rust,is-blog,to-read

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.

about-low-level,about-rust,for-memequeue,is-book,to-show

What I learned from making a DNS client in Rust

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

A lot about sockets, syscalls and bits

about-networking,about-rust,is-blog,to-read

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.

about-low-level,about-rust,for-job,is-blog,to-show

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.

about-database,about-rust,is-blog,to-read