You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implements the message-system core for spec §20.2-3 (the "message is the right
choice for a solo isolate" decision). `Channel.message<T>` creates a channel whose
payload `T` is statically verified cross-isolate-transferable — a self-contained
value with no managed handle (is_cross_isolate_transferable; v1: Copy scalars,
String, Bytes) — rejecting managed/container payloads at check time (RS0036). It
reuses the bounded-channel runtime (VM intrinsic + runtime_abi alias to
channel_bounded), so it runs today at VM<->compiled parity and is the
forward-compatible transport for real isolates: nothing crossing it shares
mutable state. `take` move-in still prevents use-after-send; no reference-capability
machinery.
Regenerated packages/async + packages/async-runtime locks and re-attested the
provider's [implements] interface hash for the new Channel.message declaration.
Tests: parity_message_channel_roundtrip + message-channel-non-transferable.rss
(RS0036). Full sweep green (vm/vm_eval_parity/checker_frontend/checker_lowering/
checker_package/corpus/lib), clippy + fmt clean. Spec §20.1-B / §20.2-3 + spec-todo
updated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
format!("message channel payload `{element}` is not cross-isolate-transferable."),
1482
+
call_span.clone(),
1483
+
"non-transferable message payload",
1484
+
)
1485
+
.with_cause(
1486
+
"A message must be self-contained data with no managed handle, so it can cross an isolate boundary without sharing mutable state. v1 allows Copy scalars, `String`, and `Bytes`.",
1487
+
)
1488
+
.with_fix(
1489
+
"use_transferable_message_payload",
1490
+
format!(
1491
+
"Send a transferable value (a Copy scalar, `String`, or `Bytes`) instead of `{element}`, or use `Channel.bounded` for an in-isolate channel."
0 commit comments