sdlparser-scrap/docs/INDEX.md

3.1 KiB

SDL3 Parser Documentation

Complete documentation for the SDL3 C header to Zig bindings generator.

User Guides

Essential

  1. Getting Started - Installation, first parse, basic usage
  2. Quickstart Guide - Quick reference for common tasks
  3. API Reference - Complete command-line reference

Features

  1. Dependency Resolution - How automatic type extraction works
  2. Known Issues - Current limitations and workarounds

Technical Documentation

Architecture

  1. Architecture Overview - System design and components
  2. Dependency Flow - Complete technical walkthrough (845 lines)
  3. Visual Flow Diagrams - Quick reference diagrams

Implementation Details

  1. Multi-Field Structs - How int x, y; parsing works
  2. Typedef Support - Simple typedef implementation
  3. Multi-Header Testing - Test results across SDL headers

Development

  1. Development Guide - Contributing, extending, Zig 0.15 guidelines
  2. 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.