-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: build query-engine-wasm with stable rust #5167
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #5167 will not alter performanceComparing Summary
|
WASM Query Engine file Size
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like fair tradeoffs to me - let's do this 👍
@jkomyno pointed out that while it's not a concern anymore with Cloudflare Workers, it would still be a problem with Vercel Edge Functions on Hobby plan. What shall we do? |
It's pretty old at this point and we need a newer one to migrate to Rust 2024 after the stable toolchain is updated to 1.85.0. An alternative is to use the stable toolchain for the wasm build (#5167).
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.