rubydex-sys 0.2.5

C FFI bindings for the Rubydex Ruby code indexing engine.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
extern crate cbindgen;

fn main() {
    cbindgen::generate(".")
        .expect("Unable to generate bindings")
        .write_to_file("rustbindings.h");

    // Set the install name for macOS dylibs so they can be found via @rpath at runtime.
    // This works for both native and cross-compilation scenarios.
    let target = std::env::var("TARGET").unwrap_or_default();
    if target.contains("apple") {
        println!("cargo::rustc-cdylib-link-arg=-Wl,-install_name,@rpath/librubydex_sys.dylib");
    }
}