Re:The Dark Arts of Advanced and Unsafe Rust Programming
by saagarjha on Friday August 24, 2018 @12:51PM
(#17836096)
This isn’t really enough. What you really want is something that hoists C memory management into the the language you’re using; for example, the constructor for a high-level type would manage allocating memory and calling the constructor function, and the deinitializer would map to the custom free/close/release method. This isn’t really anything that I think can be automated; you’re going to have to write this wrapper yourself or find someone who’s already done it.
[ Parent
| on HN ]
Re:The Dark Arts of Advanced and Unsafe Rust Programming
by nickpsecurity on Friday August 24, 2018 @01:19PM
(#17836270)
You might be able to kernelize it in a way where other language features are built on top of it. That's what House team did for a Haskell-based OS with unsafe stuff was stuffed into the H Layer.
http://programatica.cs.pdx.edu/House/
Likewise, metaprogramming routines that generate C code or interfaces for you from language statements closer to host.