timothee-haudebourg / json-ld

JSON-LD implementation for Rust
Apache License 2.0
129 stars 17 forks source link

Interest in pull request for no_std support? #81

Open mspiegel opened 4 months ago

mspiegel commented 4 months ago

Hello,

Thank you for maintaining this crate! I need to use some json-ld functionality in a no_std environment. I have started adding no_std support to the dependencies of this crate. I am working my way up the dependency tree: (utf8-decode, pct-str, iref, rdf-types, and json-ld). Is there interest in pull requests on those crates that would provide no_std support? My goal is to make "std" a default feature of those creates. When "std" is enabled the implementation of the crate is unchanged. When no default features are enabled, the implementation falls back to crates "core" and "alloc" whenever possible. In some cases, when "std" is not enabled I need to use https://github.com/no-std-io/no-std-io as a dependency. I can provide further details in each individual pull request of the dependency tree: (utf8-decode, pct-str, iref, rdf-types, and json-ld). Is there interest in this?

Thanks, --Michael

timothee-haudebourg commented 2 weeks ago

Hi, it could be interesting at least for some of the dependencies you're mentioning. But I don't see how this could be possible implement for the whole json-ld (or even rdf-types) library which relies on many data structures from the std library. And unfortunately I can't promise I'll have enough bandwidth to process all your PR very quickly but I will take a look at them eventually if you make them.