Benno's Blog #rust


# Virtual Places and Borrow Checker Integration

In this blog post, I present an idea on how we can specify the borrow checker behavior in the context of the field projection design effort. This work builds upon the blog post The Algebra of Loans in Rust by Nadrieril. I will give a more field projection focused proposal, whereas that blog post looked at the general way the borrow checker works.

# Language feature: in-place construction

In this blog post, I am going to go over how in-place constructors could be added to Rust. Doing this will enable better ergonomics for embedded and kernel-space programs. There are two distinct problems that this feature will cater to:

  • safe pinned initialization,
  • ergonomic in place initialization of big structs.

I explained in my overview blog post why the first point is needed. The second point is also wanted by Linux kernel developers, because they need exact control over where something gets initialized. As the kernel has very limited stack size -- compared to userland programs -- and thus cannot allocate big structs (multiple KB in size) on the stack.

# Overview: Safe Pinned Initialization

In this blog post I will try to explain the problem of Safe Pinned Initialization. I am going to tackle the issue from two perspectives:

  • Rust language design: how can we make Safe Pinned Initialization ergonomic for as many people as possible?
  • Linux kernel design: how can we satisfy the kernel's needs with Rust?

In order to aid the second perspective, I will try to cater specifically to C-only kernel developers. While this document is written with C developers in mind, it does not explain the basic concepts of Rust. So if you are not at all familiar with Rust, I would recommend reading at least chapters 3 and 4 of the Rust book.

# Placement-by-return

This is a collection of thoughts/ideas on the placement-by-return RFC.