3 ms·
If works with C why not Rust
by fbn79 2y ago
If works with C why not Rust
- theyknowitsxmas 2y ago[flagged]
- nine_k 2y agoInterfacing with C from Rust is harder, and Rust has fewer cross-compile targets. I'd expect Zig to be an easier deal here, with its zero-impedance interface with C.
- Yoric 2y agoIn my experience, C <-> Rust works quite well, except when the C API relies too much on macros. C++ <-> Rust is much more annoying.
- kelnos 2y ago> Interfacing with C from Rust is harder Sure, harder, but not really all that difficult. Run bindgen over the NDK headers and see what happens. Sure, for ergonomics you'll want to write safe Rust wrappers. After that's done once, it's done. > Rust has fewer cross-compile targets. Not really an issue here. Rust supports all the targets Android runs on. Natively, even: $ rustup target list | grep android aarch64-linux-android arm-linux-androideabi armv7-linux-androideabi i686-linux-android thumbv7neon-linux-androideabi x86_64-linux-android