3 ms·
I know how cxx works, and I am not misrepresenting anything. cxx is currently unsound, and the author (dtolnay) has chimed in above with a fix they are conside
by fluffything 6y ago
I know how cxx works, and I am not misrepresenting anything.
cxx is currently unsound, and the author (dtolnay) has chimed in above with a fix they are considering that fixes it (https://news.ycombinator.com/item?id=24244121 https://news.ycombinator.com/item?id=24244121)
The API of the cxx crate is safe, and it can cause UB, therefore it is unsound.
It doesn't matter that the cxx crate API is a macro. Yes, this macro expands to unsafe code like you mention, but the problem is that this unsafe code is often "broken" (unsound).
- Ar-Curunir 6y agoUnsafe != unsound
- fluffything 6y agoI know. The Rust spec defines "unsound" as "introducing undefined behavior in safe Rust". The API of the cxx crate allows a safe Rust program to have undefined behavior, and it is therefore unsound.