Skip to content

docs: propose OpenClaw-owned Rust node runtime - #54

Draft
giodl73-repo wants to merge 27 commits into
openclaw:mainfrom
giodl73-repo:user/giodl/rfc-0028-openclaw-rust-runtime
Draft

docs: propose OpenClaw-owned Rust node runtime#54
giodl73-repo wants to merge 27 commits into
openclaw:mainfrom
giodl73-repo:user/giodl/rfc-0028-openclaw-rust-runtime

Conversation

@giodl73-repo

@giodl73-repo giodl73-repo commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

What problem this solves

The new Copilot app system tray needs a native Rust node runtime, but placing
that runtime in Edge/Chromium would duplicate OpenClaw's protocol, lifecycle,
policy, and security behavior. OpenClaw also needs a clear boundary between its
reusable runtime and product-specific shells.

Why this change was made

This RFC proposes that OpenClaw own a reusable, headless Rust node runtime in
the OpenClaw monorepo, while Microsoft keeps product shells, native tools,
packaging, and deployment in Microsoft-owned repositories. The first proposed
host is the Copilot app system tray in Edge/Chromium.

Windows Companion and openclaw-windows-node are a separate adopter. They can
reuse the same crates to simplify their native stack and, independently, act as
authorized Gateway controllers for the tray node. Scout Cloud and other
authorized clients use the same Gateway-mediated path. Controller authority
stays in the Gateway; no controller connects directly to the local runtime.

The bounded decision is whether the two unpublished workspace crates should
incubate as an OpenClaw core surface beside the TypeScript reference. It does
not publish crates, make the proof host an official binary, promise platform
support, or accept broader node-mode parity. Those remain follow-on decisions.
During incubation, public Rust visibility is only an unstable workspace seam:
it carries no SemVer promise and may change atomically with reviewed in-tree
consumers. This RFC does not select a cross-repository distribution mechanism.

The RFC also makes the native trust boundary explicit. Product adapters are
trusted product code, not sandboxed plugins. The runtime authenticates,
authorizes, bounds, correlates, and cancels dispatch; the product retains OS
permissions, least privilege, containment, and any stronger isolation.

The RFC deliberately does not assign individual maintainers or ask for a
staffing decision. Implementation, review, and CODEOWNERS can follow normal
OpenClaw practice, and any later publication or official-binary proposal can
define the additional operational commitments it introduces.

Microsoft is the anchor adopter, not the exclusive audience. The runtime and
every accepted capability surface remain customer-neutral for native,
embedded, appliance, and headless adopters. Microsoft is willing to seed the
implementation and maintenance.

This is a convergence refactor, not the introduction of an unrelated Rust
stack. OpenClaw's Linux Tauri app already contains a production Rust Gateway
client for TLS trust, device authentication, reconnect, heartbeat, and request
handling. The foundation implementation extracts that app-local behavior into
the Tauri-free openclaw-gateway-client crate and refactors the existing Tauri
app to consume it as the first adopter. The separate openclaw-node-host crate
then layers the reusable node role, lifecycle, and bounded runtime on that same
client. Tauri remains the application shell; native desktop and headless hosts
reuse the common Gateway substrate without taking a dependency on Tauri.

It is also consistent with OpenClaw's existing multi-language node model. The
generic TypeScript host, Apple Swift nodes, Android Kotlin node, official C#
Windows node, and official C ESP-IDF component all implement the same node role
while advertising different platform capabilities. Rust is another conforming
implementation, not a second protocol. The RFC proposes shared cross-language
fixtures so admission, identity, invocation, cancellation, lifecycle, and
errors converge even when tool catalogs legitimately differ.

The proposal is intentionally draft and leaves publication, production
sidecar adoption, broader command parity, and release support as explicit
follow-on decisions.

The hosting and management paths are deliberately separate:

  • a product shell hosts the runtime in-process or through an authenticated
    sidecar adapter; and
  • authorized controllers manage the node only through the Gateway.

Architecture sketch

Proposed OpenClaw Rust node runtime topology

Proposed implementation series

The RFC governs three OpenClaw implementation layers plus the Windows adopter
with distinct jobs:

  1. OpenClaw #116050
    extracts Tauri's Gateway transport into openclaw-gateway-client, adds the
    bounded openclaw-node-host foundation and headless binary, and makes the
    Linux Tauri app the first consumer of the shared client.
  2. OpenClaw #116450
    follows #116050 with the embeddable lifecycle: platform signing and typed
    issued-device-token delivery, reconnect, duplex invocation, local
    admission, connection-scoped manifests, and shared TypeScript/Rust
    conformance fixtures. It must not land before #116050.
  3. OpenClaw #116863
    consolidates reviewed fork evidence #193-#195 into authenticated bounded
    sidecar framing, the independently negotiated handshake, immutable
    configuration, the ordinary-command runtime/product-adapter bridge, and a
    real OS child-process authenticated IPC proof over loopback TCP.
    It is logically stacked on #116450 and preserves the reviewed commits.
  4. Windows node #1068
    combines the replaceable runtime boundary, shared Windows capability
    dispatcher, and independent C# reproduction of all three Rust corpora. It
    routes ordinary native commands through that dispatcher while keeping C# as
    the production default. The adapter is a non-selectable source proof;
    production packaging/signing, Gateway lifecycle, supervision, rollout, and
    rollback remain. Fork-only Rust #12
    plus Windows #4
    prove exact-hash launch with reparse-safe path locks through process
    creation, private-pipe bootstrap, and handshake artifact binding without
    enabling runtime selection.

The RFC now also specifies the next, not-yet-filed OpenClaw slice: a negotiated
sidecar Gateway connection-control exchange for per-attempt material,
supervisor-owned signing, durable issued-token acknowledgement, bounded
recovery, and authority retirement. The immutable capability configuration
stays secret-free. A later adopter slice can consume that contract over the
protected process channel and replace the current environment-based live proof.

Fork PRs #186-#192 remain evidence history. Fork PRs #193-#195 are closed as
superseded by upstream #116863; their reviewed commits remain in the cumulative
branch rather than becoming a permanent three-PR upstream stack.

User impact

No immediate user-facing behavior changes. The existing Linux Tauri app keeps
its product role while sharing its Rust Gateway implementation. If accepted,
other native products can reuse the same substrate and node runtime instead of
carrying a Node.js wrapper or a separate protocol implementation.

Implementation and evidence

The RFC has also been reviewed through Gateway reliability, sidecar lifecycle,
enterprise security, and maintainer-correctness lenses. That review added
explicit fail-closed authority, audit, readiness, crash recovery, reconnect,
resource, and release gates. Current-head Rust evidence is green at #116050
1aaec0c5a56 (56 tests) and #116450 bfd5c4d14e2 (73 tests plus strict static
gates, focused TypeScript conformance, and full protocol-generation checks).

The consolidated sidecar head 71c1c8cb23c in #116863 has 124 passing Rust
workspace tests plus strict Clippy and formatting. It proves the generic
protocol/handshake/configuration/ordinary-command bridge across a real child
process and transport, not production readiness. Fork evidence further proves anonymous-pipe IPC,
protected credential handoff, reparse-safe exact artifact identity through
launch, and authenticated self-identity. Platform signing and
packaging, duplex input/progress, product audit, crash supervision, resource
proof, rollout, and rollback remain explicit adopter gates.

The rebased Windows #1068 head 711fe095 reproduces the protocol, handshake,
and runtime corpora byte-for-byte; passes 63 focused sidecar/dispatcher, 3,701
Shared, and 22 focused Connection tests; and preserves the incumbent
pre-credential handshake authorization gate through the runtime seam. It closes the independent-consumer promotion gate for
the generic #116863 subset. Fork #4 then adds a non-selectable verified launcher;
the exact pinned aggregate passes 122 shared Rust and 64 focused Windows tests
plus all three fixture blobs. It does not close platform signing/package delivery,
Gateway/pairing/token, system.* authorization, audit, crash/resource,
selection, rollout, or rollback gates.

The sidecar connection-control contract includes a deterministic Ed25519
fixture and explicit races for timeout/cancellation, denial, authorization,
runtime closure, and supervisor retirement. Gateway, platform, and CISO role
review is recorded with the RFC. A final Codex review found the documents and
fixture internally consistent with no actionable correctness issue. This is a
reviewed implementation boundary, not a claim that either consumer exists yet.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels Jul 29, 2026
@clawsweeper

clawsweeper Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed August 12, 2026, 3:37 PM ET / 19:37 UTC.

ClawSweeper review

What this changes

This PR adds RFC 0028 and supporting specifications for an OpenClaw-owned Rust Gateway client, headless node runtime, and authenticated sidecar-hosting boundary.

Merge readiness

⚠️ Ready for maintainer review - 5 items remain

Keep open as a draft RFC: it requests a maintainer product decision about core ownership of a new Rust runtime, and current RFC policy requires acceptance plus an implementation issue before merge.

Priority: P3
Reviewed head: 9714876ee79a10ad34a501b52dea6347d60fd45c
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The documentation is structured around the repository's RFC and sidecar conventions, while the product decision remains a separate merge gate.
Proof confidence 🌊 off-meta tidepool Not applicable: This RFC-only change has no runnable behavior in this repository; implementation proof belongs with the linked runtime implementation work.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This RFC-only change has no runnable behavior in this repository; implementation proof belongs with the linked runtime implementation work.
Evidence reviewed 4 items RFC lifecycle policy: Current main permits RFC sidecars, but requires draft RFCs to remain unmerged and, on acceptance, to receive an implementation issue and accepted status before merge.
Current-main scope: Current main contains no RFC 0028 or named Rust runtime specification, so this remains a proposed design rather than an already implemented repository decision.
Patch surface: The branch adds 10 RFC artifacts and 2,461 lines, including the main proposal, conformance plan, sidecar contracts, fixture, and topology diagram.
Findings None None.
Security None None.

How this fits together

The proposed runtime sits between product-owned native shells and the OpenClaw Gateway. Product adapters host native capabilities while the Gateway remains the authority for controller access and node lifecycle.

flowchart LR
  Shell[Product shell] --> Adapter[Product adapter]
  Adapter --> Runtime[Rust node runtime]
  Runtime --> Gateway[OpenClaw Gateway]
  Controller[Authorized controllers] --> Gateway
  Gateway --> Runtime
  Runtime --> Native[Native capabilities]
Loading

Decision needed

Question Recommendation
Should OpenClaw incubate the two unpublished Rust runtime crates as a bounded core surface, with product shells retaining packaging, OS permissions, and deployment ownership? Keep the RFC draft: Leave the proposal open until a core owner explicitly sponsors or rejects the ownership boundary.

Why: The branch documents a new cross-repository ownership and security boundary; source review can confirm RFC structure but cannot choose the product and maintenance commitment.

Before merge

  • Add real behavior proof - Not applicable: This RFC-only change has no runnable behavior in this repository; implementation proof belongs with the linked runtime implementation work.
  • Resolve merge risk (P1) - Accepting the RFC would establish an unstable core runtime seam while linked implementation work remains draft, so it must not be interpreted as a shipping or support commitment.
  • Resolve merge risk (P1) - The proposed sidecar boundary carries authentication and authority responsibilities; maintainers need to explicitly endorse that ownership split before it becomes an accepted core contract.
  • Complete next step (P2) - A maintainer must decide whether the proposed core ownership and security boundary should exist before any implementation routing.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
RFC surface 10 files added, 2,461 lines added The proposal establishes several interdependent contracts, so a single explicit ownership decision should precede merging any of them.

Merge-risk options

Maintainer options:

  1. Keep the proposal in draft (recommended)
    Wait for an explicit core-ownership decision and accepted-RFC issue before merging the design.
  2. Sponsor bounded incubation
    Accept the unstable workspace seam only with the stated compatibility gates and a scoped implementation issue.
  3. Decline core ownership
    Close the RFC direction if product-local ownership is preferred for the native runtime.

Technical review

Best possible solution:

Obtain an explicit core-ownership decision; if sponsored, create the scoped implementation issue, change the RFC to accepted, and merge only that bounded design decision.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a design proposal for new runtime ownership, not a report of broken current behavior.

Is this the best way to solve the issue?

Yes for design governance: an RFC with sidecar specifications fits repository policy, but it must remain draft until maintainers make the ownership decision and complete the accepted-RFC transition.

AGENTS.md: not found in the target repository.

Codex review notes: model internal, reasoning high; reviewed against af708f0ddb6f.

Labels

Label justifications:

  • P3: This is a speculative architecture and documentation decision with no immediate user-facing behavior change.
  • merge-risk: 🚨 compatibility: The RFC proposes a new core runtime seam and protocol-conformance commitments that can shape future adopter compatibility.
  • merge-risk: 🚨 security-boundary: The documented sidecar design assigns authentication, authority, credential custody, and local-adapter responsibilities.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • feature: ✨ showcase: ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. The product-neutral runtime boundary could let native adopters share Gateway behavior without duplicating protocol and lifecycle logic.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This RFC-only change has no runnable behavior in this repository; implementation proof belongs with the linked runtime implementation work.

Evidence

What I checked:

  • RFC lifecycle policy: Current main permits RFC sidecars, but requires draft RFCs to remain unmerged and, on acceptance, to receive an implementation issue and accepted status before merge. (README.md:38, af708f0ddb6f)
  • Current-main scope: Current main contains no RFC 0028 or named Rust runtime specification, so this remains a proposed design rather than an already implemented repository decision. (af708f0ddb6f)
  • Patch surface: The branch adds 10 RFC artifacts and 2,461 lines, including the main proposal, conformance plan, sidecar contracts, fixture, and topology diagram. (rfcs/0028-openclaw-owned-rust-node-runtime.md:1, 9714876ee79a)
  • RFC process provenance: RFC lifecycle and template work appears to date to Kevin Lin's template/process commits, while the accepted sidecar layout was introduced by the merged sidecar-layout clarification. (README.md:71, 3aa7d727383f)

Likely related people:

  • kevinlin-openai: Authored the current RFC process and template history, including the lifecycle that governs acceptance and merge. (role: RFC process contributor; confidence: high; commits: e366ea9825a4, bbb4058da234; files: README.md, rfcs/0000-template.md)
  • RomneyDa: Authored the merged RFC sidecar-layout clarification that supports this proposal's main-document plus sidecar structure. (role: RFC sidecar-layout contributor; confidence: high; commits: 3aa7d727383f; files: README.md, rfcs/0000-template.md)
  • giodl73-repo: The proposer also has prior merged RFC work on current main, establishing relevant repository-history context beyond this branch alone. (role: prior merged RFC contributor; confidence: medium; commits: faf2a3a5b1ac, 13819ef73d3a; files: rfcs/0024-localization-runtime-and-coverage.md, rfcs/0016-claws.md)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record an explicit maintainer decision on core ownership and, if accepted, create the required implementation issue before changing the RFC status.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (46 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-01T10:56:39.845Z sha ea6891d :: needs real behavior proof before merge. :: [P3] Move the RFC-specific review into its sidecar
  • reviewed 2026-08-01T15:19:53.313Z sha ea6891d :: needs real behavior proof before merge. :: [P3] Move the RFC-specific review into its sidecar
  • reviewed 2026-08-01T19:19:45.395Z sha ea6891d :: needs real behavior proof before merge. :: [P3] Place the role review in RFC 0028's sidecar
  • reviewed 2026-08-01T20:35:52.584Z sha ea6891d :: needs real behavior proof before merge. :: [P3] Move the role review into RFC 0028's sidecar
  • reviewed 2026-08-02T09:40:53.251Z sha ea6891d :: needs real behavior proof before merge. :: [P3] Keep the RFC 0028 review in its sidecar
  • reviewed 2026-08-02T17:06:02.923Z sha ea6891d :: needs real behavior proof before merge. :: [P3] Move the RFC 0028 role review into its sidecar
  • reviewed 2026-08-02T21:08:51.190Z sha ea6891d :: needs real behavior proof before merge. :: [P3] Move the RFC 0028 role review into its sidecar
  • reviewed 2026-08-12T19:28:49.373Z sha 8295ea9 :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. labels Jul 29, 2026
@clawsweeper clawsweeper Bot removed merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. labels Jul 29, 2026
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 29, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Jul 30, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. label Aug 1, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. and removed merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 1, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. labels Aug 2, 2026
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 12, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 12, 2026
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 12, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant