From a8ef6ec2f4a3a0fdc8a85bf2acbe6232883d37a5 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Wed, 17 Jan 2024 14:29:17 -0800 Subject: [PATCH] Change serde features to allow `no_std` use 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. --- argh_shared/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/argh_shared/Cargo.toml b/argh_shared/Cargo.toml index 8e07308..0305ecf 100644 --- a/argh_shared/Cargo.toml +++ b/argh_shared/Cargo.toml @@ -9,4 +9,4 @@ repository = "https://github.com/google/argh" readme = "README.md" [dependencies] -serde = { version = "1", features = ["derive"] } +serde = { version = "1", default-features = false, features = ["derive", "alloc"] }