Hacker News new | past | comments | ask | show | jobs | submit login

I'm developing a game with React Native [1], and I have a single codebase that works on iOS, Android, Windows, and web (via react-native-web, although it needs a lot of work.)

I've had to write a few 'native modules' for various platforms, but it has to be platform-specific code anyway (e.g. ad networks, in-app purchases, game services)

I've been looking for a way to write some native code that I can compile to JS, and have decided to use C (or C++) with emscripten [2]. Rust or Kotlin might be fun, but I'm comfortable with C and it's easy to compile for iOS, Android (NDK), and Windows.

[1] https://sudoblock.com

[2] http://kripken.github.io/emscripten-site/




Rust should be just as easy to compile for those platforms.

Using something you're comfortable with is good though!


Yeah, that recent post [1] gave me a bit more confidence. Ooh, and it looks like I can compile Rust to wasm with emscripten! [2] I might have to reconsider Rust.

[1] https://michaelfairley.com/blog/i-made-a-game-in-rust/

[2] https://users.rust-lang.org/t/compiling-to-the-web-with-rust...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: