2 ms·
I have written several VSCode extensions using Rust so this was quite interesting. > Build platform-specific binaries from the Rust crate and ... do some host
by IshKebab 5y ago
I have written several VSCode extensions using Rust so this was quite interesting.
> Build platform-specific binaries from the Rust crate and ... do some host identification magic .... This was also pretty easy to rule out because [of] ... the complexities of multi-platform builds.
This is how I currently do it, but I agree it is not ideal. Wasm is a nicer solution.
> Both tower-lsp and lspower require implementing the language server as an asynchronous service powered by Tower, a framework for async Rust. We didn't think the benefits of asynchrony would be worth the added complexity to the language server.
I definitely agree. Async is way over-used in Rust land. That said, it wasn't that hard to use tower-lsp. It's pretty well designed.
> we initialize the Wasm-ified polar-language-server and manage the server side of the LSP connection from TypeScript.
Does this mean that it's more difficult to use the LSP from anything except VSCode?
I think the solution I would go for is probably to compile my language server with Wasmtime, bundle Wasmtime for every platform I support and then just run it through that. Then I don't have to cross-compile my Rust code, but it's still a fully featured language server on its own.
- forks 5y ago> Does this mean that it's more difficult to use the LSP from anything except VSCode? Could be... we shall see when we try porting it to a second IDE. :-D I was so focused on VS Code that I haven't spent much time considering the set of changes that'll be required to support a second client. > I think the solution I would go for is probably to compile my language server with Wasmtime, bundle Wasmtime for every platform I support and then just run it through that. Then I don't have to cross-compile my Rust code, but it's still a fully featured language server on its own. Bundling in wasmtime is a really interesting idea. Thanks for sharing!