sdk-rust
sdk-rust copied to clipboard
[WIP] Support no_std
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 [email protected]
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
@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...
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.