### Install honggfuzz for Cargo Source: https://github.com/hyperium/h2/blob/master/tests/h2-tests/README.md Install the honggfuzz tool for use with cargo. This is a prerequisite for running the fuzz tests. ```rust cargo install honggfuzz ``` -------------------------------- ### Basic H2 Server Setup in Rust Source: https://github.com/hyperium/h2/blob/master/README.md Include the h2 crate and import the necessary server connection type. This snippet shows the basic setup for a server, with the main logic to be filled in. ```rust extern crate h2; use h2::server::Connection; fn main() { // ... } ``` -------------------------------- ### Commit Message Subject Examples Source: https://github.com/hyperium/h2/blob/master/CONTRIBUTING.md Illustrates correct and incorrect formats for commit message subjects. Ensure subjects are concise, use active voice, and reference issues when applicable. ```text bad: server disconnects should cause dst client disconnects. good: Propagate disconnects from source to destination ``` ```text bad: support tls servers good: Introduce support for server-side TLS (#347) ``` -------------------------------- ### HPACK Test Case JSON Format Source: https://github.com/hyperium/h2/blob/master/fixtures/hpack/README.md Example of a JSON object representing a single test case for HPACK header compression. It includes the description, header table size, encoded wire data, and the decoded headers. ```json { "description": "Encoded request headers with Literal without index only.", "cases": [ { "seqno": 0, "header_table_size": 4096, "wire": "1234567890abcdef", "headers": [ { ":method": "GET" }, { ":scheme": "http" }, { ":authority": "example.com" }, { ":path": "/" }, { "x-my-header": "value1,value2" } ] }, ..... ] } ``` -------------------------------- ### Run h2 Fuzz Tests Source: https://github.com/hyperium/h2/blob/master/tests/h2-tests/README.md Execute the h2 fuzz tests using honggfuzz. The HFUZZ_RUN_ARGS environment variable can be used to pass arguments to honggfuzz. ```shell HFUZZ_RUN_ARGS="-t 1" cargo hfuzz run h2-fuzz ``` -------------------------------- ### Add H2 Dependency to Cargo.toml Source: https://github.com/hyperium/h2/blob/master/README.md To use the h2 crate, add it as a dependency in your Cargo.toml file. Specify the desired version. ```toml [dependencies] h2 = "0.4" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.