Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tls_codec/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- [#2022](https://github.com/RustCrypto/formats/pull/2022) Optimize serde serialization of byte vectors using `serde_bytes`. Deserialization of the old serialized format will still work, but newly serialized instances of `VLBytes` will have the new format.
- [#2322](https://github.com/RustCrypto/formats/pull/2322): Add `VLByteVec` and `SecretVLByteVec`, which are `#[serde(transparent)]` wrappers serializing via `serde_bytes`. They produce a much more compact representation in `serde` formats that distinguish byte arrays from sequences of `u8` (e.g. CBOR, MessagePack, bincode). Their `serde` output is not compatible with `VLBytes` / `SecretVLBytes`, but their `Deserialize` impls are backwards-compatible: in self-describing `serde` formats they also accept the legacy `VLBytes` / `SecretVLBytes` encoding (a struct with a `vec` field containing a sequence of `u8`). Deprecate `VLBytes` and `SecretVLBytes` in favour of `VLByteVec` and `SecretVLByteVec`.
- [#1656](https://github.com/RustCrypto/formats/pull/1656) Add `TlsVarInt` type for variable-length integers.

## 0.4.2
Expand Down
1 change: 1 addition & 0 deletions tls_codec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ serde_bytes = { version = "0.11.17", optional = true }
[dev-dependencies]
criterion = { version = "0.6", default-features = false }
ciborium = "0.2.2"
serde_json = "1.0"

[features]
default = ["std"]
Expand Down
3 changes: 3 additions & 0 deletions tls_codec/benches/quic_vec.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// The benches intentionally exercise the deprecated `VLBytes`.
#![allow(deprecated)]

use criterion::{BatchSize, Criterion};
use criterion::{criterion_group, criterion_main};

Expand Down
3 changes: 3 additions & 0 deletions tls_codec/derive/tests/decode.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#![cfg(feature = "std")]
// These tests intentionally exercise the deprecated `VLBytes` for backward
// compatibility coverage.
#![allow(deprecated)]
use tls_codec::{
Deserialize, DeserializeBytes, Error, Serialize, Size, TlsSliceU16, TlsVecU8, TlsVecU16,
TlsVecU32, VLBytes,
Expand Down
1 change: 1 addition & 0 deletions tls_codec/fuzz/fuzz_targets/inverse.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![no_main]
#![allow(deprecated)]

use libfuzzer_sys::fuzz_target;
use tls_codec::{Deserialize, Serialize, Size, VLBytes};
Expand Down
9 changes: 7 additions & 2 deletions tls_codec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ pub use tls_vec::{
};

#[cfg(feature = "std")]
pub use quic_vec::{SecretVLBytes, rw as vlen};
pub use quic_vec::{VLByteSlice, VLBytes};
#[allow(deprecated)]
pub use quic_vec::SecretVLBytes;
#[allow(deprecated)]
pub use quic_vec::VLBytes;
#[cfg(feature = "std")]
pub use quic_vec::{SecretVLByteVec, rw as vlen};
pub use quic_vec::{VLByteSlice, VLByteVec};

#[cfg(feature = "derive")]
pub use tls_codec_derive::{
Expand Down
Loading
Loading