argh icon indicating copy to clipboard operation
argh copied to clipboard

`argh_shared`: change serde features to allow `no_std` use

Open wgwoods opened this issue 1 year ago • 2 comments

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.

wgwoods avatar Jan 17 '24 22:01 wgwoods

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 avatar Jan 17 '24 23:01 sadmac7000

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

sadmac7000 avatar Jan 22 '24 17:01 sadmac7000