2015–01

  • Object Safety

    A trait object in Rust0 can only be constructed out of traits that satisfy certain restrictions, which are collectively called “object safety”. This object safety can appear to be a needless restriction at first, I’ll try to give a deeper understanding into why it exists and related compiler behaviour.

    1. As usual, this post is designed to reflect 

    Read more
  • The Sized Trait

    An important piece in my story about trait objects in Rust0 is the Sized trait, so I’m slotting in this short post between my discussion of low-level details and the post on “object safety”.

    1. Per the previous post, this post is 

    Read more
  • Peeking inside Trait Objects

    One of the most powerful parts of the Rust programming language0 is the trait system. They form the basis of the generic system and polymorphic functions and types. There’s an interesting use of traits, as so-called “trait objects”, that allows for dynamic polymorphism and heterogeneous uses of types, which I’m going to look at in more detail over a short series of posts.

    1. It’s generally good practice for Rust posts to mention 

    Read more
  • crates.io crate graph

    Rust is a systems programming language that comes with an awesome package manager Cargo, which hooks into the crates.io registry as one of its possible sources of packages. The packages can have dependency relationships between each other, making the database into a natural directed graph.

    Read more