Skip to content

Commit 7fc52e2

Browse files
authored
Merge pull request #11 from dimbleby/recent-bindgen
regenerate with recent bindgen
2 parents 6a28940 + 3b6c9f9 commit 7fc52e2

File tree

4 files changed

+8205
-1955
lines changed

4 files changed

+8205
-1955
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,17 @@ By default, `/usr/lib`, `/usr/local/lib64`, and `/usr/local/lib` are added to th
5252

5353
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.
5454

55+
## Autogeneration
56+
57+
The file `cassandra.rs` is autogenerated as follows:
58+
59+
60+
```
61+
$ bindgen --no-layout-tests --blacklist-type=max_align_t --output=src/cassandra.rs cassandra.h
62+
```
63+
64+
The autogenerated code is formatted with `rustfmt`.
65+
5566

5667
## History
5768

build.rs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,11 @@
1-
//#![feature(plugin)]
2-
//#![plugin(bindgen_plugin)]
3-
4-
5-
6-
//#[allow(dead_code, uppercase_variables, non_camel_case_types)]
7-
//#[plugin(bindgen_plugin)]
8-
//mod mysql_bindings {
9-
// bindgen!("/usr/include/mysql/mysql.h", match="mysql.h", link="mysql");
10-
//}
11-
12-
//use std::env;
13-
//use std::fs;
14-
//use std::path::Path;
15-
//use std::process::Command;
16-
171
fn main() {
182
if let Some(datastax_dir) = option_env!("CASSANDRA_SYS_LIB_PATH") {
193
for p in datastax_dir.split(";") {
204
println!("cargo:rustc-link-search={}", p);
215
}
226
}
237

8+
println!("cargo:rustc-flags=-l dylib=cassandra");
249
println!("cargo:rustc-flags=-l dylib=crypto");
2510
println!("cargo:rustc-flags=-l dylib=ssl");
2611
println!("cargo:rustc-flags=-l dylib=stdc++");
@@ -31,5 +16,4 @@ fn main() {
3116
println!("cargo:rustc-link-search={}", "/usr/local/lib");
3217
println!("cargo:rustc-link-search={}", "/usr/lib64/");
3318
println!("cargo:rustc-link-search={}", "/usr/lib/");
34-
// println!("cargo:rustc-link-lib=static=cassandra_static");
3519
}

0 commit comments

Comments
 (0)