Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[RFC] `embedded-services v0.2.0 refactor`

Aperta
#694 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@tullom ci sta già lavorando.

Dal 27/1/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

RFC

RFC: embedded-services v0.2.0 refactor

Iterating on the lessons learned of our current architecture to refine bugs, reduce data races, and alleviate pain points within our current service architecture

Change Log

  • 2026-01-27: Initial RFC created

Motivation

The current design of some of the services are tightly coupled, and this makes feature extension and testing expensive and brittle:

  • Race conditions + deadlocks: Late‑subscribing patterns, static lists, and mutual service calls can drop messages or deadlock during boot or reset
  • Overlapping command paths and implicit API design: Services can have multiple ways of advancing a state machine or enabling a feature, such as message passing via our comms layer IPC. These mechanisms solving the same problem differently, which can lead to duplication of logic and confusion on concretely what is advancing state
  • Tight coupling via public statics: Static registries (intrusive lists and channels) block dependency injection, mocking, and unit tests. These should exist at the app level and our services should be generic upon them.
  • Type-c/Power policy ID indirection: The type-c service has a concept of “controller/global/local port IDs”, which other subsystems (mainly power policy) must reason about that are not part of their domain
  • Hardware variance baked into the subsystem: Supporting multiple PD hardware devices in embedded-services increases crate‑level complexity.

Goals

  • Eliminate init race conditions and deadlocks by creating all Channel/Signal receivers before any sender is exposed, and removing late subscriptions.
  • Replace static APIs & intrusive lists with explicit handles and trait‑based dependencies for extensibility and unit tests.
    • Replace static intrusive lists in the service layer with statics constructed by the app layer and handed into service init().
  • Unify calling paths for controller/port actions; reduce to one coherent API surface.
  • Eliminate implicit API design by replacing messaging passing via IPC with direct async calls.
  • Maintain feature parity
Lingua principale
Rust
Stelle
23
Fork
54
Merge medio
6h 56m
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenDevicePartnership/embedded-services

Tutte le issue di OpenDevicePartnership/embedded-services

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.