You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the Cargo book, build scripts should not modify any files outside of $OUT_DIR. The documentation here currently recommends that consumers of this crate do exactly that:
/// Consumes the builder and outputs 1 ptx file for each kernels
/// found.
/// This function returns [`Bindings`] which can then be unused
/// to create a rust source file that will include those kernels.
/// ```no_run
/// let bindings = bindgen_cuda::Builder::default().build_ptx().unwrap();
/// bindings.write("src/lib.rs").unwrap();
/// ```
This caused an issue for me building candle-kernels within Nix because the source of candle-kernels is read-only when the build script is run.
It would be better for us to recommend the pattern given in the code generation example that writes to $OUT_DIR and then uses the include! macro in lib.rs.
The text was updated successfully, but these errors were encountered:
According to the Cargo book, build scripts should not modify any files outside of
$OUT_DIR
. The documentation here currently recommends that consumers of this crate do exactly that:bindgen_cuda/src/lib.rs
Lines 297 to 304 in a6b0c89
This caused an issue for me building candle-kernels within Nix because the source of candle-kernels is read-only when the build script is run.
It would be better for us to recommend the pattern given in the code generation example that writes to
$OUT_DIR
and then uses theinclude!
macro inlib.rs
.The text was updated successfully, but these errors were encountered: