Build: default and custom game build output folder (.public)
Goal
Change the default build output folder for game projects from <project-path>/.cache/zig-out/bin to <project-path>/.public, and allow users to configure a custom output folder.
Currently, game binaries are compiled to a cache directory that is not suitable for distribution or easy access. The default should be a .public folder at the project root — clean, discoverable, and ready for deployment. Users should also be able to specify a custom output path in project settings.
Context / integration points
- Current output:
<project-path>/.cache/zig-out/bin— buried in cache, not user-friendly. - Default target:
<project-path>/.public— intuitive, git-ignorable, distribution-ready. - The build system (build.zig / build.zig.zon) needs to support configurable output paths.
- Project settings should expose a "Build Output Path" option.
- Affects both development builds and release/export builds.
Design
- Change the default build output directory from
.cache/zig-out/binto.public. - Add a "Build Output Path" setting in the Project Settings dialog.
- The setting defaults to
.publicbut the user can override it (absolute or relative path). - The setting is stored in the project configuration file (
project.turianor similar). - Update the "Build and Run" command to read the output path from settings.
- Ensure the output directory is created if it doesn't exist.
- Update
.gitignorerecommendations to include.public/.
Tasks
- Change default output path to
.publicin the build system - Add "Build Output Path" setting to Project Settings
- Persist the setting in the project configuration
- Update "Build and Run" to use the configured output path
- Create output directory if missing before build
- Update documentation and .gitignore template
- Test with relative and absolute custom paths
Acceptance criteria
- Default build output is
<project-path>/.public. - Users can change the output path in Project Settings.
- Custom paths (absolute and relative) work correctly.
- Output directory is created automatically if it doesn't exist.
- Backward compatible: existing projects using the old path still work.