Skip to content

RFC: Secure EC Zephyr Interoperability#38

Open
jerrysxie wants to merge 4 commits into
OpenDevicePartnership:mainfrom
jerrysxie:rfc-zephyr-rust-interop
Open

RFC: Secure EC Zephyr Interoperability#38
jerrysxie wants to merge 4 commits into
OpenDevicePartnership:mainfrom
jerrysxie:rfc-zephyr-rust-interop

Conversation

@jerrysxie

@jerrysxie jerrysxie commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces a new RFC document outlining a strategy for enabling interoperability between ODP Secure EC (Rust-based) services and Zephyr (C-based) environments. The RFC proposes a phased approach to allow incremental adoption of Rust components in Zephyr-based embedded controller firmware, targeting OEMs who rely on Zephyr but want to benefit from ODP's memory safety and modularity. The document also details technical background, goals, requirements, phased integration plans, and unresolved questions for community discussion.

Key additions in this RFC:

Strategy and Motivation

  • Presents a staged interoperability plan to run ODP Secure EC Rust services on Zephyr, enabling OEMs to incrementally adopt Rust without a full stack rewrite.
  • Outlines the motivation for this approach, emphasizing Zephyr’s ecosystem maturity, the need for incremental Rust adoption, and the current limitations of Zephyr’s Rust support.

Technical Details and Integration Phases

  • Describes Zephyr’s current Rust integration (via zephyr-lang-rust), the use of FFI for bridging Rust and C, and the plan to build safe, ergonomic Rust wrappers around Zephyr drivers.
  • Details a phased roadmap: Phase 1 (ODP Rust services on Zephyr via FFI), Phase 1.5 (safe Rust driver libraries), and Phase 2 (Rust-native drivers and deeper

@jerrysxie jerrysxie requested a review from kurtjd June 10, 2026 21:13
@jerrysxie jerrysxie changed the title Rfc zephyr rust interop RFC: zephyr rust interop Jun 10, 2026
Comment thread rfc/embedded-controller/0000-secure-ec-zephyr-interoperability.md Outdated
Comment thread rfc/embedded-controller/0000-secure-ec-zephyr-interoperability.md Outdated
Comment thread rfc/embedded-controller/0000-secure-ec-zephyr-interoperability.md
Comment thread rfc/embedded-controller/0000-secure-ec-zephyr-interoperability.md Outdated
Comment thread rfc/embedded-controller/0000-secure-ec-zephyr-interoperability.md Outdated
Comment thread rfc/embedded-controller/0000-secure-ec-zephyr-interoperability.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces a new RFC proposing a staged approach to run ODP Rust-based Secure EC services in Zephyr-based environments, focusing on interoperability via FFI/wrapper layers while collaborating upstream to improve Zephyr’s Rust integration.

Changes:

  • Adds an Embedded Controller RFC describing motivation, goals, requirements, and phased plan for ODP ↔ Zephyr interoperability.
  • Documents two integration paths (Rust services on Zephyr; Rust drivers in Zephyr) and key open questions/alternatives.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rfc/embedded-controller/0000-secure-ec-zephyr-interoperability.md
Comment thread rfc/embedded-controller/0000-secure-ec-zephyr-interoperability.md
Comment thread rfc/embedded-controller/0000-secure-ec-zephyr-interoperability.md
Comment thread rfc/embedded-controller/0000-secure-ec-zephyr-interoperability.md
- Clarify that platform list is CI-tested, not an architectural limit;
  Kconfig gates on architecture (Cortex-M, RISC-V, POSIX 64-bit)
- Acknowledge that some Zephyr subsystems may be hard to wrap safely;
  soften requirement 2 and add unresolved questions
- Distinguish thin FFI (already in zephyr-lang-rust) from safe ergonomic
  wrappers (the actual gap), referencing zephyr-lang-rust#73
- Add Phase 1.5 for safe driver libraries between basic FFI bridging
  (Phase 1) and Rust-native kernel drivers (Phase 2)
- Update Path A to emphasize safe library creation, not just thin FFI
- Note upstream acceptance bar for kernel-level changes in Alt 2 and
  Phase 2, citing Linux Rust-in-kernel precedent

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jerrysxie jerrysxie changed the title RFC: zephyr rust interop RFC: Secure EC Zephyr Interoperability Jun 12, 2026
@kurtjd

kurtjd commented Jun 12, 2026

Copy link
Copy Markdown
Member

FYI Updated RFC in the Prior Art section with links to ODP services on Zephyr (Blake's PoC) and Rust driver integration (Douglas' PoC), both pointing to branches on ODP's zephyr-lang-rust fork.

@jerrysxie jerrysxie linked an issue Jun 12, 2026 that may be closed by this pull request
@github-project-automation github-project-automation Bot moved this to In progress in ODP v0.2 Jun 12, 2026
@jerrysxie jerrysxie marked this pull request as ready for review June 12, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

RFC for Zephyr and Rust interoperability

3 participants