Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 26 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ wasmtime-wasi = "45"
wasmtime-wizer = "45"
wasm-opt = "0.116.1"
anyhow = "1.0"
javy = { path = "crates/javy", version = "7.0.1-alpha.1" }
javy = { path = "crates/javy", version = "8.0.0-alpha.1" }
tempfile = "3.27.0"
tokio = "1"
uuid = { version = "1.23", features = ["v4"] }
Expand Down
10 changes: 10 additions & 0 deletions crates/javy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic
Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Changed

- Bumped rquickjs to 0.12.0.

### Removed

- `big_int` on `Config`. `big_int` is enabled unconditionally.

## [7.0.0] - 2026-03-17

### Changed
Expand Down
6 changes: 3 additions & 3 deletions crates/javy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "javy"
version = "7.0.1-alpha.1"
version = "8.0.0-alpha.1"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand All @@ -14,12 +14,12 @@ targets = ["wasip1", "wasip2"]

[dependencies]
anyhow = { workspace = true }
rquickjs = { version = "0.11.0", features = [
rquickjs = { version = "0.12.0", features = [
"array-buffer",
"bindgen",
"disable-assertions",
] }
rquickjs-serde = { version = "0.5.0", optional = true }
rquickjs-serde = { version = "0.6.0", optional = true }
serde = { workspace = true, default-features = true, features = ["derive"] }
serde_json = { workspace = true, optional = true }
serde-transcode = { version = "1.1", optional = true }
Expand Down
8 changes: 1 addition & 7 deletions crates/javy/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ bitflags! {
const MAP_SET = 1 << 6;
const TYPED_ARRAY = 1 << 7;
const PROMISE = 1 << 8;
const BIG_INT = 1 << 9;
// Removed 9 representing BIG_INT.
// Removed 10 and 11 representing BIG_FLOAT and BIG_DECIMAL.
const OPERATORS = 1 << 12;
const BIGNUM_EXTENSION = 1 << 13;
Expand Down Expand Up @@ -149,12 +149,6 @@ impl Config {
self
}

/// Configures whether supoort for `BigInt` will be available.
pub fn big_int(&mut self, enable: bool) -> &mut Self {
self.intrinsics.set(JSIntrinsics::BIG_INT, enable);
self
}

/// Configures whether operator overloading wil be supported.
pub fn operator_overloading(&mut self, enable: bool) -> &mut Self {
self.intrinsics.set(JSIntrinsics::OPERATORS, enable);
Expand Down
5 changes: 2 additions & 3 deletions crates/javy/src/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ use rquickjs_serde::{de::Deserializer, ser::Serializer};
pub fn parse<'js>(context: Ctx<'js>, bytes: &mut [u8]) -> Result<Value<'js>> {
let mut deserializer = simd_json::Deserializer::from_slice(bytes)?;
let mut serializer = Serializer::from_context(context.clone())?;
serde_transcode::transcode(&mut deserializer, &mut serializer)?;

Ok(serializer.value)
let value = serde_transcode::transcode(&mut deserializer, &mut serializer)?;
Ok(value)
}

/// Transcodes a [Value] into a slice of JSON bytes.
Expand Down
4 changes: 2 additions & 2 deletions crates/javy/src/messagepack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use rquickjs_serde::{de::Deserializer, ser::Serializer};
pub fn transcode_input<'js>(context: Ctx<'js>, bytes: &[u8]) -> Result<Value<'js>> {
let mut deserializer = rmp_serde::Deserializer::from_read_ref(bytes);
let mut serializer = Serializer::from_context(context.clone())?;
serde_transcode::transcode(&mut deserializer, &mut serializer)?;
Ok(serializer.value)
let value = serde_transcode::transcode(&mut deserializer, &mut serializer)?;
Ok(value)
}

/// Transcodes a [`JSValueRef`] into a MessagePack encoded byte vector.
Expand Down
4 changes: 0 additions & 4 deletions crates/javy/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ impl Runtime {
unsafe { intrinsic::Promise::add_intrinsic(ctx.as_raw()) }
}

if intrinsics.contains(JSIntrinsics::BIG_INT) {
unsafe { intrinsic::BigInt::add_intrinsic(ctx.as_raw()) }
}

if intrinsics.contains(JSIntrinsics::TEXT_ENCODING) {
text_encoding::register(ctx.clone())
.expect("registering TextEncoding APIs to succeed");
Expand Down
11 changes: 11 additions & 0 deletions crates/plugin-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic
Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Changed

- Bumped rquickjs to 0.12. If you are using a plugin for dynamic linking, you
are strongly encouraged to change the import namespace.

### Removed

- `big_int` on `Config`. `big_int` is enabled unconditionally.

## [6.0.0] - 2026-03-17

### Changed
Expand Down
2 changes: 1 addition & 1 deletion crates/plugin-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "javy-plugin-api"
version = "6.0.1-alpha.1"
version = "7.0.0-alpha.1"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/plugin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::shared_config::SharedConfig;

mod shared_config;

import_namespace!("javy-default-plugin-v3");
import_namespace!("javy-default-plugin-v4");

fn config() -> Config {
// Read shared config JSON in from stdin.
Expand Down
2 changes: 1 addition & 1 deletion crates/runner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl Plugin {
Self::InvalidUser => "invalid-plugin",
// Could try and derive this but not going to for now since tests
// will break if it changes.
Self::Default | Self::DefaultAsUser => "javy-default-plugin-v3",
Self::Default | Self::DefaultAsUser => "javy-default-plugin-v4",
Self::UserWasiP1 { .. } => "test-plugin-wasip1",
Self::UserWasiP2 { .. } => "test-plugin-wasip2",
}
Expand Down
2 changes: 1 addition & 1 deletion docs/docs-using-dynamic-linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ Run:
$ echo 'console.log("hello world!");' > my_code.js
$ javy emit-plugin -o plugin.wasm
$ javy build -C dynamic -C plugin=plugin.wasm -o my_code.wasm my_code.js
$ wasmtime run --preload javy-default-plugin-v3=plugin.wasm my_code.wasm
$ wasmtime run --preload javy-default-plugin-v4=plugin.wasm my_code.wasm
hello world!
```
2 changes: 1 addition & 1 deletion docs/docs-using-nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ async function runJavy(pluginModule, embeddedModule, input) {
wasi.getImportObject(),
);
const instance = await WebAssembly.instantiate(embeddedModule, {
"javy-default-plugin-v3": pluginInstance.exports,
"javy-default-plugin-v4": pluginInstance.exports,
});

// Javy plugin is a WASI reactor see https://github.com/WebAssembly/WASI/blob/main/legacy/application-abi.md?plain=1
Expand Down
Loading