Pre-RFC: Add a builtin macro to indicate build dependency to file

Just to note: state of the art is const _: &[u8] = include_bytes!("");. If we want to just bless this pattern with some more magic around that macro, we could maybe make that pattern (which deliberately makes the include not usable) add the data dependency without actually reading the file and inlining it.

As an alternative to a new macro or special casing include_bytes, add a #[generated()] attribute that can be emitted from code generation, one of the properties of which allows adding data dependency by noting external resources used to generate it.

1 Like