sdk-rust icon indicating copy to clipboard operation
sdk-rust copied to clipboard

Making core no_std compatible

Open pranav-bhatt opened this issue 5 years ago • 6 comments

#72 Things left to do:

  • Remove DisplayError (chrono example, serde-json example), and generally clean up error.rs
  • Create default hostname return value for no_std environments
  • #105
  • Replace url::Url with something like
#[] // no_std
pub use String as Url;
#[] // std
pub use url::Url;

pranav-bhatt avatar Oct 28 '20 16:10 pranav-bhatt

For what I've checked, snafu has it's own trait Error that it's implemented in no_std. Since thiserror doesn't have no_std support I would say to just leave snafu for now (if it ain't broken, don't fix it).

elpiel avatar Oct 28 '20 17:10 elpiel

For what I've checked, snafu has it's own trait Error that it's implemented in no_std. Since thiserror doesn't have no_std support I would say to just leave snafu for now (if it ain't broken, don't fix it).

Mhmm! The main reason behind wanting to explore thiserror was that it was simpler compared to snafu. If you've worked with any other error handling library that can complement no_std and do the trick, it would be amazing if you could help :) Would you mind joining the Slack channel so we can continue talking on the #cloudevents-sdk-rust channel? (I promise this is the last switch xD)

pranav-bhatt avatar Oct 28 '20 19:10 pranav-bhatt

@pranav-bhatt you need to configure the ci to run the no_std builds/tests too

slinkydeveloper avatar Oct 29 '20 11:10 slinkydeveloper

Can you rebase?

slinkydeveloper avatar Nov 02 '20 09:11 slinkydeveloper

@pranav-bhatt you should look at this https://github.com/cloudevents/sdk-rust/pull/107

slinkydeveloper avatar Nov 30 '20 12:11 slinkydeveloper

@pranav-bhatt can you start cleaning up this pr removing history files etc and rebasing with master? This branch diverged quite a bit from master

slinkydeveloper avatar Jan 22 '21 08:01 slinkydeveloper