Surelock by @expede.wtf is a really fascinating and impressive use of the Rust type system to prevent deadlocks at compile time. I will 100% be using this for future Rust projects. notes.brooklynzelenka.com/Blog/Surelock
Post
notes.brooklynzelenka.comSurelockNOTE Hello r/rust! Thank you for the interest in this work and for the delightful conversation ❤️ I hate deadlocks. Maybe you do too.
Unfortunate github.com/akonradi/loc... wasn’t included as prior art as well. I have vibe coded something similar based on it, with a proc macro for specifying the DAG.
github.comGitHub - akonradi/lock-ordering: Lock ordering enforcement at compile time in RustLock ordering enforcement at compile time in Rust. Contribute to akonradi/lock-ordering development by creating an account on GitHub.
Seems like surelock should handle runtime locks? Or do you mean the lock-ordering crate? I think @expede.wtf wasn't trying to list all prior art, just the ones that influenced the design.
Looks like lock_tree, which was listed as prior art, was also based on the Fuchsia lock-ordering design. Hence, it seems lock-ordering (indirectly) was declared as prior art after all :)
0 reposts1 like
It’s more I saw a lot of parallels in the design with this issue from that project (filed by one of fuschia engineers). github.com/akonradi/loc... Not knocking the post and crate it’s awesome!
github.comImprove safety · Issue #2 · akonradi/lock-orderingCurrently, this API aims to make deadlocks difficult to produce, but it does not make them impossible. This issue describes known holes which safe code can fall into, and proposes API changes to fi...