Skip to content

JSON now supports no-std #182

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

Merged
merged 1 commit into from
Apr 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions _src/no-std.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ graph. That means if any other crate you depend on has not opted out of Serde's
default features, you will build Serde with the std feature enabled whether or
not your direct dependency on Serde has `default-features = false`.

In particular, a dependency on `serde_json` always needs Serde built with std.
If you need JSON support without a standard library, please use
[`serde-json-core`] instead of `serde_json`.
For example, if you are using `serde_json`, its equivalent enabled-by-default
`"std"` would also need to be disabled.

[`serde-json-core`]: https://crates.io/crates/serde-json-core
```toml
[dependencies]
serde = { version = "1.0", default-features = false }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
```

### Derive

Expand Down