[infra] Project scaffold: build.zig, directory structure (#1) #9

Merged
sleepy merged 2 commits from infra/1-project-scaffold into master 2026-05-10 12:21:48 +02:00
Owner

Summary

Initial project scaffold for sleepy-llm inference engine.

Changes

  • build.zig with Metal.framework linking and .metal -> .metallib compilation
  • build.zig.zon package manifest
  • Full directory structure per PROJECT.md architecture
  • Root README.md with build instructions
  • Stub files in all packages

Verification

  • zig build
  • zig build test
  • zig build lint

Closes #1

## Summary Initial project scaffold for sleepy-llm inference engine. ## Changes - build.zig with Metal.framework linking and .metal -> .metallib compilation - build.zig.zon package manifest - Full directory structure per PROJECT.md architecture - Root README.md with build instructions - Stub files in all packages ## Verification - `zig build` ✅ - `zig build test` ✅ - `zig build lint` ✅ Closes #1
- Add build.zig with Metal.framework linking and metallib compilation
- Add build.zig.zon package manifest
- Create directory structure: metal/, tensor/, safetensors/, models/, inference/, platform/, tests/
- Add stub .zig files in all modules
- Add stub .metal kernel (placeholder.metal)
- Add Objective-C shim (shim.m) for Metal device/queue creation
- Add README.md files per AGENTS.md feature directory requirements
- Update root README.md with build instructions and architecture overview
- Add .gitignore for zig cache directories

Issue: #1
Author
Owner

CHANGES_REQUESTED

  1. Missing docs/ directory — add docs/metal_kernels.md per PROJECT.md
  2. Revert unrelated README changes
  3. Fix unsafe null unwrap in build.zig:42 — use orelse
  4. Fix lint step to include build.zig and build.zig.zon
  5. Add nil checks in metal/shim.m
  6. Add trailing newlines to all files
  7. Extract helper for duplicated Metal/C setup in build.zig
  8. Add bounds check comment in placeholder.metal
CHANGES_REQUESTED 1. Missing `docs/` directory — add `docs/metal_kernels.md` per PROJECT.md 2. Revert unrelated README changes 3. Fix unsafe null unwrap in build.zig:42 — use `orelse` 4. Fix lint step to include `build.zig` and `build.zig.zon` 5. Add nil checks in metal/shim.m 6. Add trailing newlines to all files 7. Extract helper for duplicated Metal/C setup in build.zig 8. Add bounds check comment in placeholder.metal
sleepy referenced this pull request from a commit 2026-05-10 12:20:12 +02:00
- Add docs/metal_kernels.md per PROJECT.md architecture
- Restore README 'Why not ZINC or llama.cpp' section removed by scaffold
- Fix unsafe null unwrap in build.zig (b.build_root.path orelse '.')
- Expand lint step to check all files (zig fmt --check .)
- Add nil checks in Objective-C shim for device/queue creation
- Add trailing newlines to build.zig, build.zig.zon, shim.m, placeholder.metal, README.md
- Extract linkMetalAndShim helper to DRY duplicate framework/C-source setup
- Add bounds check note in placeholder.metal
sleepy merged commit d51af89560 into master 2026-05-10 12:21:48 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sleepy/sleepy-llm!9
No description provided.