Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>pygls WASI playgroundNew to Visual Studio Code? Get it now.
pygls WASI playground

pygls WASI playground

Swyddfa

|
202 installs
| (0) | Free
An experiment for running pygls powered language servers in VSCcode's WASI host
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-wasi-pygls Visual Studio Marketplace Version

A screenshot showing an example pygls language server running on vscode.dev via the WASI host.

Usage

It is possible to use this extension in a local version of VSCode however, its primary purpose is to demonstrate that it is possible to run a language server written with pygls entirely in the browser!

  • Open https://vscode.dev/github/openlawlibrary/pygls, you will need to sign into GitHub before the repository's content will load.
  • Install the swyddfa.pygls-wasi-playground extension
  • By default, the extension will be configured to launch the examples/servers/code_action.py server, though this can be changed by setting the pygls.server.launchScript option.
  • Open the examples/servers/workspace/sums.txt file
  • Wait for the server to boot up (will take 2-3min to load all the required resources over the network)

This extension is a WASI port of the pygls-playground extension from the upstream project, see the documentation for more details on its usage. Note that some features (like debugging!) have not yet been implemented.

Acknowledgements

This stands on the shoulders of a lot of excellent projects and resources, without which this would be impossible.

Projects

  • openlawlibrary/pygls: For making it possible to write language servers in Python
  • brettcannon/cpython-wasi-build: For providing the WASI build of CPython
  • microsoft/vscode-wasm: For implementing the WASI host in VSCode as well as the following code snippets, showing how to connect everything up
    • vscode-wasm/testbeds/python/extension.ts
    • vscode-wasm/testbeds/lsp-rust/client/src/extension.ts
    • vscode-wasm/testbeds/lsp-rust/client/src/lspServer.ts

Resources

  • Testing a Python project using the WASI build of CPython with pytest: For showing how to build and use a Python environment with the WASI build of CPython
  • VSCode and WebAssemblies
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft