⚠️ WARNING ⚠️
This crate is intended for Zenoh's internal use. It is not guaranteed that the API will remain unchanged in any version, including patch updates. It is highly recommended to depend solely on the zenoh and zenoh-ext crates and to utilize their public APIs.
Fuzzing
The zenoh-codec crate includes cargo-fuzz targets for:
transport_messagenetwork_message(structuredarbitrarymodel)scouting_message
From the commons/zenoh-codec/fuzz directory, run:
# Generate the deterministic seed corpus
# Optional: verify the generated corpus matches the current encoder
# Run the fuzz targets
# Only rerun a certain input
# Analyze one input without running the fuzz loop
network_message intentionally differs from the outer parser targets: it uses a
structured arbitrary model to generate valid inner-message states more
efficiently, while raw wire parsing is still covered by transport_message.
Fuzzing Coverage
To inspect corpus coverage for a fuzz target locally, run:
# Run the fuzz target first to grow the corpus
# Replay the saved corpus and collect coverage data
# Resolve the LLVM tools shipped with the nightly toolchain
LLVM_BIN="/bin"
# Resolve the host target triple used by cargo-fuzz coverage builds
HOST_TRIPLE=""
# Hide Rust stdlib and cargo-registry dependencies from the report.
# Print a text summary
# Hide Rust stdlib and cargo-registry dependencies from the report.
# Only render HTML for the Zenoh source trees we want to inspect.