From 845ec0cac46af98263073f84608654e513b97ab5 Mon Sep 17 00:00:00 2001 From: hef Date: Tue, 21 Oct 2025 17:57:09 -0500 Subject: [PATCH 1/3] bump heapless to 0.9.1 and defmt to 1.0.1 --- Cargo.toml | 6 +++--- src/ser/mod.rs | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c8cafd08..3dd22af1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ version = "0.6.0" ryu = "1.0.5" [dependencies.heapless] -version = "0.8" +version = "0.9.1" features = ["serde"] optional = true @@ -30,7 +30,7 @@ features = ["derive"] version = "1.0.100" [dependencies.defmt] -version = "0.3" +version = "1.0.1" optional = true [dev-dependencies] @@ -40,4 +40,4 @@ serde_derive = "1.0.100" default = ["heapless"] custom-error-messages = ["heapless"] std = ["serde/std"] -defmt = ["dep:defmt", "heapless?/defmt-03"] +defmt = ["dep:defmt", "heapless?/defmt"] diff --git a/src/ser/mod.rs b/src/ser/mod.rs index 273072f2..b45c5695 100644 --- a/src/ser/mod.rs +++ b/src/ser/mod.rs @@ -42,6 +42,13 @@ impl From for Error { } } +#[cfg(feature = "heapless")] +impl From for Error { + fn from(_: heapless::CapacityError) -> Self { + Error::BufferFull + } +} + impl serde::ser::StdError for Error {} impl fmt::Display for Error { From 8cc296f4a5d6763ebe309339fd7f987733603a29 Mon Sep 17 00:00:00 2001 From: hef Date: Tue, 21 Oct 2025 18:07:09 -0500 Subject: [PATCH 2/3] changing MSRV to 1.86.0 --- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 2 +- Cargo.toml | 2 +- README.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94069895..6b4fecb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: include: # Test MSRV - - rust: 1.70.0 # keep in sync with manifest rust-version + - rust: 1.86.0 # keep in sync with manifest rust-version TARGET: x86_64-unknown-linux-gnu # Test nightly but don't fail diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b4e416c..d545e70e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] ### Breaking -- MSRV is now `1.70.0`. +- MSRV is now `1.86.0`. ## [v0.6.0] - 2024-08-07 diff --git a/Cargo.toml b/Cargo.toml index 3dd22af1..e408ed80 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ categories = ["parsing", "no-std", "no-std::no-alloc", "embedded", "web-programm description = "serde-json for no_std programs" documentation = "https://docs.rs/serde-json-core" edition = "2018" -rust-version = "1.70.0" # keep in sync with ci, src/lib.rs, and README +rust-version = "1.86.0" # keep in sync with ci, src/lib.rs, and README keywords = ["serde", "json"] license = "MIT OR Apache-2.0" name = "serde-json-core" diff --git a/README.md b/README.md index b1640796..6177a017 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This project is developed and maintained by the [rust-embedded-community]. ## Minimum Supported Rust Version (MSRV) -This crate is guaranteed to compile on stable Rust 1.70.0 and up. It *might* +This crate is guaranteed to compile on stable Rust 1.86.0 and up. It *might* compile with older versions but that may change in any new patch release. ## License From 81f67b62b994d88b45f9e309d1e7fdafa9282507 Mon Sep 17 00:00:00 2001 From: hef Date: Fri, 24 Oct 2025 19:26:24 -0500 Subject: [PATCH 3/3] Bumping MSRV to 1.87.0 to match heapless MSRV --- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 2 +- Cargo.toml | 2 +- README.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b4fecb4..f0c81c64 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: include: # Test MSRV - - rust: 1.86.0 # keep in sync with manifest rust-version + - rust: 1.87.0 # keep in sync with manifest rust-version TARGET: x86_64-unknown-linux-gnu # Test nightly but don't fail diff --git a/CHANGELOG.md b/CHANGELOG.md index d545e70e..d00c3e30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] ### Breaking -- MSRV is now `1.86.0`. +- MSRV is now `1.87.0`. ## [v0.6.0] - 2024-08-07 diff --git a/Cargo.toml b/Cargo.toml index e408ed80..0887f79b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ categories = ["parsing", "no-std", "no-std::no-alloc", "embedded", "web-programm description = "serde-json for no_std programs" documentation = "https://docs.rs/serde-json-core" edition = "2018" -rust-version = "1.86.0" # keep in sync with ci, src/lib.rs, and README +rust-version = "1.87.0" # keep in sync with ci, src/lib.rs, and README keywords = ["serde", "json"] license = "MIT OR Apache-2.0" name = "serde-json-core" diff --git a/README.md b/README.md index 6177a017..55c01453 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This project is developed and maintained by the [rust-embedded-community]. ## Minimum Supported Rust Version (MSRV) -This crate is guaranteed to compile on stable Rust 1.86.0 and up. It *might* +This crate is guaranteed to compile on stable Rust 1.87.0 and up. It *might* compile with older versions but that may change in any new patch release. ## License