~/talk

Initialization in Rust with pin-init

links:none on file
slides:none on file

Rust code in the kernel uses pin-init to perform safe, ergonomic in-place initialization of address-sensitive types, avoiding 1MB stack overflows by returning initializers (effectively closures) that run later. The crate supports pinned and normal initializers, error-aware allocation with ? and automatic rollback on failure, pin projections via a proc macro, and ad-hoc init blocks. Work is ongoing to standardize in-place initialization as a language feature and vendor the crate in the kernel.

AI-written summary · about

  1. 0:00Why initialization is hard
  2. 3:54Outpointers in C vs Rust
  3. 7:25Introducing pin-init
  4. 13:26Pinning and initialization traits
  5. 17:41Raw pointers vs references
  6. 21:35Structural pinning explained
  7. 25:29When initialization happens
  8. 27:33Error handling in initializers
  9. 32:28New features in pin-init
  10. 35:57Future of in-place initialization
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.