crane/docs/faq/building-with-non-rust-includes.md
Ivan Petkov dfe3afcdd9
Update docs (#211)
* add section on source filtering
* add FAQ about `include_str!`
* add section about sandbox-unfriendly build scripts
2023-01-04 19:06:37 -08:00

11 lines
594 B
Markdown

## I'm having trouble building a project which uses `include_str!`
Double check if the source passed into the derivation is being cleaned or
filtered in anyway. Using `craneLib.cleanCargoSource` (or
`craneLib.filterCargoSources` directly) will omit any non-cargo and non-rust
files before trying to build the derivation. Thus if the project is trying to
use `include_str!`, `include_bytes!`, or any other attempt at accessing such a
file you may need to tweak the source filter to ensure the files are included.
Check out the [source filtering](../source-filtering.md) section for more info!