3 ms·
Web assembly is very low level. It's not a VM, there are no strings. It's designed to model 'assembly' style instructions. To do TS on JS you'd have to build a
by jariel 5y ago
Web assembly is very low level. It's not a VM, there are no strings. It's designed to model 'assembly' style instructions.
To do TS on JS you'd have to build a VM on top of WA.
And that would probably be pointless of course.
- crazypython 5y agoIt is a VM. Most VMs use High-Level Intermediate Representation (HIR or bytecode). WebAssembly uses a Low-Level Intermediate Representation. (LIR) A LIR is not an assembly.
- dassurma 5y agoIdk man. webassembly.org — the site authored by the inventors — literally starts with “WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine.”
- jariel 5y agoMy answer is correct. Yes of course WASM is a VM of some kind, that should be obvious enough i.e. people are not running machine code in WASM. My response indicated that if you want to run JS on WASM you have to build another VM on top of WASM (which you indicated is already a VM, sure). To do JS in WASM you'd have to build something like V8 (a VM) on top of WASM.
- pjmlp 5y agoActually, they might. It just a matter of creating a FPGA implementation.