3 ms·
"We don’t even rely on Rust syntax and features for safety, since it’s handled at the lower level [...]" This part makes me nervous. Isn't it basically saying
by _-___________-_ 8y ago
"We don’t even rely on Rust syntax and features for safety, since it’s handled at the lower level [...]"
This part makes me nervous. Isn't it basically saying "we wrote perfectly safe C and made a Rust wrapper for it"?
- kvark 8y agoThere isn't such thing as "safe C" :) Any pointer passed in can be garbage with unintended consequences. Surely, there are some bits of Rust that are required for the safe operation over wgpu-native, such as taking an address of a borrowed struct. What this quote is trying to convey is that we don't rely on super strong types for safety, for example, like Vulkano [1] does. We can expose Rust API that borrows command buffers and resources where they are used and does the move semantics, and at the same time we can expose Rust API that implements Copy for all the objects, and it's still going to be fine, because the C layer doesn't rely on a lot of constraints from above. [1] http://vulkano.rs/ http://vulkano.rs/