LLDB's TypeSystems: An Unfinished Interface
Well, it's "done". TypeSystemRust
has a (semi) working prototype for LLDB 19.x. It doesn't support expressions or MSVC targets (i.e. PDB debug info), and there are a whole host of catastrophic crashes, but it more or less proves what it needs to: Rust's debugging experience can be improved, and there are worthwhile benefits to a working TypeSystem
that can't be emulated on other layers of the debugging stack.
If you want to test it out, you'll need to build my fork from source (sorry), but then lldb.exe
can be used as-is, or you can point a debugger extension like lldb-dap or CodeLLDB to your newly built lldb-dap.exe
or liblldb.dll
respectively. If you're on Windows, make sure to compile for MSVC otherwise CodeLLDB won't be able to interface with liblldb
properly.
So you want better debug info?
Let me start with an emphatic "me too".
I've put many of my side projects on hold because recent events have resulted in, what I consider to be, an unacceptable degredation of the debugging experience. It's a bit hard to focus on whatever I'm doing when I have to fight to figure out what's in a Vec
. One of the great things about programming is that we're the ones who make our own tools; we don't have to just blindly accept mediocrity.
TwoVec: A Very Silly Container
Lets say you want to store two different types of objects in 1 container. Simple right? Just slap those puppies in a tuple and you're good to go:
let list: = vec!;
But what if you wanted to include elements of two different types in arbitrary orders? Thankfully, there's sum types for that:
pub
...
One small problem. That's wasteful.
Why is language documentation still so terrible?
Seriously, is there a good reason for this? I feel like I'm going crazy because almost every language doc I've looked at is legitimately awful in a bunch of obvious ways. It's not uncommon to see third party libraries updated by a single person that are better structured, more thorough, with better layouts than the official documentation upheld by the language team itself.
Bypassing the borrow checker - do ref -> ptr -> ref partial borrows cause UB?
Partial borrows across function boundaries don't really work in Rust. Unfortunately, that's kind of a major issue. There are workarounds, some are outlined here, but all of them come with pretty major drawbacks.