Other articles

  1. The Future of This Week in Rust

    Given that I haven't written a TWiR this week or last, people have been contacting me asking if I have cancelled it. The answer is, emphatically, "no". Though I did have my doubts. I've thought about it for a while, and I've determined what I think is the best path …

    read more
  2. TBAA Revisited

    My original post about alias analysis had some issues, which I clarify and modify the algorithm to handle.

    The Problem

    There are two major issues with the algorithm I described. The first is that LLVM's TBAA is not flow-sensitive. This means that given two non-aliasing pointers, it assumes that they …

    read more
  3. Parametric Polymorphism Declaration Syntax in Rust


    Change the following syntax:

    struct Foo<T, U> { ... }
    impl<T, U> Trait<T> for Foo<T, U> { ... }
    fn foo<T, U>(...) { ... }


    forall<T, U> struct Foo { ... }
    forall<T, U> impl Trait<T> for Foo<T, U> { ... }
    forall<T, U> fn foo(...) { ... }

    The Problem

    The immediate, and most pragmatic …

    read more
  4. More On Stack Safety

    I got a lot of great feedback on my previous post, and I've done some thinking and come up with what I think is a better proposal, and a solid way forward.

    1. Teach the task API to allow spawning a task with a fixed stack size.
    2. Add the ability to …
    read more
  5. On Stack Safety

    Stack safety is a sticky topic in Rust right now. There are multiple conflicting tensions. My goal is to lay them bare, untangle the mess, and see if there's a better way forward (spoiler: there is!).

    When a program is "stack safe", the stack pointer never points outside of allocated …

    read more
  6. Rust's Memory Management

    Note: I accidentally published this. I won't take it down, but it is incomplete and I do not guarantee its correctness.

    Note 2: I don't think this post is necessary anymore, as the tutorial has been updated significantly, and is quite understandable. As such I don't plan on finishing this …

    read more
  7. Structure and organisation of rustc

    This is the second part of a planned series about rustc, the Rust compiler

    This post is going to discuss the structure and organisation of rustc, covering the major moving parts and how they interact. I'll start, of course, where it starts, and ending, of course, where it ends.

    rustc …

    read more
  8. How I got started hacking rustc, and how you can too!

    This is the first part of a planned series about rustc, the Rust compiler

    I remember first hearing about Rust during the summer of 2011. In fact, I remember the exact moment. I was at MIT, doing their Junction program. It was during a seminar about semiconductors. I remember browsing …

    read more