GEMINI.md
GEMINI.mdGEMINI.mdroot
Quality
79/100
Scores the file, not the repository.Length
361 words
10 headings · 0 code blocksRepository
1.2k
— · pushed 17 days agoLast changed
3 days ago
First indexed 3 days ago.1# Zig Cookbook - Project Context23## Project Overview4`zig-cookbook` is a multilingual collection of Zig (0.16.x) programming recipes and examples. It demonstrates common programming tasks using Zig's standard library and specialized packages. The project generates a static documentation website using the [zine](https://zine-ssg.io) static site generator.56## Key Technologies7- **Zig (0.16.0)**: The primary programming language.8- **Zine**: Static site generator for documentation.9- **Docker**: Used for running databases (Postgres, MySQL) required by some examples.10- **system dependencies**: Some examples link against C libraries like `libpq`, `mysqlclient`, and `sqlite3`.1112## Directory Structure13- `assets/src/`: Contains all Zig example source files (e.g., `01-01.zig`).14- `src/`: Contains localized documentation in Super Markdown (`.smd`) format, organized by language (`en-US`, `zh-CN`).15- `lib/`: C header files and helper source code for C interop examples.16- `layouts/`: Templates and UI components for the documentation website.17- `i18n/`: Internationalization configuration files (`.ziggy`).1819## Building and Running20The project uses the standard Zig build system.2122### Running Examples23- **Specific Example**: `zig build run-{chapter}-{seq}` (e.g., `zig build run-01-01`).24- **All Examples**: `zig build run-all`.25- **Compile Check**: `zig build check`.2627### Local Documentation28- **Preview Site**: `make serve` (starts `zine` on port 1313).29- **Zine Preview**: Alternatively, use `zine` directly.3031### Dependencies & Environment32- **Install System Libraries**: `make install-deps` (supports macOS via brew and Linux via apt).33- **Databases**: `docker-compose up -d` to start the required Postgres and MySQL instances.34- **Environment Variables**: `source env.sh` may be required on some systems to set `PKG_CONFIG_PATH` for database clients.3536## Development Conventions37- **Zig Version**: Targets Zig 0.16.x. Adheres to modern Zig idioms like `std.Io` and `std.process.Init` entry points.38- **Testing**: Many examples include `std.testing` assertions within their `main` or as helper blocks to verify correctness.39- **C Interop**: Uses `b.addTranslateC` in `build.zig` to interface with C libraries.40- **Formatting**: The project uses `prettier` for linting `.smd` files (via `make lint`).4142## Project-Specific Tips43- When adding a new recipe:44 1. Add the Zig code to `assets/src/`.45 2. Create corresponding `.smd` files in `src/en-US/` and `src/zh-CN/`.46 3. Update `build.zig` if the example has special library dependencies.47- Use `std.debug.print` for output in examples as they are meant for learning.48
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| google-gemini/gemini-cliGEMINI.md · 106k | GEMINI.md | setupbuildtestlint-format+6 | 91/100 | 3 days ago | |
| diegosouzapw/OmniRouteGEMINI.md · 38k | GEMINI.md | testlint-formatarchsecurity+2 | 87/100 | 3 days ago | |
| compozy/gographGEMINI.md · 9 | GEMINI.md | setuptestlint-formatarch+4 | 86/100 | 3 days ago | |
| lepinkainen/hovimestariGEMINI.md · 0 | GEMINI.md | teststylearchtesting-strategy+1 | 81/100 | 3 days ago | |
| firebase/flutterfireGEMINI.md · 9.2k | GEMINI.md | lint-formatstylearchdo-not+1 | 80/100 | 3 days ago | |
| lepinkainen/humanlogGEMINI.md · 0 | GEMINI.md | buildteststylearch+2 | 79/100 | 3 days ago | |
| iloveitaly/llm-ide-rulesGEMINI.md · 13 | GEMINI.md | setupteststyletypes+7 | 77/100 | 3 days ago | |
| nodejs/nodedeps/v8/GEMINI.md · 119k | GEMINI.md | buildteststylearch+4 | 77/100 | 3 days ago |
