Rust 1.0: Status report and final timeline
Rust looks interesting.<p>One thing I'm not clear on it if can do, and that I'm interested in, is secure destructors.<p>Say I'm handling crypto, and I'm carting around an ephemeral key. When this goes out of scope, I definitely no matter what, want this <i>zeroised</i> by its destructor - as opposed to just having it (or a temporary copy made by a compiler optimisation!) zombling around the heap, stack or forgotten unused xmm registers because the compiler figured since I don't reference it again, the memory's contents are no longer important.<p>Current approaches to this involve explicit_bzero(), or other similar memset(0)-and-I-really-mean-it-don't-optimise-this-out techniques. (And a fair bit of testing and prayer when it comes to potential temporary copies or registers.) But unless you're doing it in assembly language, you don't really <i>know</i>. (The stack beneath you, such as the OS, any hypervisors, SMM, AMT, SGX, µcode etc, aside, of course!)<p>I'm not quite clear what Rust's behaviour with this scenario is. If it can do this easily, even potentially, I am <i>very</i> interested…?