4 ms·
Minor nitpick - wgpu is the implementation (written in Rust but exposing a C API), wgpu-rs is an idiomatic-Rust wrapper around that implementation. I did a bit
by mrec 7y ago
Minor nitpick - wgpu is the implementation (written in Rust but exposing a C API), wgpu-rs is an idiomatic-Rust wrapper around that implementation.
I did a bit of a doubletake the first time I read that, but ultimately I think not giving your own implementation language special treatment sends a good message for potential adopters.
- zozbot234 7y agoIt's also needed because only C provides a standard ABI, so any linking of binary objects that are not being built by that exact same compiler release has to go through that lowest common denominator. Rust even provides 'bindgen' and 'cbindgen' utilities to make this pattern more workable.
- mrec 7y agoOh sure, my doubletake was at them going this route rather than the "obvious" one of having the Rust implementation expose a Rust API and then having a separate C-API wrapper around that.