923fdee42e
horizon_shader_api::check builds each stage as the renderer does and judges it the same way wherever it runs (the game, the launcher, the registry's CI, the coming horizon-shader tool): naga parses and validates it; the stage function must have its signature; the pack's files declare no bindings, no entry points and no horizon_ names; each override is an option of its type or has a default, and each option is used; a stage stays within 20 000 expressions and 64 texture reads; and every entry point translates to SPIR-V, Metal and HLSL with the options at their defaults, minimums and maximums. Problems carry the pack's own file, line and column. Pack::sha256 gives the reproducible package's hash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
683 B
TOML
20 lines
683 B
TOML
[package]
|
|
name = "horizon-shader-api"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version = "1.85"
|
|
description = "Horizon's own shader packs (WGSL, docs/api/shaders.md): horizon-shaders.toml, the .hshader package"
|
|
|
|
[dependencies]
|
|
bytemuck = { version = "1.24", features = ["derive"] }
|
|
# Parses and validates a pack's WGSL, and translates it as wgpu does for Vulkan, Metal and DirectX 12.
|
|
naga = { version = "30.0.1", features = ["wgsl-in", "spv-out", "msl-out", "hlsl-out"] }
|
|
serde = { version = "1", features = ["derive"] }
|
|
sha2 = "0.10"
|
|
toml = "1.1.6"
|
|
zip = { version = "2", default-features = false, features = ["deflate"] }
|
|
|
|
[lints]
|
|
workspace = true
|