Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for no_std environments #123

Open
QuinnWilton opened this issue Aug 14, 2023 · 1 comment
Open

Support for no_std environments #123

QuinnWilton opened this issue Aug 14, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@QuinnWilton
Copy link
Contributor

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!

@cdata
Copy link
Member

cdata commented Aug 17, 2023

This sounds like a great thing to have 👍

@cdata cdata added enhancement New feature or request help wanted Extra attention is needed labels Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants