Re:Show HN: How to program in Rust as if it was old school C...
by steveklabnik on Tuesday December 20, 2022 @05:45PM
(#34073869)
Yeah, that gets closer for sure. refcell is still going to add a bit of state to the value inside of the allocation, but at least the shared_ptr and Rc/Arc bits are the same semantic, so it'll be closer!
EDIT:
As far as I can tell less than 190 lines of asm but I don't know shared_ptr enough to produce exactly the same code.