Has anyone set up Deno's LSP on WASM with monaco?
I want to create a web-only monaco editor for Deno scripts, is it possible to run it on WASM and connect to monaco language server plugin?
4 Replies
I wasn't able to find the answer to your question in the official Deno documentation. However, setting up Deno's Language Server Protocol (LSP) on WebAssembly (WASM) with Monaco Editor is a complex task that would involve several steps, including compiling the LSP to WASM and integrating it with Monaco.
From your message, there are no obvious syntax errors or mistakes to point out. However, please note that my advice is not based on the Deno documentation, and I recommend double-checking the accuracy of any advice given.
Integrating Deno's LSP with Monaco in a web environment would likely require a significant amount of work, including understanding the capabilities of WASM, the requirements of the Monaco Editor, and how Deno's LSP can be adapted to run in this context. If you decide to pursue this project, you may need to explore resources beyond the official documentation, such as community forums, GitHub repositories, or discussions with developers who have undertaken similar projects.
kinda, will be super slow but you can sort of use container2wasm
heres an example of a deno container demo https://github.com/ktock/container2wasm-demo-deno
GitHub
GitHub - ktock/container2wasm: Container to WASM converter
Container to WASM converter. Contribute to ktock/container2wasm development by creating an account on GitHub.
GitHub
GitHub - ktock/container2wasm-demo-deno
Contribute to ktock/container2wasm-demo-deno development by creating an account on GitHub.
is it possible to run the LSP on any code without opening up security holes? Does the LSP need to download all imports?
For example, I want to send a file to an endpoint POST /deno-lsp [file contents] and get theLSP results (or however it should work)
my understanding is that LSP needs access to the filesystem and uses deno's dependency cache. so yes, I think if you were to send the LSP the source code of a file it would download the related dependencies and look for them on disk