MCPcopy Index your code
hub / github.com/hyperium/h2

github.com/hyperium/h2 @v0.4.15

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.4.15 ↗ · + Follow
1,395 symbols 8,755 edges 86 files 325 documented · 23% 98 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

H2

A Tokio aware, HTTP/2 client & server implementation for Rust.

License: MIT Crates.io Documentation

More information about this crate can be found in the crate documentation.

Features

  • Client and server HTTP/2 implementation.
  • Implements the full HTTP/2 specification.
  • Passes h2spec.
  • Focus on performance and correctness.
  • Built on Tokio.

Non goals

This crate is intended to only be an implementation of the HTTP/2 specification. It does not handle:

  • Managing TCP connections
  • HTTP 1.0 upgrade
  • TLS
  • Any feature not described by the HTTP/2 specification.

This crate is now used by hyper, which will provide all of these features.

Usage

To use h2, first add this to your Cargo.toml:

[dependencies]
h2 = "0.4"

Next, add this to your crate:

extern crate h2;

use h2::server::Connection;

fn main() {
    // ...
}

FAQ

Is this an embedded Java SQL database engine?

No.

Extension points exported contracts — how you extend this code

Next (Interface)
(no doc) [6 implementers]
src/proto/streams/store.rs
Chunk (Interface)
(no doc) [4 implementers]
tests/h2-support/src/raw.rs
MockH2 (Interface)
(no doc) [1 implementers]
tests/h2-tests/tests/client_request.rs
Peer (Interface)
Either a Client or a Server
src/proto/peer.rs
TestFuture (Interface)
Future extension helpers that are useful for tests [1 implementers]
tests/h2-support/src/future_ext.rs
Resolve (Interface)
(no doc) [2 implementers]
src/proto/streams/store.rs
SendRequestExt (Interface)
Extend the `h2::client::SendRequest` type with convenience methods. [1 implementers]
tests/h2-support/src/client_ext.rs
DebugStructExt (Interface)
(no doc) [1 implementers]
src/proto/streams/mod.rs

Core symbols most depended-on inside this repo

new
called by 495
tests/h2-support/src/mock.rs
recv_frame
called by 414
tests/h2-support/src/mock.rs
send_frame
called by 378
tests/h2-support/src/mock.rs
headers
called by 374
tests/h2-support/src/frames.rs
eos
called by 289
tests/h2-support/src/frames.rs
request
called by 207
tests/h2-support/src/frames.rs
join
called by 199
tests/h2-support/src/future_ext.rs
response
called by 173
tests/h2-support/src/frames.rs

Shape

Method 848
Function 364
Class 136
Enum 37
Interface 10

Languages

Rust99%
Python1%

Modules by API surface

src/proto/streams/streams.rs74 symbols
src/frame/headers.rs57 symbols
src/client.rs57 symbols
tests/h2-tests/tests/flow_control.rs52 symbols
src/server.rs52 symbols
src/proto/streams/recv.rs51 symbols
tests/h2-tests/tests/client_request.rs48 symbols
tests/h2-tests/tests/server.rs43 symbols
tests/h2-support/src/frames.rs43 symbols
src/hpack/encoder.rs38 symbols
src/proto/streams/store.rs36 symbols
src/proto/connection.rs36 symbols

For agents

$ claude mcp add h2 \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact