Thank you for your interest in contributing to Zig University! This document provides guidelines and instructions for contributing to this educational project.
There are many ways you can contribute to Zig University:
- Add new examples: Create new examples demonstrating Zig features or use cases
- Improve existing examples: Enhance code, add comments, or fix bugs in existing examples
- Documentation: Improve explanations, add notes, or create tutorials
- Testing: Ensure examples work across different Zig versions
- Feedback: Report issues or suggest improvements
When contributing code examples, please follow these guidelines:
- Self-contained: Each example should be self-contained and demonstrate a specific concept
- Well-commented: Include detailed comments explaining what the code does
- Error handling: Demonstrate proper error handling
- Naming convention: Follow Zig's naming conventions
- Tested: Ensure your example compiles and runs with the latest Zig release
Follow the Zig style guide for all code contributions:
- Use 4 spaces for indentation (not tabs)
- Keep lines under 100 characters when possible
- Use
camelCasefor function and variable names - Use
PascalCasefor types - Use
snake_casefor file names
- Fork the repository
- Create a new branch for your feature or fix
- Make your changes
- Test your changes with the latest Zig version
- Submit a pull request with a clear description of your changes
All contributions will be reviewed for:
- Code quality and style
- Educational value
- Accuracy and correctness
- Documentation quality
If you have questions about contributing or need help with your contribution, please open an issue on the repository with your question.
Thank you for helping to improve Zig University and spreading knowledge about the Zig programming language!