Skip to content

Commit

Permalink
Merge pull request #11 from dimbleby/recent-bindgen
Browse files Browse the repository at this point in the history
regenerate with recent bindgen
  • Loading branch information
kw217 authored Sep 11, 2017
2 parents 6a28940 + 3b6c9f9 commit 7fc52e2
Show file tree
Hide file tree
Showing 4 changed files with 8,205 additions and 1,955 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ By default, `/usr/lib`, `/usr/local/lib64`, and `/usr/local/lib` are added to th

A semicolon separated list of additional directories to add to the linker search path may be specified through the `CASSANDRA_SYS_LIB_PATH` environment variable.

## Autogeneration

The file `cassandra.rs` is autogenerated as follows:


```
$ bindgen --no-layout-tests --blacklist-type=max_align_t --output=src/cassandra.rs cassandra.h
```

The autogenerated code is formatted with `rustfmt`.


## History

Expand Down
18 changes: 1 addition & 17 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
//#![feature(plugin)]
//#![plugin(bindgen_plugin)]



//#[allow(dead_code, uppercase_variables, non_camel_case_types)]
//#[plugin(bindgen_plugin)]
//mod mysql_bindings {
// bindgen!("/usr/include/mysql/mysql.h", match="mysql.h", link="mysql");
//}

//use std::env;
//use std::fs;
//use std::path::Path;
//use std::process::Command;

fn main() {
if let Some(datastax_dir) = option_env!("CASSANDRA_SYS_LIB_PATH") {
for p in datastax_dir.split(";") {
println!("cargo:rustc-link-search={}", p);
}
}

println!("cargo:rustc-flags=-l dylib=cassandra");
println!("cargo:rustc-flags=-l dylib=crypto");
println!("cargo:rustc-flags=-l dylib=ssl");
println!("cargo:rustc-flags=-l dylib=stdc++");
Expand All @@ -31,5 +16,4 @@ fn main() {
println!("cargo:rustc-link-search={}", "/usr/local/lib");
println!("cargo:rustc-link-search={}", "/usr/lib64/");
println!("cargo:rustc-link-search={}", "/usr/lib/");
// println!("cargo:rustc-link-lib=static=cassandra_static");
}
Loading

0 comments on commit 7fc52e2

Please sign in to comment.