Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Right, but that's not controversial, is it? If you call into Rust from C, you need to preserve Rust's invariants; Rust can't preserve them for you.


I don't think anybody expects incorrect code to behave correctly, but as usual the issue is about mistakes. The C compiler can't help you preserve Rust's invariants, so when you make wrong assumptions or declare a wrong interface, instead of a compilation error, you can get UB silently creeping in.

The FFI-glue language they propose is meant to prevent these types of mistakes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: