From 409cf0499b5a67fe75d2090378c5078622cb3c25 Mon Sep 17 00:00:00 2001 From: Leynos Date: Mon, 14 Jul 2025 22:11:13 +0100 Subject: [PATCH 1/2] Clarify bincode usage in testing helpers --- wireframe_testing/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wireframe_testing/src/lib.rs b/wireframe_testing/src/lib.rs index c9f6bf93..94b1813f 100644 --- a/wireframe_testing/src/lib.rs +++ b/wireframe_testing/src/lib.rs @@ -3,8 +3,9 @@ //! //! These helpers spawn the application on a `tokio::io::duplex` stream and //! return all bytes written by the app for easy assertions. They work with any -//! message implementing [`serde::Serialize`] – the example uses a simple `u8` -//! value so no generics are required. +//! message implementing [`serde::Serialize`], but the payload is encoded using +//! the `bincode` encoder before framing. The example uses a simple `u8` value so +//! no generics are required. //! //! ```rust //! use wireframe::app::WireframeApp; From f32dc23cd4ca5e4e8bbe2eeed67e5ac02ddabd4d Mon Sep 17 00:00:00 2001 From: Leynos Date: Tue, 15 Jul 2025 18:26:05 +0100 Subject: [PATCH 2/2] Clarify bincode config in docs --- wireframe_testing/src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wireframe_testing/src/lib.rs b/wireframe_testing/src/lib.rs index 94b1813f..83525e0a 100644 --- a/wireframe_testing/src/lib.rs +++ b/wireframe_testing/src/lib.rs @@ -3,9 +3,11 @@ //! //! These helpers spawn the application on a `tokio::io::duplex` stream and //! return all bytes written by the app for easy assertions. They work with any -//! message implementing [`serde::Serialize`], but the payload is encoded using -//! the `bincode` encoder before framing. The example uses a simple `u8` value so -//! no generics are required. +//! message implementing [`serde::Serialize`]. The payload is encoded with +//! [`bincode::encode_to_vec`] using [`bincode::config::standard()`], which means +//! little-endian byte order, variable-length integer encoding and no byte limit +//! are applied. The example uses a simple `u8` value so no generics are +//! required. //! //! ```rust //! use wireframe::app::WireframeApp;