Nyarum/zig-pkg-checker
A comprehensive build system and compatibility checker for Zig packages across multiple Zig versions
A comprehensive build system and compatibility checker for Zig packages across multiple Zig versions. This system automatically fetches packages from URLs, builds them with different Zig versions using Docker containers, and provides detailed compatibility reports.
Clone the repository:
git clone <repository-url>
cd zig-pkg-checker
Build Docker images for all Zig versions:
make docker-build
Build and run the application:
make run-docker
The server will start on http://localhost:3000
Each Zig version has its own Docker container:
zig-checker:master
- Latest Zig development versionzig-checker:0.14.0
- Zig 0.14.0 stablezig-checker:0.13.0
- Zig 0.13.0zig-checker:0.12.0
- Zig 0.12.0For each package and Zig version combination:
zig build
is executed with timeoutzig build test
is executed if tests existPOST /api/packages
Content-Type: application/json
{
"name": "my-package",
"url": "https://github.com/user/repo",
"description": "A sample Zig package",
"author": "author-name",
"license": "MIT"
}
GET /api/packages
Returns packages with build results:
{
"packages": [
{
"id": 1,
"name": "my-package",
"url": "https://github.com/user/repo",
"description": "A sample Zig package",
"author": "author-name",
"license": "MIT",
"created_at": "2024-01-01T00:00:00Z",
"last_updated": "2024-01-01T00:00:00Z",
"popularity_score": 0,
"build_results": [
{
"zig_version": "master",
"build_status": "success",
"test_status": "success",
"last_checked": "2024-01-01T00:00:00Z"
},
{
"zig_version": "0.14.0",
"build_status": "failed",
"test_status": null,
"last_checked": "2024-01-01T00:00:00Z"
}
]
}
],
"total": 1,
"page": 1,
"limit": 20
}
GET /api/health
Visit http://localhost:3000
to access the web interface:
/
) - Overview and statistics/packages
) - Browse submitted packages and their build status/submit
) - Submit a new package for testing/stats
) - Compatibility statistics and trends/api
) - API documentation# Build the application
make build
# Run tests
make test
# Build Docker images
make docker-build
# Clean up
make clean
# Clean Docker artifacts
make docker-clean
# Full cleanup
make clean-all
# Show help
make help
The application uses SQLite with the following tables:
Build system settings can be configured in src/build_system.zig
:
# Check Docker is running
docker --version
# Rebuild images if corrupted
make docker-clean
make docker-build
# Check container logs
docker logs <container-name>
build.zig
filezig_pkg_checker.db
to reset database[Add your license here]