From 8e64c0670835d2005dfb10c743382c9fd52f56d6 Mon Sep 17 00:00:00 2001 From: Lucas Pardue Date: Wed, 13 Dec 2023 17:20:51 +0000 Subject: [PATCH] h3: allow the frame module to be public under a new feature (#1689) The quiche::h3::frame module is by default private because low-level details are abstracted behind higher-layer APIs. However, for some situations, such as testing, it can be helpful to have direct access to frame types and their serialization/deserialization code. This change adds a new 'internal' feature that when enables makes the frame module public. There are no guarantees of API stability for things exposed in this way. --- quiche/Cargo.toml | 3 +++ quiche/src/h3/mod.rs | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/quiche/Cargo.toml b/quiche/Cargo.toml index ed7b1f5cd4..64af5c08e6 100644 --- a/quiche/Cargo.toml +++ b/quiche/Cargo.toml @@ -45,6 +45,9 @@ fuzzing = [] # Build and expose the FFI API. ffi = [] +# Exposes internal APIs that have no stability guarantees across versions. +internal = [] + [package.metadata.docs.rs] no-default-features = true features = ["boringssl-boring-crate", "qlog"] diff --git a/quiche/src/h3/mod.rs b/quiche/src/h3/mod.rs index 534a5b5689..42146f6e59 100644 --- a/quiche/src/h3/mod.rs +++ b/quiche/src/h3/mod.rs @@ -6277,6 +6277,10 @@ mod tests { #[cfg(feature = "ffi")] mod ffi; +#[cfg(feature = "internal")] +#[doc(hidden)] +pub mod frame; +#[cfg(not(feature = "internal"))] mod frame; #[doc(hidden)] pub mod qpack;