https://github.com/zshipko/halide-build
https://github.com/zshipko/halide-build
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zshipko/halide-build
- Owner: zshipko
- License: isc
- Created: 2019-10-12T01:06:47.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-10-29T17:30:42.000Z (over 3 years ago)
- Last Synced: 2025-03-18T21:50:58.465Z (about 1 year ago)
- Language: Rust
- Size: 35.2 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# halide-build
A build tool for [Halide](https://github.com/halide/halide) filters.
It can be used from within Rust code or from the command-line.
## CLI
To build the command-line interface the `bin` feature must be activated:
```shell
$ cargo build --features=bin
```
## Build
To build a kernel from Rust `build.rs`:
```rust
// Create the build context
let build = Build::new(halide_path, output_path);
// Add your source files
build.src.push("mykernel.cpp");
// Build
if build.build()? {
// Run
assert!(build.run()?);
// Link the resulting library
link_library("./libmykernel.a")
}
```