docs.rs failed to build avx-http-0.4.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
avx-http-0.2.0
π avx-http - Pure Rust HTTP/1.1 + HTTP/2 Library
100% proprietary HTTP implementation with ZERO external dependencies!
π― Why avx-http?
- π« ZERO Dependencies - No tokio, no hyper, no serde. Everything from scratch!
- β‘ Async Runtime - Custom runtime with epoll/kqueue/IOCP reactor
- π₯ HTTP/2 Native - Full HTTP/2 with HPACK compression and multiplexing
- π 100% Auditable - Complete control over every line of code
- π§π· Brazilian Optimized - <10ms latency from SΓ£o Paulo
- π¦Έ Pure Rust - Memory safe, no C dependencies
π Features
β Async Runtime (NEW in v0.4.0!)
- Custom ThreadPool - No tokio dependency
- I/O Reactor - epoll (Linux), kqueue (macOS), IOCP (Windows)
- Timer Wheel - Kafka-style hierarchical timers (O(1) operations)
- Non-blocking TCP - AsyncTcpStream and AsyncTcpListener
- Future-based API - Standard async/await support
β HTTP/1.1 (Stable)
- Zero-copy parser with finite state machine
- Manual header parsing (no regex!)
- Keep-alive connection pooling
- Chunked transfer encoding
- All standard methods (GET, POST, PUT, DELETE, etc.)
β HTTP/2 (v0.4.0+)
- Frame parsing - DATA, HEADERS, SETTINGS, PING, GOAWAY, etc.
- HPACK compression - 50-70% header size reduction
- Stream multiplexing - Multiple requests on single TCP connection
- Flow control - Per-stream and connection-level windows
- Priority - Stream dependencies and weights
- Server push - Resource preloading (coming soon)
βοΈ Pure Rust Implementations
- Custom async runtime - ThreadPool + I/O reactor (no tokio!)
- Timer wheel - Hierarchical timeout management
- Zero-copy bytes - Arc-based buffer with cheap cloning
- JSON parser - Recursive descent, no serde needed
- Network I/O - Async TCP with reactor integration
π¦ Installation
[]
= "0.4"
No other dependencies needed! Not even tokio.
π― Quick Start
Async HTTP Server
use AsyncTcpListener;
use runtime;
async
async
HTTP/1.1 Client
use ;
use TcpStream;
HTTP/2 Client
use Http2Connection;
use TcpStream;
JSON Parsing (No serde!)
use JsonValue;
π Architecture
HTTP/2 Frame Flow
Client Server
| |
|-- CONNECTION_PREFACE --------->|
|-- SETTINGS ------------------>|
|<-- SETTINGS -------------------|
|-- SETTINGS (ACK) ------------>|
| |
|-- HEADERS (stream 1) -------->|
|-- DATA (stream 1) ----------->|
|<-- HEADERS (stream 1) ---------|
|<-- DATA (stream 1) ------------|
| |
|-- HEADERS (stream 3) -------->| Multiplexing!
|<-- HEADERS (stream 3) ---------|
|<-- DATA (stream 3) ------------|
HPACK Compression Example
Before: "content-type: application/json" (32 bytes)
After: 0x82 (1 byte)
β index into static table
Compression ratio: 97%!
Zero-Copy Bytes
let original = from;
let slice1 = original.slice; // [1, 2]
let slice2 = original.slice; // [3, 4, 5]
// All three share the same underlying Vec!
// No memcpy, just Arc::clone() and pointer arithmetic
π§ͺ Testing
# Run all tests
# Run HTTP/2 specific tests
# Run benchmarks
# Test JSON parser
πΊοΈ Roadmap
- HTTP/1.1 parser (FSM-based)
- HTTP/1.1 client/server
- HTTP/2 frame parsing
- HPACK compression/decompression
- HTTP/2 stream multiplexing
- Flow control (per-stream + connection)
- Custom async runtime (ThreadPool)
- Zero-copy bytes buffer
- JSON parser (no serde)
- HTTP/2 server push
- TLS 1.3 (via rustls)
- HTTP/3 / QUIC
- WebSocket
- Server-Sent Events (SSE)
- Real async I/O (epoll/kqueue/IOCP)
π Documentation
- PHASE_COMPLETE.md - Implementation details
- NEXT-LEVEL.md - Future roadmap
- examples/ - Code examples
- API Docs - Full API reference
π‘ Design Decisions
Why no Tokio?
- Full control - No hidden allocations or thread spawning
- Predictable - Deterministic performance
- Simple - Easy to debug and profile
- Educational - Learn how async I/O really works
Why no serde?
- Fast compilation - serde adds 10s+ to build time
- Simple JSON - Most APIs use simple structures
- Zero-copy - Can slice strings without allocation
- Type-safe - Still get Rust's type safety
Why no hyper?
- Learning - Understand HTTP/2 deeply
- Control - Optimize for Brazilian networks
- Auditability - See every line of protocol code
- Fun - Building protocols is awesome! π
π€ Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
π License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
Built with β€οΈ for the AVL Platform and Brazilian research infrastructure π§π·