Rust PTX Builder
Purpose
The library should facilitate CUDA development with Rust. It can be used in a cargo build script of a host crate, and take responsibility for building device crates.
Features
- Obviously, device crates building.
- Announcing device crates sources to cargo, so it can automatically rebuild after changes.
- Reporting about missing tools, for example:
[PTX] Unable to get target details
[PTX]
[PTX] caused by:
[PTX] Command not found in PATH: 'ptx-linker'. You can install it with: 'cargo install ptx-linker'.
Prerequirements
The library depends on ptx-linker and xargo. Both can be installed from crates.io:
cargo install xargo
cargo install ptx-linker
Usage
First, you need to specify a build script in host crate's Cargo.toml
and declare the library as a build-dependency:
[]
= "build.rs"
[]
= "0.3"
Then, typical build.rs
might look like:
extern crate ptx_builder;
use exit;
use *;