not really, no. WASM is a generic hardware-independent format for instructions. it’s like instructions for a virtual CPU, not a real one. it gets translated into the instructions for the real processor on the target device. in this way, it can run on any hardware.
comparing it to other setups such as java or javascript (which are also both hardware-independent), it runs much faster because it is much hardware-oriented, while java and javascript require abstract features such as a garbage collector, which makes real-time processes impossible.
WASM was made for browsers but can run anywhere. You can cross compile any language to it.
The trickier problem is compiler time hardware optimization, but there’s talks about appending architecture specific optimization hints for the runtime, so you can let the compiler search for optimal implementations when creating the bytecode so the JIT engine doesn’t have to. (that does mean you’re essentially compiling multiple times while creating the bytecode, but for performance sensitive software it’s worth it)
A bunch of desktop apps use electron anyways as a runtime. WASM could allow us to have better/more reliable software that doesn’t rely on JS, which isn’t ideal for many use cases.
Is it efficient? Definitely not, but for system apps we have other choices which are more performant like C and Rust. These days 90% of the software people use are either web apps in a browser or web apps with an electron gui running outside their browser but inside the Electron browser: P.
I have been waiting impatiently for WASM to really take off. I’d imagine that some day, it will be the most popular way to build software.
But isn’t WASM for web browsers? How will it be used to build general software
not really, no. WASM is a generic hardware-independent format for instructions. it’s like instructions for a virtual CPU, not a real one. it gets translated into the instructions for the real processor on the target device. in this way, it can run on any hardware.
comparing it to other setups such as java or javascript (which are also both hardware-independent), it runs much faster because it is much hardware-oriented, while java and javascript require abstract features such as a garbage collector, which makes real-time processes impossible.
WASM was made for browsers but can run anywhere. You can cross compile any language to it.
The trickier problem is compiler time hardware optimization, but there’s talks about appending architecture specific optimization hints for the runtime, so you can let the compiler search for optimal implementations when creating the bytecode so the JIT engine doesn’t have to. (that does mean you’re essentially compiling multiple times while creating the bytecode, but for performance sensitive software it’s worth it)
A bunch of desktop apps use electron anyways as a runtime. WASM could allow us to have better/more reliable software that doesn’t rely on JS, which isn’t ideal for many use cases.
Is it efficient? Definitely not, but for system apps we have other choices which are more performant like C and Rust. These days 90% of the software people use are either web apps in a browser or web apps with an electron gui running outside their browser but inside the Electron browser: P.