OpenDevicePartnership / OpenDevicePartnership/embedded-services

Figure out trait bounds to allow transparent logging of error values

Open
#255 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Rust
Stars
23
Forks
53
Avg merge
2d 20h
Merged PRs (30d)
13

Description

Most drivers are generic over a bus type and therefore over a specific bus error type. Logging these error types in generic code is difficult because they need to implement different traits based on if log or defmt is enabled. See if we can create our own trait, something like LogError that basically resolves to the right trait based on enabled features.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the generic driver error types and the feature-gated logging bounds described in the issue, including how log and defmt are enabled. Done means establishing whether a shared LogError abstraction is viable and documenting or implementing the trait bounds needed for transparent error logging in both configurations.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
embedded-iot, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.