{"id":50729262,"url":"https://github.com/ncode/zig-toybox","last_synced_at":"2026-06-10T07:03:09.122Z","repository":{"id":358072006,"uuid":"1239573051","full_name":"ncode/zig-toybox","owner":"ncode","description":"Zig Toybox is a stdlib-only learning playground for Zig","archived":false,"fork":false,"pushed_at":"2026-05-15T14:53:57.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-15T16:37:06.579Z","etag":null,"topics":[],"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/ncode.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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-15T08:15:45.000Z","updated_at":"2026-05-15T14:54:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ncode/zig-toybox","commit_stats":null,"previous_names":["ncode/zig-toybox"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ncode/zig-toybox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncode%2Fzig-toybox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncode%2Fzig-toybox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncode%2Fzig-toybox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncode%2Fzig-toybox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ncode","download_url":"https://codeload.github.com/ncode/zig-toybox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncode%2Fzig-toybox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34140776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"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":[],"created_at":"2026-06-10T07:03:03.311Z","updated_at":"2026-06-10T07:03:09.117Z","avatar_url":"https://github.com/ncode.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zig-toybox\n\nZig Toybox is a stdlib-only learning playground for Zig 0.16.x.\n\nBuild cursed little programs that make Zig's standard library, allocation model, errors, and build system easier to inspect.\n\n## Quick Start\n\nInstall Zig 0.16.x, then check the compiler version:\n\n```sh\nzig version\n```\n\nRun every maintained solution test:\n\n```sh\nzig build test\n```\n\nLearner mission tests may start red on purpose. Run a learner test when you are\nworking that mission:\n\n```sh\nzig build test-00-hello-basement\n```\n\nRun the first maintained solution:\n\n```sh\nzig build run-00-hello-basement-solution\n```\n\nExpected output:\n\n```text\nHello from the basement.\n```\n\n## How To Use A Mission\n\nStart with the mission README, then inspect the code and tests.\n\n| File | Why it matters |\n| --- | --- |\n| `missions/NN_slug/README.md` | Mission pitch, rules, commands, victory condition, and reflection prompts. |\n| `missions/NN_slug/src/lib.zig` | Testable logic: parsing, transforming, validating, and ownership rules. |\n| `missions/NN_slug/src/main.zig` | CLI, process, file, or terminal wiring. |\n| `missions/NN_slug/tests.zig` | Expected behavior written as executable checks. |\n| `missions/NN_slug/hints/` | Progressive help when you are stuck but do not want the full answer. |\n\nThe usual pattern is pure core, impure shell:\n\n```text\nlib.zig  -\u003e logic you can test directly\nmain.zig -\u003e wiring that talks to the outside world\n```\n\n## Current Missions\n\n| Mission | Teaches | Run |\n| --- | --- | --- |\n| [`00_hello_basement`](missions/00_hello_basement/) | Zig setup, `std.debug.print`, `zig build`, shared tests, and the starter/solution layout. | `zig build run-00-hello-basement` |\n| [`01_fortune_goblin`](missions/01_fortune_goblin/) | Arrays, slices, deterministic indexing, and simple shared tests. | `zig build run-01-fortune-goblin` |\n| [`02_args_and_flags`](missions/02_args_and_flags/) | Argument parsing, command dispatch, usage errors, and bounded formatting. | `zig build run-02-args-and-flags -- Mira` |\n| [`03_tiny_todo`](missions/03_tiny_todo/) | Zig 0.16 file IO, allocator ownership, plain-text serialization, append/list/remove. | `zig build run-03-tiny-todo -- todos.txt list` |\n| [`04_mini_grep`](missions/04_mini_grep/) | String search, slices, line iteration, file reading, and owned filtered output. | `zig build run-04-mini-grep -- goblin README.md` |\n| [`05_hex_viewer`](missions/05_hex_viewer/) | Byte-level thinking, offsets, hex formatting, ASCII rendering, and binary-safe output. | `zig build run-05-hex-viewer -- README.md` |\n| [`06_leak_monster`](missions/06_leak_monster/) | Allocators, ownership, `defer`, `errdefer`, and leak detection. | `zig build run-06-leak-monster` |\n| [`07_arena_cave`](missions/07_arena_cave/) | Arena allocator lifetime, batch parsing, and owned slices. | `zig build run-07-arena-cave` |\n| [`08_json_creature_index`](missions/08_json_creature_index/) | `std.json` parsing, structured data, and parser-owned allocations. | `zig build run-08-json-creature-index` |\n| [`09_comptime_spellbook`](missions/09_comptime_spellbook/) | `comptime`, enums, generated metadata, and static lookup tables. | `zig build run-09-comptime-spellbook` |\n\nRun one learner mission's tests with:\n\n```sh\nzig build test-00-hello-basement\n```\n\nRun that mission's maintained solution tests with:\n\n```sh\nzig build test-00-hello-basement-solution\n```\n\nRun all maintained solution tests with:\n\n```sh\nzig build test\n```\n\n## Learning Rules\n\n- Use only the Zig standard library.\n- Keep allocation, ownership, errors, tests, and build steps visible.\n- Prefer small missions that teach one or two real Zig concepts.\n- Use hints before full solutions when you want to keep learning active.\n- Break things on purpose; failures are part of the toybox.\n\n## Guides\n\n- Learners: read [`LEARNERS.md`](LEARNERS.md) for pairing modes, good prompts, and how to inspect a mission without hiding the machine.\n- Agents and contributors: read [`AGENTS.md`](AGENTS.md) before changing code or adding missions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncode%2Fzig-toybox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fncode%2Fzig-toybox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncode%2Fzig-toybox/lists"}