Skip to content

Commit

Permalink
minimize package size (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
fishi0x01 committed Mar 11, 2020
1 parent 49e3b7a commit 2cb8272
Show file tree
Hide file tree
Showing 16,287 changed files with 19 additions and 12 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
target
Cargo.lock
.idea/

# build.rs output files
db-4.8.30/build_unix/**
db-5.3.21/build_unix/**
11 changes: 11 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ statically linked ffi bindings for Berkeley DB
keywords = ["ffi", "static-linking", "berkeley-db"]
categories = ["external-ffi-bindings"]

exclude = [
"vendor/db-4.8.30/examples_*",
"vendor/db-4.8.30/docs/*",
"vendor/db-5.3.21/examples/*",
"vendor/db-5.3.21/docs/*",
"vendor/db-5.3.21/lang/*",
"vendor/db-5.3.21/test/java/*",
"vendor/db-5.3.21/test/csharp/*",
"vendor/db-5.3.21/test/sql/*",
]

[features]
default = []
v5_3 = []
Expand Down
8 changes: 4 additions & 4 deletions build_4_8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ extern crate bindgen;
use std::path::{PathBuf, Path};
use std::process::Command;

pub const SOURCE_DIR: &'static str = "db-4.8.30";
pub const SOURCE: &'static str = "db-4.8.30";

pub fn build_unix(out_dir: &str) {
let copy_dir = Path::new(out_dir).join(SOURCE_DIR);
let copy_dir = Path::new(out_dir).join(SOURCE);
let build_dir = copy_dir.join("build_unix");

// copy source to out_dir
Command::new("cp")
.arg("-r")
.arg(Path::new(SOURCE_DIR).to_str().unwrap())
.arg(Path::new("vendor").join(SOURCE).to_str().unwrap())
.arg(copy_dir.to_str().unwrap())
.status()
.unwrap();
Expand All @@ -39,7 +39,7 @@ pub fn build_unix(out_dir: &str) {
}

pub fn generate_bindings(out_dir: &str) {
let build_dir = Path::new(out_dir).join(SOURCE_DIR).join("build_unix");
let build_dir = Path::new(out_dir).join(SOURCE).join("build_unix");
let bindings = bindgen::Builder::default()
.header(build_dir.join("db.h").to_str().unwrap())
.derive_copy(true)
Expand Down
8 changes: 4 additions & 4 deletions build_5_3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ extern crate bindgen;
use std::path::{PathBuf, Path};
use std::process::Command;

pub const SOURCE_DIR: &'static str = "db-5.3.21";
pub const SOURCE: &'static str = "db-5.3.21";

pub fn build_unix(out_dir: &str) {
let copy_dir = Path::new(out_dir).join(SOURCE_DIR);
let copy_dir = Path::new(out_dir).join(SOURCE);
let build_dir = copy_dir.join("build_unix");

// copy source to out_dir
Command::new("cp")
.arg("-r")
.arg(Path::new(SOURCE_DIR).to_str().unwrap())
.arg(Path::new("vendor").join(SOURCE).to_str().unwrap())
.arg(copy_dir.to_str().unwrap())
.status()
.unwrap();
Expand All @@ -39,7 +39,7 @@ pub fn build_unix(out_dir: &str) {
}

pub fn generate_bindings(out_dir: &str) {
let build_dir = Path::new(out_dir).join(SOURCE_DIR).join("build_unix");
let build_dir = Path::new(out_dir).join(SOURCE).join("build_unix");
let bindings = bindgen::Builder::default()
.header(build_dir.join("db.h").to_str().unwrap())
.derive_copy(true)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 2cb8272

Please sign in to comment.