chore: build query-engine-wasm with stable rust #5167
+2
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We previously used the nightly toolchain to build
query-engine-wasm
to make use of some nightly-only rustc and cargo flags in an attempt to reduce the size as much as possible, as our goal was to fit into the 1 MB gzip bundle limit in the Cloudflare Workers free plan, while still leaving enough space for the client and the user's application.Specifically, we used it to:
Other the the last point above, which is obviously a problem, there are more:
While abort in WASM immediately abort the Node.js process too, its behaviour on Cloudflare Workers is weird, and apparently somehow the JavaScript code may continue running and calling into QE again, leading to memory leaks and undefined behaviour.
Keeping the nightly toolchain up to date is a hassle (as it's pinned) and we usually don't even bother doing it until it's too old. When we do, we either pick latest (which might have bugs) or need to spend time figuring out the last nightly for a specific version, which would correspond to it promoted to beta.
All in all, it is a maintenance burden, a source of technical debt, and the reason I can't consider
query-engine-wasm
production ready. Given that:I propose we accept this size increase and switch to the stable toolchain.