Skip to content

Bump moonrun to rusty_v8 150.4.0 - #1471

Draft
peter-jerry-ye wants to merge 1 commit into
mainfrom
zihang/bump-v8
Draft

Bump moonrun to rusty_v8 150.4.0#1471
peter-jerry-ye wants to merge 1 commit into
mainfrom
zihang/bump-v8

Conversation

@peter-jerry-ye

@peter-jerry-ye peter-jerry-ye commented Feb 11, 2026

Copy link
Copy Markdown
Contributor
  • Related issues: None
  • PR kind: build

Summary

This PR bumps moonrun from rusty_v8 0.106.0 to 150.4.0 and migrates the runtime to the pinned scope API required by current rusty_v8.

It also:

  • removes V8 flags whose Wasm features are no longer experimental;
  • preserves host-object finalization without retaining every Instant and RNG allocation until runtime shutdown;
  • adds a regression fixture that repeatedly allocates and finalizes both host object types.

Motivation

The existing dependency is substantially behind current V8 releases. Updating brings current V8 and Wasm behavior and published prebuilt libraries for additional targets, including Windows ARM64.

Correctness

Callback functions now receive PinScope, and nested scope construction follows the new pinned initialization API. Weak handles use the active callback scope directly; retrieving another mutable isolate reference while that scope is active would violate the new API's safety contract.

The regression fixture exercises 100,000 Instant and RNG externref allocations so both garbage-collection and isolate-teardown finalization paths are covered.

Trade-off

The arm64 macOS release binary grows from 28,808,800 bytes to 45,703,744 bytes, an increase of 58.65%. Most of the additional dependency and binary footprint comes from the Temporal/ICU stack now required by rusty_v8.

The PR remains a draft while we decide whether the newer V8 support justifies this distribution-size increase.

Scope

The implementation is limited to the moonrun dependency, the API migration required by that dependency, and the focused finalizer regression test. It does not change moonrun's public CLI or intended runtime behavior.

@semanticdiff-com

semanticdiff-com Bot commented Feb 11, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  crates/moonrun/src/async_api/event_bus.rs  93% smaller
  crates/moonrun/src/async_api/context.rs  81% smaller
  crates/moonrun/src/async_api/mod.rs  56% smaller
  crates/moonrun/src/memory_sanitizer_api.rs  52% smaller
  crates/moonrun/src/v8_builder.rs  44% smaller
  crates/moonrun/src/demangle_js_template.rs  25% smaller
  crates/moonrun/src/async_api/registry.rs  16% smaller
  crates/moonrun/src/sys_api.rs  13% smaller
  crates/moonrun/src/wasi_api.rs  9% smaller
  crates/moonrun/src/fs_api_temp.rs  9% smaller
  crates/moonrun/src/backtrace_api.rs  5% smaller
  crates/moonrun/src/async_api/fs.rs  1% smaller
  crates/moonrun/src/async_api/os_error.rs  1% smaller
  Cargo.lock Unsupported file format
  crates/moonrun/Cargo.toml Unsupported file format
  crates/moonrun/src/async_api/c_buffer.rs  0% smaller
  crates/moonrun/src/async_api/env_util.rs  0% smaller
  crates/moonrun/src/async_api/event_loop.rs  0% smaller
  crates/moonrun/src/async_api/fd_util.rs  0% smaller
  crates/moonrun/src/async_api/io.rs  0% smaller
  crates/moonrun/src/async_api/os_string.rs  0% smaller
  crates/moonrun/src/async_api/process.rs  0% smaller
  crates/moonrun/src/async_api/random.rs  0% smaller
  crates/moonrun/src/async_api/runtime.rs  0% smaller
  crates/moonrun/src/async_api/signal.rs  0% smaller
  crates/moonrun/src/async_api/socket.rs  0% smaller
  crates/moonrun/src/async_api/stdio.rs  0% smaller
  crates/moonrun/src/async_api/thread_pool.rs  0% smaller
  crates/moonrun/src/async_api/time.rs  0% smaller
  crates/moonrun/src/async_api/tls.rs  0% smaller
  crates/moonrun/src/main.rs  0% smaller
  crates/moonrun/tests/test.rs  0% smaller
  crates/moonrun/tests/test_cases/v8_external_finalizers.wasm Unsupported file format
  crates/moonrun/tests/test_cases/v8_external_finalizers.wat Unsupported file format

@peter-jerry-ye peter-jerry-ye changed the title Bump moonrun to v8 145 and migrate scope APIs Bump moonrun to rusty_v8 150.4.0 Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant