You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
936: `no_std` support for `geo-types` r=frewsxcv a=wetheredge
- [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/main/CODE_OF_CONDUCT.md).
- [x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users.
---
This is my take on `no_std` support. This adds a new `std` that behave similarly to `serde`'s.
Rough overview of my changes:
- For the most part, simply swapping `alloc` or `core` in for `std`.
- Also added a second `doc(hidden)` public module (`_alloc`) to give macros access to `Vec` and `Box` even if the crate they are used from does not have `extern crate alloc`. This could be merged into the existing `private_utils`. It could also be dropped entirely, but that would require modifying the macros to reference `std` when that feature is enabled and the cleanest way I found to do that is still somewhat ugly: match on `()` with `cfg`'d branches.
I've looked some at #426 and the main difference I see is that it adds `core-error` for the `Error` trait, while I've just put that behind the `std` feature. If that is preferred, I can add the dependency.
---
I have also started working on `no_std` support in `geo`, but it's not quite as straight-forward, so I was keeping it for a second PR.
fixes#422, partially supersedes #426
Co-authored-by: William Etheredge <me@wetheredge.com>
0 commit comments