Skip to content

Support for no_std environments #123

@QuinnWilton

Description

@QuinnWilton

I know this isn't a priority, but I thought I'd get the issue down in writing for tracking purposes.

Summary

Problem

The crate is currently incompatible with no_std

Impact

The crate can't be used in embedded or bare-metal environments, like on a Raspberry Pi or ESP32.

Solution

I haven't done a comprehensive survey of what would be required to make rs-ucan compatible with no_std, but at minimum we must:

  • use default-features = false for serde, and explicitly list derive as a feature
  • Support using serde-json-core instead of serde_json
  • Support using heapless in place of dynamically allocated types like Vec and String

There's likely more work that would be required than the above, especially to support both environments without a ton of duplicated code, but the above points would be good starting points for anyone investigating this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions