{"id":51007561,"url":"https://github.com/captkirk88/zevy-alloy","last_synced_at":"2026-06-20T22:01:47.921Z","repository":{"id":356908048,"uuid":"1231435474","full_name":"captkirk88/zevy-alloy","owner":"captkirk88","description":"Compile a ZSL (Zig Shader Language) to GLSL, HLSL, METAL, DXIL(tool req), SPIRV(tool req)","archived":false,"fork":false,"pushed_at":"2026-06-06T23:17:00.000Z","size":236,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-07T01:12:26.572Z","etag":null,"topics":["dxil","glsl","hlsl","metal","spirv","zevy","zevy-ecs","zig","zig-library","zig-package","ziglang"],"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/captkirk88.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":null,"dco":null,"cla":null}},"created_at":"2026-05-07T00:48:35.000Z","updated_at":"2026-06-06T23:17:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/captkirk88/zevy-alloy","commit_stats":null,"previous_names":["captkirk88/zevy-alloy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/captkirk88/zevy-alloy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captkirk88%2Fzevy-alloy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captkirk88%2Fzevy-alloy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captkirk88%2Fzevy-alloy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captkirk88%2Fzevy-alloy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/captkirk88","download_url":"https://codeload.github.com/captkirk88/zevy-alloy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captkirk88%2Fzevy-alloy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34586666,"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-20T02:00:06.407Z","response_time":98,"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":["dxil","glsl","hlsl","metal","spirv","zevy","zevy-ecs","zig","zig-library","zig-package","ziglang"],"created_at":"2026-06-20T22:01:46.431Z","updated_at":"2026-06-20T22:01:47.917Z","avatar_url":"https://github.com/captkirk88.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!NOTE]\n\u003e Archived, see [zevy-ecs](https://www.github.com/captkirk88/zevy-ecs) README for details.\n\n# zevy-alloy\n\n\u003e Experimental: zevy-alloy is early-stage and may change in breaking ways.\n\u003e Metal support is currently untested, open to contributions and testers.\n\u003e HLSL output is currently untested, open to contributions and testers.\n\nzevy-alloy is a ZSL shader compiler and build integration library for Zig projects.\nIt compiles `.zsl` shader sources to multiple targets, including GLSL 450, GLSL 330,\nGLSL ES 300, HLSL, Metal, WGSL, SPIR-V, and DXIL.\n\n## Purpose\n\n- Provide a single shader authoring path (`.zsl`) for multiple graphics backends.\n- Expose a CLI for direct shader compilation.\n- Expose build helpers to compile shaders from `build.zig`.\n\n## Usage\n\n### Build\n\n```bash\nzig build\n```\n\n### Run tests\n\n```bash\nzig build test\n```\n\n### Compile configured shaders from build script\n\n```bash\nzig build shaders\n```\n\n### CLI\n\n```bash\nzevy-alloy \u003ccommand\u003e \u003cfile.zsl\u003e [options]\n```\n\nCommands:\n\n- `compile`: generate requested shader outputs.\n- `validate`: validate existing generated shader files at the requested output paths.\n\nAvailable output options:\n\n- `--out-hlsl \u003cpath\u003e`\n- `--out-glsl \u003cpath\u003e` (GLSL 450)\n- `--out-glsl330 \u003cpath\u003e`\n- `--out-glsles \u003cpath\u003e` (GLSL ES 300)\n- `--out-msl \u003cpath\u003e`\n- `--out-wgsl \u003cpath\u003e`\n- `--out-spv \u003cpath\u003e`\n- `--out-dxil \u003cpath\u003e`\n- `--spirv-env \u003cenv\u003e` where `\u003cenv\u003e` is `opengl`, `vulkan1.0`, `vulkan1.1`, `vulkan1.2`, `vulkan1.3`, or `vulkan1.4`\n- `--spirv-version \u003cver\u003e` where `\u003cver\u003e` is `spv1.0` through `spv1.6`\n- `--dxil-model \u003cmodel\u003e` where `\u003cmodel\u003e` is `6.0` through `6.8`\n- `--local-size \u003cx,y,z\u003e` (override compute local size)\n- `--local-size-x \u003cn\u003e`\n- `--local-size-y \u003cn\u003e`\n- `--local-size-z \u003cn\u003e`\n\nIf no output flags are provided, zevy-alloy uses default output paths next to the source file for all supported formats.\n\nValidation uses backend tools where available:\n\n- GLSL: `glslangValidator`\n- SPIR-V: `spirv-val`\n- HLSL and DXIL: `dxc`\n- WGSL: currently checked for file presence/content only, no external validation tool used yet.\n- MSL: currently checked for file presence/content only, no external validation tool used yet.\n\nWGSL generation uses `spirv-cross` (`spirv-cross --wgsl ...`) under the hood.\nIf `spirv-cross` is not available on PATH, WGSL output requests are reported and skipped.\n\nCompatibility behavior is strict for versioned targets: if a shader uses features that are incompatible with a requested backend/profile (for example, storage buffers in GLSL 330/ES 300, or standalone uniforms for Vulkan SPIR-V), zevy-alloy fails generation instead of silently emitting partial output.\n\nCompute shaders can also set local size in source with a module-level declaration:\n\n```zig\nconst zsl = @import(\"zsl\");\n\npub const compute: zsl.ComputeOpts = .{\n\t.local_size_x = 8,\n\t.local_size_y = 8,\n\t.local_size_z = 1,\n};\n```\n\nPrecedence is deterministic: CLI override flags win over source `compute` options, and if neither is set, local size defaults to `1,1,1`.\n\n## Examples\n\nSee [examples/](examples/) for sample shaders and usage patterns.\n\n### App-based circles example (zevy_raylib integration)\n\nThe [examples/circles.zig](examples/circles.zig) sample now uses `app.run()` and staged systems instead of a manual game loop.\n\nRun it with:\n\n```bash\nzig build circles --release=fast\n```\n\n## ZLS and IntelliSense\n\nFor editor IntelliSense with ZLS (Zig Language Server), import the ZSL stub module in shader files:\n\n```zig\nconst zsl = @import(\"zsl\");\n```\n\nIf your editor cannot resolve that module automatically, point it at the local stub file [zsl.zig](zsl.zig), which provides the type/function surface used for completions and diagnostics.\n\nPlain uniforms are now intended to be declared as top-level `pub var` values with an explicit type, for example `pub var time: f32 = 0.0;`. Buffer/sampler/texture resources still use the explicit `zsl.UniformBuffer(...)`, `zsl.StorageBuffer(...)`, `zsl.Texture2D(...)`, and similar wrapper types in the `pub var` annotation. The older `zsl.Uniform(...)` wrapper is still accepted for compatibility, but it is deprecated.\n\nEntry-point input and output struct names are not special. You can name them however you want; `PSInput` and `PSOutput` are just examples used in older shader snippets.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptkirk88%2Fzevy-alloy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaptkirk88%2Fzevy-alloy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptkirk88%2Fzevy-alloy/lists"}