Metaflame's Workshop

Random stuff I find interesting; Rust, Blender, personal thoughts, and so on.

Self-referential Data across Functions

Self-referential structs are infamously painful to implement, and, besides something like an arena allocator, are impossible without messy or unsafe code. Awkward data structure juggling to satisfy the borrow checker, redundant runtime checks to delay borrow checking, lots of unwraps and pinky promises, or outright unsafe code that can be a pain to validate - it's usually just much better to rethink your data structures.

November 09, 2025

1

Unique generic type instantiation

Abusing unnameable function types

October 22, 2025