solace-sys 0.1.0

Solace binding generated by bindgen
Documentation
  • Coverage
  • 0%
    0 out of 1123 items documented0 out of 23 items with examples
  • Size
  • Source code size: 135.75 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 35.94 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • radekm/rust-solace-sys
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • radekm

Binding to Solace C library solclient-7.21.0.5 generated by bindgen.

Unfortunately I'm not allowed to distribute Solace C libs. You must instead download them from https://solace.com/downloads/. When downloading from that URL select filter Solace APIs and download API for C.

I tested only API for Intel Mac.

Extract downloaded archive and copy Solace libraries to directory lib. To link them with your program add build script build.rs with the following content:

use std::env;
use std::path::Path;

fn main() {
    let target = env::var("TARGET").unwrap();
    let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
    let lib_dir = Path::new(&manifest_dir).join("lib").to_str().unwrap().to_string();

    if target == "x86_64-apple-darwin" {
        println!("cargo:rustc-link-lib=framework={}", "kerberos");

        println!("cargo:rustc-link-search=native={}", lib_dir);
        println!("cargo:rustc-link-lib=dylib={}", "crypto");
        println!("cargo:rustc-link-lib=dylib={}", "ssl");
        println!("cargo:rustc-link-lib=dylib={}", "solclient");
        println!("cargo:rustc-link-lib=dylib={}", "solclientssl");
    } else {
        panic!("Unknown target {}", target)
    }
}

If you're not using Intel Mac you will need to modify the script, and it may not work at all :-/