Struct ptx_builder::builder::BuildOutput
source · pub struct BuildOutput<'a> { /* private fields */ }
Expand description
Successful build output.
Implementations§
source§impl<'a> BuildOutput<'a>
impl<'a> BuildOutput<'a>
sourcepub fn get_assembly_path(&self) -> PathBuf
pub fn get_assembly_path(&self) -> PathBuf
Returns path to PTX assembly file.
§Usage
Can be used from build.rs
script to provide Rust with the path
via environment variable:
use ptx_builder::prelude::*;
if let BuildStatus::Success(output) = Builder::new(".")?.build()? {
println!(
"cargo:rustc-env=KERNEL_PTX_PATH={}",
output.get_assembly_path().display()
);
}
sourcepub fn dependencies(&self) -> Result<Vec<PathBuf>>
pub fn dependencies(&self) -> Result<Vec<PathBuf>>
Returns a list of crate dependencies.
§Usage
Can be used from build.rs
script to notify Cargo the dependencies,
so it can automatically rebuild on changes:
use ptx_builder::prelude::*;
if let BuildStatus::Success(output) = Builder::new(".")?.build()? {
for path in output.dependencies()? {
println!("cargo:rerun-if-changed={}", path.display());
}
}
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for BuildOutput<'a>
impl<'a> RefUnwindSafe for BuildOutput<'a>
impl<'a> Send for BuildOutput<'a>
impl<'a> Sync for BuildOutput<'a>
impl<'a> Unpin for BuildOutput<'a>
impl<'a> UnwindSafe for BuildOutput<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more