Implementing a WASI Host for Visual Studio Code – Dirk Bäumer, Microsoft
It has always been our goal to support the full edit/compile/debug development cycle for languages like Python or C/C++ in VS Code for the Web. But in order to do this, it is necessary to execute Python code and/or run a C/C++ compiler in the browser. In 2022, the VS Code team started an endeavor to run Python code by compiling a Python interpreter to WASM. We accomplished this by developing a WASI host on top of VS Code’s extension host API. In this session, Dirk discusses implementing VS Code’s own WASI host and the advantages it brings to running Python code in VS Code for the Web. Furthermore, he presents different design choices that the team explored for the WASI host and gives an outlook on moving the host from WASI snapshot preview1 to the new component model. Also discussed is how VS Code extension authors can bring their own WebAssembly code and run it using VS Code’s WASI implementation.