I think we can make do with a small number of unsafe primitives: "peek"
and "poke" to get started, and some sort of unsafe cast operation to
cast between blobs of memory and Rust records. Rust records are
fortunately laid out more or less exactly the same as C structs.

Naturally, all of these would mark the caller unsafe.

Perfect. Yes, having unsafe operations in rust itself should make it possible to implement some of the optimised data structures used in C or reflect on its own state (for a GC).

Patrick

Cheers,
Rafael
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to