UVHTTP Specification Index
This directory contains the formal specifications for the UVHTTP project, following Spec Driven Development (SDD) principles. Each spec defines the behavior contract, interfaces, and quality criteria for a module.
Spec Documents
Core API Specifications
- Server API Spec —
uvhttp_server_tlifecycle, listen, stop - Router API Spec —
uvhttp_router_troute matching, cache - Connection API Spec —
uvhttp_connection_tlifecycle - Request API Spec —
uvhttp_request_tparsing, headers, body - Response API Spec —
uvhttp_response_tbuilding, sending - WebSocket API Spec — WebSocket handshake, frames, close
- Static File API Spec —
uvhttp_static_tfile serving, cache - TLS API Spec —
uvhttp_tls_tcontext, handshake, config - Config API Spec —
uvhttp_config_toptions, validation - Error API Spec —
uvhttp_error_tcodes, messages, handling
Quality Specifications
- Memory Safety Spec — ASan/UBSan gates, leak policy
- Test Coverage Spec — Coverage targets, test categories
- Performance Spec — Throughput, latency, resource limits
- Build System Spec — CMake configuration, C standard, flags
- Documentation Style Spec — Writing standards, AI flavor removal
Internal Specifications
- Allocator Spec —
uvhttp_allocator_tinterface, backends - Protocol Upgrade Spec — HTTP upgrade mechanism
Spec Format
Each spec document follows this template:
markdown
# Module Name Spec
## Overview
Brief description of the module's purpose and responsibilities.
## Interfaces
### Function Name
- **Signature**: `return_type function_name(params)`
- **Purpose**: What it does
- **Preconditions**: What must be true before calling
- **Postconditions**: What is true after calling
- **Error conditions**: When it returns errors
- **Thread safety**: Thread-safe or not
## Behavior Rules
Numbered rules that define the module's behavior contract.
## Performance Requirements
Specific throughput, latency, or memory targets.
## Test Requirements
What test scenarios must exist.Compliance
Each spec is verified by:
- Static analysis: Code review against spec rules
- Unit tests: Test cases covering each spec requirement
- Integration tests: End-to-end scenarios
- CI gates: Automated checks on every PR