3 ms·
> At Genymobile, we wanted Gnirehtet not to require the Java Runtime Environment, so the main requirement was to compile the application to a native executable
by matt_wulfeck 9y ago
> At Genymobile, we wanted Gnirehtet not to require the Java Runtime Environment, so the main requirement was to compile the application to a native executable binary.
While I think that rust is a great choice, if multi platform static executables is your goal then I think you missed a language that does such a thing extrmely well. I’m surprised the author didn’t even consider Go for this purpose.
- stouset 9y agoYou may have missed these three points the author listed, favoring Rust: * memory safety without garbage collection, * concurrency without data races, * abstraction without overhead Go has garbage collection, doesn’t statically prevent data races, and somewhat infamously allows for only minimal abstraction.
- lossolo 9y agoYou should reread article again: > But at that time (early May), I was interested in learning Rust, after vaguely hearing what it provided, namely: And then he listed what you listed in your comment. As he wrote the main requirement was not to include JRE. This could also be achieved by using Go.
- dimfeld 9y agoI suspect that "But at that time (early May), I was interested in learning Rust" was a big consideration there. But I can also vouch for Go's excellent cross-compilation support.
- steveklabnik 9y agoRust is also pretty good at this, not quite as good as Go, but still generally pretty solid. Main related points: Rust code is statically linked by default. C code you link to may not be. Many -sys packages (that wrap C libraries) give you an option to link statically or dynamically. libc isn't statically linked by default, so that's usually the only thing not-statically linked in a pure-Rust program. You can use musl instead if you'd like.
- Ruud-v-A 9y agoHaskell is another language that compiles to native executables with minimal dependencies (binaries do link against libc, libz, and libgmp by default) which I think deserves more attention. It has great build tooling too (Stack). I have been responsible for building and deploying Python, JVM, and Haskell projects to production servers. For Haskell projects it was pretty much painless, Python and JVM were "challenging". The main advantage comes from having native binaries and a good build system that does the right thing, which Rust is also good at.
- masklinn 9y ago> Haskell is another language that compiles to native executables with minimal dependencies (binaries do link against libc, libz, and libgmp by default) which I think deserves more attention. OCaml hits most of the boxes and would be more convenient/familiar to most users since it's strict and impure.