https://github.com/bevy-rust-gpu/rust-gpu-builder
Utility application for building rust-gpu shader crates.
https://github.com/bevy-rust-gpu/rust-gpu-builder
rust rust-gpu
Last synced: 4 months ago
JSON representation
Utility application for building rust-gpu shader crates.
- Host: GitHub
- URL: https://github.com/bevy-rust-gpu/rust-gpu-builder
- Owner: Bevy-Rust-GPU
- License: apache-2.0
- Created: 2023-02-28T03:02:05.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-05-25T01:33:46.000Z (over 1 year ago)
- Last Synced: 2025-03-22T22:40:02.238Z (11 months ago)
- Topics: rust, rust-gpu
- Language: Rust
- Homepage:
- Size: 1.34 MB
- Stars: 6
- Watchers: 0
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# `rust-gpu-builder`
[](https://bevy-rust-gpu.github.io/rust-gpu-builder/)
`rust-gpu` helper program for automating shader crate compilation.
Can compile once, or run in daemon mode and recompile in response to filesystem changes.
## Usage
`rust-gpu-builder` relies on the [`spirv-builder`](https://embarkstudios.github.io/rust-gpu/api/spirv_builder/) crate, which in turn relies on the cargo ecosystem
to configure the appropriate nightly toolchain for `rust-gpu`. As such, it needs to be run from inside a workspace via `cargo run`.
Thus, it's recommended to add `rust-gpu-builder` as a a git submodule of your cargo workspace, and set it up as the default binary target.
### One-shot compilation
`cargo run --release -- ` will compile the provided shader crate and output `.spv` and `.spv.json` to `target/spirv-unknown-spv1.5/release/deps/`.
### Hot-recompile
`cargo run --release -- -w ` will compile as per the above, then watch the provided path and recompile whenever it changes.