Get the latest tech news

Smart pointers for the kernel


Rust has a plethora of smart-pointer types, including reference-counted pointers, which have special support in the compiler to make them easier to use. The Rust-for-Linux project would like to reap those same benefits for its smart pointers, which need to be written by hand to conform to the Linux kernel memory model.

Rust has a plethora of smart-pointer types, including reference-counted pointers, which have special support in the compiler to make them easier to use. The Rust-for-Linux project would like to reap those same benefits for its smart pointers, which need to be written by hand to conform to the Linux kernel memory model. On nightly Rust compilers, users can enable an experimental feature and then have their pointer type implement CoerceUnsized to indicate that it supports that.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of kernel

kernel

Photo of Smart Pointers

Smart Pointers

Related news:

News photo

The magic (image resampling) kernel

News photo

Committing to Rust in the Kernel

News photo

Real-time Linux is officially part of the kernel