3.1 KiB
3.1 KiB
SDL3 Parser Documentation
Complete documentation for the SDL3 C header to Zig bindings generator.
Quick Links
- README - Start here for project overview
- Getting Started - Installation and first use
- API Reference - Command-line options
User Guides
Essential
- Getting Started - Installation, first parse, basic usage
- Quickstart Guide - Quick reference for common tasks
- API Reference - Complete command-line reference
Features
- Dependency Resolution - How automatic type extraction works
- Known Issues - Current limitations and workarounds
Technical Documentation
Architecture
- Architecture Overview - System design and components
- Dependency Flow - Complete technical walkthrough (845 lines)
- Visual Flow Diagrams - Quick reference diagrams
Implementation Details
- Multi-Field Structs - How
int x, y;parsing works - Typedef Support - Simple typedef implementation
- Multi-Header Testing - Test results across SDL headers
Development
- Development Guide - Contributing, extending, Zig 0.15 guidelines
- Roadmap - Future plans and priorities
Quick Start
# Install
cd parser/
zig build
zig build test
# Generate bindings
zig build run -- ../SDL/include/SDL3/SDL_gpu.h --output=gpu.zig
# Use in code
const gpu = @import("gpu.zig");
Documentation by Use Case
"I want to generate Zig bindings"
→ Start with Getting Started
"I want to understand how it works"
→ Read Architecture
"I'm hitting an error"
→ Check Known Issues
"I want to extend the parser"
→ See Development Guide
"I need technical details"
→ Deep dive: Dependency Flow
Project Status
Version: 2.1
Status: Production ready for SDL_gpu.h
Last Updated: 2026-01-22
Supported Headers
| Header | Status | Notes |
|---|---|---|
| SDL_gpu.h | ✅ Complete | 100% dependency resolution |
| SDL_keyboard.h | ⚠️ Partial | Large enum issues |
| SDL_video.h | ⚠️ Partial | Some types not found |
| SDL_events.h | ⚠️ Partial | Parse errors |
See Known Issues for details.
Key Features
✅ Automatic dependency resolution (100% for SDL_gpu.h)
✅ Multi-field struct parsing (int x, y;)
✅ Typedef support (typedef Uint32 SDL_Type;)
✅ Method organization (functions → methods)
✅ Mock generation for testing
✅ Comprehensive error reporting
Statistics
- Code: ~900 lines (production)
- Tests: 26+ unit tests (100% passing)
- Documentation: 5,500+ lines
- Success Rate: 100% for SDL_gpu.h
Archive
Historical planning and session documents are in archive/ for reference.