by csomar · 8y ago · 0 comments
It's semantics-preserving, and C constructs are not expected to match safe Rust, so that makes sense, Corrode does more or less the same.
Citrus generates "safe rust", it also doesn't generate working code.
[0] https://github.com/carllerche/slab
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Type...
It allows unsafe C to be incorporated into safe Rust while maintaining the same level of safety.
A similar less ergonomic solution would be to load C via WASM modules.
I'd take slab or wasm over whole lib translation into unsafe Rust.