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

[WIP] Support no_std #121

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

slinkydeveloper
Copy link
Member

Followup of #94
Fixes #72

Breaking changes

This PR includes a breaking change to the Url type usage, in order to encapsulate it and "disable it" for no_std usage.

Now users should use cloudevents::event::types::Uri instead than url::Url.

No_std

no_std support replaces url::Url usages with String.

Signed-off-by: Francesco Guardiani francescoguard@gmail.com

@slinkydeveloper slinkydeveloper added the enhancement New feature or request label Apr 29, 2021
@ctron
Copy link
Contributor

ctron commented Jun 9, 2021

Looks good to me. I only think there should be some note that alloc is still required. Maybe having an alloc feature, like here: https://serde.rs/no-std.html#memory-allocation

@slinkydeveloper
Copy link
Member Author

@ctron the problem is that without alloc i don't know how to implement extensions, because they require some dynamically allocated data structure, like a hashmap... Maybe there's a way we can implement it, but it requires a huge effort which i'm not sure is worth to...

@ctron
Copy link
Contributor

ctron commented Jun 10, 2021

I agree, support for an alloc-free model is too much effort. My goal was more to make the user aware that alloc is required.

@slinkydeveloper slinkydeveloper added this to the 0.4 milestone Jun 10, 2021
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
@slinkydeveloper slinkydeveloper changed the title Support no_std [WIP] Support no_std Jul 7, 2021
@slinkydeveloper slinkydeveloper removed this from the 0.4 milestone Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test no_std environments
2 participants