open-cl-sys 0.1.0

OpenCL C-FFI bindings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
extern crate bindgen;

use std::path::PathBuf;

fn main() {
    let bindings_file: PathBuf = PathBuf::from("./opencl_bindings.rs");
    bindgen::Builder::default()
        .header("../opencl_headers/wrapper.h")
        .generate()
        .expect("Unable to generate bindings")
        .write_to_file(bindings_file)
        .expect("Couldn't write bindings!");
}