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

argh_shared: change serde features to allow no_std use #183

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wgwoods
Copy link

@wgwoods wgwoods commented Jan 17, 2024

The argh_shared crate depends on serde, which uses std in its default configuration. This makes it incompatible with no_std crates.

As per the serde docs, adding default-features = false makes it support no_std, and adding the alloc feature lets it opt back into memory allocation so it can still handle Strings and such, which is (probably) important here.

This could probably also be accomplished by adding a default-on std feature that could be turned off by no_std users, but since argh's stated goal is small code size it seemed like defaulting to no_std-compatibility was the sanest & simplest change.

The `argh_shared` crate depends on `serde`, which uses `std` in its default configuration. This makes it incompatible with `no_std` crates.

As per the [`serde` docs](https://serde.rs/no-std.html), adding `default-features = false` makes it support `no_std`, and adding the `alloc` feature lets it opt back into memory allocation so it can still handle `String`s and such.
@sadmac7000
Copy link
Collaborator

Fancy running in to you XD

Looks like the CLA checker might be bugged out but I'll submit this when it gets sorted.

@sadmac7000
Copy link
Collaborator

Looks like you'll need to sign the Google CLA for us to land this.

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

Successfully merging this pull request may close these issues.

2 participants