Rust and Wasmer: How?

Last year I posted about WebAssembly and the Bytecode Alliance. Now I’m tire-kicking about how to make it work. Wasmer is written in Rust, has its own package manager and released its first beta. All of it is distributed as WebAssembly binaries.

While the mainstream operating system producers are in favor of pooling unprofitable compiler technology to defray development costs, they may not realize that a central bytecode may cost them market share in the end by allowing upstart operating system makers like Haiku to offer as much compatibility and better performance.

There will be growing pains, to be certain. One item that came up in the thread I linked above was the monolithic memory model used by the sandbox environment. Another thing not mentioned is that Rust programming is tricky to get a grasp on. Thirdly, the current generation of WebAssembly applications are designed to run in a browser.

My questions about the Wasmer environment are as follows: Is there someone here that develops in Rust for Haiku? Are there more hiccups to the adoption of a standardized bytecode for cross-architecture development than I’m aware of? Does this seem like plausible technology for a disruption in the tech sector?

There is already java as an example of bytecode that runs pretty much anywhere, i doubt that WASM will be much better in a standalone fashion. In the browser it is intended as a replacement for javascript that is a bit safer.

You can’t compile C++ into Java bytecode.

Also, if distributing closed source software, you can’t just use binaries if distributing to multiple architectures.

You can’t compile C++ into Java bytecode.

I don’t see why not.

As for closed source software, that can be distributed for multiple architectures as binaries fine? that’s basically what fat ELF binaries do.

There are 3 specially crafted languages that meet the requirements of of the Java VM: Scala, Kotlin and Java. The JVM is JIT compiled at best and interpreted at worst. It doesn’t support AOT compilation due to the way its generics and garbage collection work so C++ and Rust are firmly in the camp of WASM. The worst part of Java is the Classpath runtimes whose managed code bloats the system to the point of being as big as .NET 5 and C#.

Getting back on topic, does anybody know who maintains the Rust backend for Haiku? I attempted to install it as a cross-compiler on my Linux system using RustUp but couldn’t find any backend for Haiku.

EMail reply received.