4 ms·
...where "A Subset of TypeScript" = JavaScript? If I am not using this, what are the other languages I can use today that compile down to WASM?
by freechessclub 9y ago
...where "A Subset of TypeScript" = JavaScript?
If I am not using this, what are the other languages I can use today that compile down to WASM?
- chrismorgan 9y agoNo, a different subset. JavaScript is unsuited to WebAssembly because of its dynamic nature; this project is taking the type system of TypeScript and using it to allow compilation to WebAssembly, but the dynamic parts of TypeScript/JavaScript are disallowed. Just as asm.js is a subset of JavaScript that can be optimised more successfully, AssemblyScript is a subset of TypeScript that can be optimised more successfully.
- greggman 9y agoYou mean other than C/C++ where you cab take advantage of 30 years of libraries ? http://kripken.github.io/emscripten-site/ http://kripken.github.io/emscripten-site/
- BatFastard 9y agoYes, other than C++.
- disordinary 9y agoRust has a WASM target as well as ASM.JS. Although, it seems as though it compiles to ASM.JS and then compiles that ASM into WASM, so likely anything that compiles to ASM.JS can also then be further compiled into WASM.