4 ms·
If you write code that can be called without 'unsafe' then you are required to make that code safe. Whether you implement it using unsafe underneath is irreleva
by alphaalpha101 9y ago
If you write code that can be called without 'unsafe' then you are required to make that code safe. Whether you implement it using unsafe underneath is irrelevant.
The unsafe block is there because it does FFI, which hasn't actually been verified to be safe.
- leshow 9y agoYou're rephrasing exactly what I said: > The Rust compiler inherently doesn't trust ffi calls. That doesn't mean necessarily that the call is actually unsafe.