3 ms·
Either the plugin needs to be written in a common language (JS for VSCode, Python for Sublime Text) or native (Terraform does this for custom providers) but nee
by conradludgate 5y ago
Either the plugin needs to be written in a common language (JS for VSCode, Python for Sublime Text) or native (Terraform does this for custom providers) but need to support many architectures.
WASI fits snuggly in between, being a common intermediate language
- ReleaseCandidat 5y agoBut JS _is_ a common intermediate Language. I guess more languages compile to JS than to WASM.
- pbronez 5y agoWASM actually started life as a subset of Javascript called asm.js. Code in other languages was compiled to this subset of Javascript so they could execute in the browser. Once that proved useful, they decided to skip the Javascript step and agree on a binary format that browsers could execute directly. That's WASM. From https://en.wikipedia.org/wiki/Asm.js https://en.wikipedia.org/wiki/Asm.js > asm.js consists of a strict subset of JavaScript, to which code written in statically-typed languages with manual memory management (such as C) is translated by a source-to-source compiler such as Emscripten (based on LLVM).[2] Performance is improved by limiting language features to those amenable to ahead-of-time optimization and other performance improvements. > asm.js is mostly rendered obsolete with the introduction of WebAssembly (wasm), which has a bytecode format that is faster to parse. Efforts to extend JavaScript with more low-level features like SIMD.js has also been suspended since 2017. asm.js remains useful primarily as a "fallback" for wasm
- UtherII 5y agoIt can used as an intermediate language, and since it was the only way to run code on the browser without plugins before WASM, it happened a lot. But nowadays WASM is much more suitable for the job. JavaScript was designed as a scripting language, not a low level intermediary language.