Closed akoreman closed 3 months ago
This binary is further encoded as a base64 string in a Javascript file to make it easy to be bundled together with the other assets of the server.
Why can't it be bundled as a wasm file?
@justinmk3 Main reason for not bundling it as a wasm file is to make it easier to use the server as a web worker when assets are loaded from a CDN. If the binary is provided as a wasm file, the worker needs to know which CDN URL to fetch the binary from. This URL needs to be communicated by the client to the web worker which adds complexity to the integration into a web app.
Problem
Adds an LSP server for the PartiQL language. This server offers diagnostics for PartiQL files by parsing the file using the Rust parser maintained by the PartiQL team.
This parser is compiled to a WebAssembly binary using the bindings maintained by the PartiQL team in the PartiQL playground package. This binary is further encoded as a base64 string in a Javascript file to make it easy to be bundled together with the other assets of the server. See the README for instructions on how to update the binary.
Solution
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.