I am using the include_bytes!
macro to compile a GLSL shader into a rust program. It seems that Cargo is unaware of this however: when I modify just the shader file and test it with cargo run
the updated file is not compiled in. Manually touching the .rs
file that includes the shader does work.
Do I need to add something to my Cargo.toml
to explictly state this dependency?
Version info:
$ rustc --version && cargo --version
rustc 1.0.0-nightly (ecf8c64e1 2015-03-21) (built 2015-03-22)
cargo 0.0.1-pre-nightly (e689383 2015-03-16) (built 2015-03-16)
This has been fixed in rustc: https://github.com/rust-lang/rust/pull/24423
Cargo has no way currently to add a file to the list of 'watched' files for changes. It won't know about files included with include_bytes!
because that would involve special-casing that macro specifically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With