{"id":32398989,"url":"https://github.com/zig-utils/zig-headwind","last_synced_at":"2025-10-25T08:15:51.873Z","repository":{"id":320638124,"uuid":"1082807203","full_name":"zig-utils/zig-headwind","owner":"zig-utils","description":"A high-performance Tailwind CSS \u0026 UnoCSS alternative built with Zig.","archived":false,"fork":false,"pushed_at":"2025-10-24T23:22:02.000Z","size":108,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-25T00:24:30.439Z","etag":null,"topics":["cli","headwind","library","tailwindcss","unocss","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zig-utils.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-24T19:56:04.000Z","updated_at":"2025-10-24T23:22:05.000Z","dependencies_parsed_at":"2025-10-25T00:35:31.663Z","dependency_job_id":null,"html_url":"https://github.com/zig-utils/zig-headwind","commit_stats":null,"previous_names":["zig-utils/zig-headwind"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zig-utils/zig-headwind","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-utils%2Fzig-headwind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-utils%2Fzig-headwind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-utils%2Fzig-headwind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-utils%2Fzig-headwind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zig-utils","download_url":"https://codeload.github.com/zig-utils/zig-headwind/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-utils%2Fzig-headwind/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280924024,"owners_count":26414357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","headwind","library","tailwindcss","unocss","zig"],"created_at":"2025-10-25T08:15:48.947Z","updated_at":"2025-10-25T08:15:51.869Z","avatar_url":"https://github.com/zig-utils.png","language":"Zig","readme":"# Headwind\n\nA high-performance Tailwind CSS alternative built with Zig, targeting feature parity with Tailwind 4.1.\n\n## Features\n\n🚀 **Blazing Fast** - Built with Zig for maximum performance\n⚡ **Zero Dependencies** - No Node.js required (optional npm wrapper for convenience)\n🎯 **Type-Safe** - Compile-time safety guarantees\n🔥 **Hot Reload** - Lightning-fast rebuilds with intelligent caching\n🎨 **Tailwind Compatible** - Designed for feature parity with Tailwind 4.1\n🧩 **Extensible** - Powerful plugin system\n\n## Current Status\n\nThis project is in **active development**. Phase 1 (Project Setup \u0026 Core Architecture) is complete.\n\nSee [TODO.md](TODO.md) for the comprehensive implementation roadmap.\n\n## Installation\n\n### From Source (Current)\n\n```bash\ngit clone https://github.com/yourusername/headwind.git\ncd headwind\nzig build\n```\n\n### Via npm (Coming Soon)\n\n```bash\nnpm install -g @headwind/headwind\n```\n\n### Via Homebrew (Coming Soon)\n\n```bash\nbrew install headwind\n```\n\n## Quick Start\n\n### 1. Initialize a new project\n\n```bash\nheadwind init\n```\n\nThis creates a `headwind.config.json` file:\n\n```json\n{\n  \"content\": {\n    \"files\": [\n      \"src/**/*.{html,js,jsx,ts,tsx,vue,svelte}\"\n    ]\n  },\n  \"theme\": {\n    \"extend\": {}\n  },\n  \"plugins\": []\n}\n```\n\n### 2. Build your CSS\n\n```bash\nheadwind build\n```\n\n### 3. Watch for changes (Coming Soon)\n\n```bash\nheadwind watch\n```\n\n## Configuration\n\nHeadwind uses [zig-config](https://github.com/stacksjs/zig-config) for configuration management, supporting multiple formats and sources.\n\n### Configuration File\n\nCreate `headwind.config.json` in your project root:\n\n```json\n{\n  \"content\": {\n    \"files\": [\"src/**/*.{html,js,jsx,ts,tsx}\"],\n    \"exclude\": [\"node_modules/**\", \"dist/**\"]\n  },\n  \"theme\": {\n    \"colors\": {\n      \"primary\": \"#3b82f6\",\n      \"secondary\": \"#8b5cf6\"\n    },\n    \"extend\": {\n      \"spacing\": {\n        \"128\": \"32rem\"\n      }\n    }\n  },\n  \"darkMode\": {\n    \"strategy\": \"class\",\n    \"className\": \"dark\"\n  },\n  \"build\": {\n    \"output\": \"dist/headwind.css\",\n    \"minify\": true,\n    \"sourcemap\": true\n  },\n  \"plugins\": []\n}\n```\n\n### Environment Variables\n\nOverride configuration with environment variables:\n\n```bash\nexport HEADWIND_BUILD_MINIFY=true\nexport HEADWIND_BUILD_OUTPUT=dist/styles.css\nheadwind build\n```\n\n### Configuration Schema\n\n```zig\npub const HeadwindConfig = struct {\n    content: ContentConfig,\n    theme: ThemeConfig,\n    build: BuildConfig,\n    darkMode: DarkModeConfig,\n    plugins: []PluginConfig,\n    prefix: []const u8 = \"\",\n    separator: []const u8 = \":\",\n};\n```\n\nSee [src/config/schema.zig](src/config/schema.zig) for the full schema.\n\n## CLI Commands\n\n```bash\nheadwind build          # Build CSS from source files\nheadwind watch          # Watch for changes and rebuild (coming soon)\nheadwind init           # Initialize configuration file\nheadwind check          # Validate configuration\nheadwind clean          # Clean cache\nheadwind version        # Show version information\nheadwind help           # Show help message\n```\n\n## Architecture\n\nHeadwind is designed with performance and safety in mind:\n\n### Core Modules\n\n- **Core** - Fundamental types and memory management\n- **Config** - Configuration loading and validation\n- **Scanner** - File system scanning and class extraction\n- **Parser** - CSS class name parsing and validation\n- **Generator** - CSS rule generation and optimization\n- **Cache** - Intelligent caching system\n- **CLI** - Command-line interface\n\n### Memory Management\n\nHeadwind uses Zig's allocator system with:\n- Arena allocators for request-scoped memory\n- String interning for deduplication\n- Object pools for reusable allocations\n- Zero-copy parsing where possible\n\n### Performance Features\n\n- Multi-threaded file scanning\n- Lock-free cache data structures\n- SIMD-accelerated string matching (planned)\n- Incremental builds with smart caching\n- Parallel CSS generation\n\n## Development\n\n### Prerequisites\n\n- Zig 0.12.0 or later\n- [zig-config](https://github.com/stacksjs/zig-config) (included as dependency)\n\n### Build\n\n```bash\n# Build the project\nzig build\n\n# Run tests\nzig build test\n\n# Run benchmarks\nzig build bench\n\n# Format code\nzig build fmt\n\n# Cross-compile for all platforms\nzig build cross\n```\n\n### Project Structure\n\n```\nheadwind/\n├── src/\n│   ├── main.zig              # CLI entry point\n│   ├── headwind.zig          # Library entry point\n│   ├── core/                 # Core types and utilities\n│   │   ├── types.zig\n│   │   └── allocator.zig\n│   ├── config/               # Configuration system\n│   │   ├── schema.zig\n│   │   └── loader.zig\n│   ├── scanner/              # File scanning (planned)\n│   ├── parser/               # CSS parsing (planned)\n│   ├── generator/            # CSS generation (planned)\n│   ├── cache/                # Caching system (planned)\n│   ├── cli/                  # CLI utilities (planned)\n│   └── utils/                # Shared utilities\n│       └── string.zig\n├── test/                     # Tests\n├── examples/                 # Example projects\n├── build.zig                 # Build configuration\n├── build.zig.zon            # Dependency configuration\n└── TODO.md                   # Implementation roadmap\n```\n\n## Roadmap\n\nSee [TODO.md](TODO.md) for the comprehensive roadmap with 650+ tasks organized into 17 phases.\n\n### Phase 1: ✅ Complete\n- Project setup and build system\n- Core architecture\n- Configuration system with zig-config\n- Memory management utilities\n- String utilities\n- CLI framework\n\n### Phase 2-17: 🚧 Planned\n- CSS scanning and parsing\n- Utility class system\n- Variant system\n- Modern CSS features (Tailwind 4.1)\n- Plugin system\n- Performance optimization\n- Testing and benchmarks\n- Documentation and tooling\n- Ecosystem integration\n\n## Benchmarks (Planned)\n\nTarget performance metrics vs Tailwind CSS:\n- 10x faster cold start\n- 5x faster incremental builds\n- 50% lower memory usage\n- Sub-millisecond class extraction\n\n## Contributing\n\nContributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) (coming soon) for guidelines.\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n## Acknowledgments\n\n- Inspired by [Tailwind CSS](https://tailwindcss.com)\n- Inspired by [UnoCSS](https://unocss.dev)\n- Built with [Zig](https://ziglang.org)\n- Configuration powered by [zig-config](https://github.com/stacksjs/zig-config)\n\n## Links\n\n- Documentation: [Coming Soon]\n- GitHub: https://github.com/yourusername/headwind\n- Discord: [Coming Soon]\n\n---\n\nBuilt with ❤️ and Zig\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzig-utils%2Fzig-headwind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzig-utils%2Fzig-headwind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzig-utils%2Fzig-headwind/lists"}