feat(m0.6-r2): isolated plugin worker transport

- add a hidden __plugin-worker mode that loads one native library in a child
  process and serves length-prefixed JSON invoke frames
- add host WorkerPlugin with ready handshake, export cross-check, per-call
  timeout and crash/EOF propagation
- route kind: worker without in-process trust; native still requires explicit
  trust; wasm is rejected explicitly
- report worker_processes=true while keeping strict OS isolation unavailable
- test successful worker calls and worker crash isolation
- update plugin ABI spec and R2 status
This commit is contained in:
cflmy committed 2026-11-20 11:52:26 +08:00
1 parent 4ce37afb39
commit 44c2df2361
12 files changed
+661 -47

No files matched your search

+5 -5
View File
@@ -98,10 +98,10 @@ pub struct PlatformCapabilities {
impl PlatformCapabilities {
/// Detect capabilities for the current build and platform.
///
/// M0.5 intentionally reports strict isolation as unavailable: no OS
/// isolation adapter is implemented yet, and pretending otherwise would
/// violate the security contract. The worker process transport is likewise
/// not implemented in this build.
/// Strict OS isolation remains intentionally unavailable: no OS isolation
/// adapter is implemented, and pretending otherwise would violate the
/// security contract. The isolated worker transport is implemented, but a
/// plain child process is not an OS sandbox.
pub fn detect() -> Self {
let reason = if cfg!(target_os = "linux") {
"no OS isolation adapter (namespaces/seccomp/cgroups) is implemented in this build"
@@ -118,7 +118,7 @@ impl PlatformCapabilities {
strict: StrictIsolation::Unavailable {
reason: reason.to_string(),
},
worker_processes: false,
worker_processes: true,
}
}
}