From 2436a3501208f0b5820f1cb987834e1913141ad8 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Fri, 3 Jan 2025 18:35:13 +0800 Subject: [PATCH] Release `v9.1.1` --- CHANGELOG | 3 +++ Cargo.lock | 12 +++++++++++- Cargo.toml | 15 +++++++++++---- src/lib.rs | 2 ++ 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 8f71a69..7e43c82 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +### v9.1.1 +- Integrate `serde_bytes`. + ### v9.1.0 - Use reference instead of value in `Hexify` trait and related serialize functions. diff --git a/Cargo.lock b/Cargo.lock index 22b3d2c..8d8ee0b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,7 +25,7 @@ checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "array-bytes" -version = "9.1.0" +version = "9.1.1" dependencies = [ "const-hex", "criterion", @@ -33,6 +33,7 @@ dependencies = [ "hex", "rustc-hex", "serde", + "serde_bytes", "serde_json", "smallvec", ] @@ -552,6 +553,15 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde_bytes" +version = "0.11.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +dependencies = [ + "serde", +] + [[package]] name = "serde_derive" version = "1.0.217" diff --git a/Cargo.toml b/Cargo.toml index 260ed53..4b4596c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,8 +3,8 @@ authors = ["Xavier Lau "] categories = [ "algorithms", "encoding", - "parsing", "no-std", + "parsing", "wasm", ] description = "A collection of Array/Bytes/Hex utilities with full No-STD compatibility." @@ -21,15 +21,22 @@ license = "Apache-2.0/GPL-3.0" name = "array-bytes" readme = "README.md" repository = "https://github.com/hack-ink/array-bytes" -version = "9.1.0" +version = "9.1.1" [profile.ci-dev] incremental = false inherits = "dev" +[features] +serde = [ + "dep:serde", + "serde_bytes", +] + [dependencies] -serde = { version = "1.0", optional = true, default-features = false } -smallvec = { version = "1.13" } +serde = { version = "1.0", optional = true, default-features = false } +serde_bytes = { version = "0.11", optional = true, default-features = false, features = ["alloc"] } +smallvec = { version = "1.13" } [dev-dependencies] const-hex = { version = "1.14" } diff --git a/src/lib.rs b/src/lib.rs index 708ad12..6124901 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -60,6 +60,8 @@ mod prelude { #[cfg(test)] pub use test::*; } +#[cfg(feature = "serde")] pub use serde_bytes; + #[allow(missing_docs)] pub type Result = core::result::Result;