Skip to content

fix(compiler): follow Core 2f433eda and adopt VMBC v14 - #2

Merged
fffonion merged 7 commits into
masterfrom
fix/core-8db45832
Nov 16, 2026
Merged

fffonion merged 7 commits into
masterfrom
fix/core-8db45832

Conversation

@fffonion

@fffonion fffonion commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Core publishes the VMBC codec outside the runtime feature, so the native compiler calls vm::encode_program directly.

  • Pin pd-vm to Core 2f433edab3f1907e8cb060e901357d7e2af016ce and pd-edge-abi to 9a9ee3303a17fcf65893f04b1ce4e4df9d7f50c1 (ABI 26).
  • Delete native/pd-vm-compiler/src/wire.rs; encode via the Core codec (v14 header, empty ret-cleanup section).
  • .NET reader: VMBC v14, schema tags 14/15/16 and 18/19/20, explicit rejection of non-empty return-cleanup sections, four-argument __map_edit builtin.
  • Migrate fixtures and generated bindings from null to () / Option; the HTTP proxy example matches Some(text) / None directly. Result::Ok / Result::Err stay qualified.
  • PdVm.Runtime unit handling and callable/callback updates required by the new Core.

Windows CI repair (current head):

  • Convert WinForms callable schemas, Notepad and Minesweeper examples, and embedded RustScript test callbacks from Unit null to (); keep C# nulls unchanged. Update the RustScript syntax examples in both docs, using Option<T> / None for optional values.
  • Refresh the pd-edge ABI 26 revision in Cargo.toml, Cargo.lock, and the frozen-pin test to 9a9ee3303a17fcf65893f04b1ce4e4df9d7f50c1.

Current-head local verification:

  • cargo fmt --all --check --manifest-path native/pd-vm-compiler/Cargo.toml — exit 0.
  • cargo clippy --locked --manifest-path native/pd-vm-compiler/Cargo.toml -- -D warnings — exit 0.
  • cargo test --locked --manifest-path native/pd-vm-compiler/Cargo.toml — exit 0; 17 tests passed.
  • cargo build --locked --release --lib --manifest-path native/pd-vm-compiler/Cargo.toml — exit 0.
  • Direct native compilation of the two WinForms .rss files returns No such file or directory without the CLR-generated System overlay modules. Windows .NET CI exercised their source-wrapper compilation and WinForms callbacks successfully (pull_request run 43760826974; both Windows and Ubuntu jobs passed). The local .NET Docker invocation was terminated after an MSBuild named-pipe/SocketException in its read-only environment; it provides no .NET test result for this head.

Bump the vm (pd-vm) pin in native/pd-vm-compiler from b1d6cff to fc8b0c81 and
report the migration surface rather than finishing it.

cargo update -p pd-vm --precise also moves pd-host-function and pd-host-schema,
and leaves a second copy of both: pd-edge-abi 5f4f889 (ABI 25) still pins
pd-host-function at b1d6cff, and no pd-edge revision pins the new core yet
(master c898672 is ABI 25 with the same old pin).

cargo check --locked --all-targets surfaced exactly two E0004 non-exhaustive
matches on the new Unit/Option/Result variants of HostTypeSchema and
TypeSchema. Encode them with the upstream core tag values (host 16/15/14,
types 20/19/18); no edge-abi or symbol incompatibility is involved.

The wire format itself moved to VMBC v14 with a new trailing ret_cleanups
section, and PdVm.Compiler/PdVmVmbcReader.cs still requires version 13 and
rejects trailing bytes, so the stack is not mergeable until pd-edge cuts an
ABI 26 revision, wire.rs ports write_ret_cleanups, and the managed reader
learns v14. All of that is enumerated in
docs/native-core-pin-probe-fc8b0c81.md.

cargo check/fmt/clippy pass at this pin; cargo test does not, for the
documented reasons.
The migration is complete: the compiler pins core 8db45832 and edge ABI 26,
and the reader consumes VMBC v14. The probe notes still described the bump as
blocked and would mislead readers.
@fffonion fffonion changed the title fix(compiler): follow core 8db45832 and adopt VMBC v14 fix(compiler): follow Core 2f433eda and adopt VMBC v14 Nov 15, 2026
@fffonion
fffonion merged commit 85b4e16 into master Nov 16, 2026
4 checks passed
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