3 ms·
Wasm is pretty simple; Don't confuse it with the "web" part of the acronym. And as others point out; wasm is a backup. You can use native binding without going
by aDyslecticCrow 1y ago
Wasm is pretty simple; Don't confuse it with the "web" part of the acronym. And as others point out; wasm is a backup. You can use native binding without going through wasm, which provide better performance,
- mgaunard 1y agoit needs a compiler to convert it to machine code, it also has a non-trivial runtime...
- Bigpet 1y agoDon't know if you need to compile, you might want to but I think interpreting might seem reasonable if size/complexity is a concern. Is the runtime really that large? I know with wasm 2.0 with garbage collection and exceptions is a bit of a beast but wasm 1.0? What's needed (I'm speaking from a place of ignorance here, I haven't implemented a WASM runtime)? Some contiguous memory, a stack machine, IEEE float math and some utf-8 operations. I think you can add some reasonable limitations like only a single module and a handful of available imports relevant to the domain. I know that feature creep would almost inevitably follow, but if someone cares about minimizing complexity it seems possible.
- drob518 1y agoIf you view WASM as a worst case fallback, then you could implement a simple interpreter and transcode the file to something that your program has native decoders for. Yes, that might be slow, but at least the data remains usable. At least, that’s my understanding. I don’t have a dog in the hunt.