3 ms·
Lots of wasm questions: In what sense can a wasm program "crash?" What sort of backtraces are available in that event? How's the debugging story? Is there a f
by ridiculous_fish 7y ago
Lots of wasm questions:
In what sense can a wasm program "crash?" What sort of backtraces are available in that event? How's the debugging story?
Is there a fast wasm runtime available for non-JIT platforms? Is there big-endian support (still hanging on)?
- kbumsik 7y ago> In what sense can a wasm program "crash?" I'm not an expert in wasm but memory allocation may fail depending on the host environment. Also, runtimes of higher languages may define their own crash cases. As it is a stack machine dumping a stacktrace in case of "crash" should be easy. > Is there big-endian support? Wasm still assumes little-endian byte ordering. Honestly who really cares about big-endian? https://github.com/WebAssembly/design/blob/master/Portability.md https://github.com/WebAssembly/design/blob/master/Portabilit...
- kimundi 7y agoWasm programs can only crash by triggering a "trap", which has the well defined semantic of aborting the entire (wasm) function stack at that point. It depends on the embedding host how much backtrace or debugging support you get for this. I'm not sure exactly what you mean with non-JIT platforms, As far as I know, most wasm hosts that generate native code just compile the entire wasm module at once, so its less like a JIT runtime and more like a regular compiler. If you mean not compiling to native code at all, then you just have the performance of a plain old stack machine bytecode interpreter. Not sure how many there are currently and how well optimized they are though. About big-endian - afaik little-endian is just the spec for storing to wasm's linear memory - the actual representation of stack values can be arbitrary (since you can not inspect their bytes directly).
- sanxiyn 7y ago> Is there a fast wasm runtime available for non-JIT platforms? Yes, Wasmtime can do AOT. Many other runtimes can do AOT as well.