Closed saulecabrera closed 3 months ago
Not quite ready for review, but almost. I want to see what CI says.
Ok, so all tests are passing here. I'm working on migrating our json/msgpack ser/de and that should be the last step (aside from vetting the new dependencies) to get this in a review-ready state.
We should update the READMEs for
quickjs-wasm-sys
andquickjs-wasm-rs
to indicate they are deprecated in favour ofrquickjs
. Would that make sense to do as part of this PR or in a follow up one?
I'll do that as a follow-up. I added an entry in the PR description.
Oops meant to push https://github.com/bytecodealliance/javy/pull/618/commits/5fde19c7316d693bb895e0b169a038622a83e657, into a copy branch to do some testing -- I'll revert it.
Thanks a lot for doing rquickjs switch work .Till when can I expect the new release on github roughly ?
Mid June is my estimate: we're doing more extensive testing and working on other improvements before releasing the next version.
Description of the change
Historically, the Javy project has relied on its own QuickJS bindings in order to consume QuickJS' functionality. When the project started, there were very limited options for bindings that could work for our use-case and more importantly, bindings that would compile to
wasm32-wasi
. That said, bindings under this project are "good enough" for Javy, but they are probably not the most ergonomic for use-cases that require more complex interactions with QuickJS.The Rust <> QuickJS landscape has changed in the past few years, which means that it's probably a good time to reconsider our initial decisions.
This PR proposes migrating to
rquickjs
and dropping support forquickjs-wasm-rs
andquickjs-wasm-sys
. Therquickjs
bindings are more ergonomic and enable more natural interactions between Rust and QuickJS' API.With the adoption of
rquickjs
, we'd be able to address issues like: https://github.com/bytecodealliance/javy/issues/605, https://github.com/bytecodealliance/javy/issues/608, https://github.com/bytecodealliance/javy/pull/617 and https://github.com/bytecodealliance/javy/pull/611.This change is divided in a series of commits, but it's better reviewed as a whole, given that I didn't put enough thought to make each commit self-contained.
In general, this change doesn't introduce any functional changes, dropping support for
quickjs-wasm-rs
is the only breaking change introduced by this PR. The only exception is that I fixed a bug in our number deserialization process, in which the implementation was not respecting theMIN_SAFE_INTEGER..=MAX_SAFE_INTEGER
range.This change is already big as-is; I'm planning on creating follow-up PRs for:
docs
quickjs-wasm-rs
andquickjs-wasm-sys
with a deprecation notice.Checklist
javy-cli
andjavy-core
do not require updating CHANGELOG files.