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

alloc no_std support #469

Closed
DianaNites opened this issue Mar 29, 2020 · 2 comments
Closed

alloc no_std support #469

DianaNites opened this issue Mar 29, 2020 · 2 comments

Comments

@DianaNites
Copy link

DianaNites commented Mar 29, 2020

Is your feature request related to a problem? Please describe.
A project i'm writing is replacing it's std feature with an alloc one,
but uuid only documents std and no_std support.

Describe the solution you'd like
An alloc feature to be added, depending only on stuff in alloc. Or, if the existing std support actually only depends on alloc, for it to be renamed.

Is it blocking?
Kind of?

Describe alternatives you've considered
Just use normal no_std uuid

Additional context
Documentation of uuid's no_std support seems kind of lacking?, so it's unclear to me what functionality is missing without std/alloc support? It's possible this wouldn't even be useful?

Other
The v3 uuid feature depends on the md5 crate, which itself offers a no_std mode, but defaults to std. Uuid does not disable it's default features.

v4(getrandom) and v5(sha1) are always no_std by default, though.

The alloc crate is stable since Rust 1.36

@KodrAus
Copy link
Member

KodrAus commented Dec 21, 2020

I don't think uuid needs alloc for anything so we should be able to work with just about all features except maybe v4 in no_std.

Any libraries we depend on should be no_std if they can be so if we're missing any then PRs to fix them up would be welcome!

@KodrAus
Copy link
Member

KodrAus commented Aug 16, 2021

In #528 I added some more embedded CI support that ensures the v1, v3, v5, and serde features will build on an embedded target. That just makes sure we don't accidentally pull in std in any of our dependencies.

I've also added some docs on how to build uuid for no-std targets. I think that should just about cover it for this on 🙂

@KodrAus KodrAus closed this as completed Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants