3 ms·
For an image decoding library, you'll still need to expose a C API if you want anything to be able to use your library. You could only provide a library for you
by yjftsjthsd-h 3y ago
For an image decoding library, you'll still need to expose a C API if you want anything to be able to use your library. You could only provide a library for your preferred language(s) but if like Google you're trying to push an all-new format the ecosystem buy-in is a big deal. And obviously you can provide a C-compatible library without writing the library in C, but it's more complexity to handle.
(Edit: I should mention that this is one reason why I really like wuffs, mentioned elsewhere in this thread; it's a safer language that compiles down to C, so you can have mostly the best of both worlds)
- colejohnson66 3y agoIf you want a C-style API, that can be had in Rust as well: https://stackoverflow.com/questions/71904069/how-can-i-export-a-function-written-in-rust-to-c-code https://stackoverflow.com/questions/71904069/how-can-i-expor...
- hot_gril 3y agoCan vouch for the ease of Rust-C FFI. It was very simple for the newbie I was at the time I used it.