Skip to content

Commit 8270a0c

Browse files
committed
Transition to libbindgen sub-crate
- The root crate is the `bindgen` binary - Rust-ify the test suite, no more subprocesses! - Update Travis config to test both crates
1 parent 6e78bb8 commit 8270a0c

File tree

280 files changed

+216
-472
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

280 files changed

+216
-472
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
bindgen
2-
libbindgen*
3-
41
# Cargo
52
target/
63
Cargo.lock
74
*~
85
#*#
9-

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,19 @@ cache:
2424

2525
before_install: . ./ci/before_install.sh
2626

27+
before_script: cd libbindgen
28+
2729
script:
28-
- cargo build --verbose --features "$BINDGEN_FEATURES"
2930
- cargo test --features "$BINDGEN_FEATURES"
30-
- cargo build --release --verbose --features "$BINDGEN_FEATURES"
3131
- cargo test --release --features "$BINDGEN_FEATURES"
3232
- git add -A
3333
- git diff @
3434
- git diff-index --quiet HEAD
3535
- cargo test -p tests_expectations
3636
- cargo build --features "$BINDGEN_FEATURES _docs"
37+
- cd ..
38+
- cargo test --features "$BINDGEN_FEATURES"
39+
- cargo test --release --features "$BINDGEN_FEATURES"
3740

3841
notifications:
3942
webhooks: http://build.servo.org:54856/travis

CONTRIBUTING.md

Lines changed: 14 additions & 34 deletions

Cargo.toml

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ authors = [
44
"Emilio Cobos Álvarez <[email protected]>",
55
"The Servo project developers",
66
]
7-
build = "build.rs"
87
description = "A binding generator for Rust"
98
homepage = "https://github.com/servo/rust-bindgen"
109
keywords = ["bindings", "ffi", "code-generation"]
@@ -14,50 +13,13 @@ readme = "README.md"
1413
repository = "https://github.com/servo/rust-bindgen"
1514
version = "0.17.0"
1615

17-
[[bin]]
18-
doc = false
19-
name = "bindgen"
20-
21-
[build-dependencies]
22-
quasi_codegen = "0.20"
23-
2416
[dependencies]
25-
cfg-if = "0.1.0"
2617
clang-sys = "0.8.0"
2718
clap = "2"
28-
lazy_static = "0.1.*"
29-
libc = "0.2"
19+
libbindgen = { path = "libbindgen" }
3020
log = "0.3"
3121
env_logger = "0.3"
3222
rustc-serialize = "0.3.19"
33-
syntex_syntax = "0.44"
34-
regex = "0.1"
35-
cexpr = "0.2"
36-
37-
[dependencies.aster]
38-
features = ["with-syntex"]
39-
version = "0.28"
40-
41-
[dependencies.clippy]
42-
optional = true
43-
version = "*"
44-
45-
[dependencies.quasi]
46-
features = ["with-syntex"]
47-
version = "0.20"
4823

4924
[features]
50-
llvm_stable = []
51-
static = []
52-
# This feature only exists for CI -- don't use it!
53-
_docs = []
54-
55-
[lib]
56-
name = "bindgen"
57-
path = "src/lib.rs"
58-
59-
[dev-dependencies.tests_expectations]
60-
path = "tests/expectations"
61-
62-
[[test]]
63-
name = "tests"
25+
llvm_stable = ["libbindgen/llvm_stable"]

Makefile

Lines changed: 0 additions & 34 deletions
This file was deleted.

libbindgen/Cargo.toml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[package]
2+
authors = [
3+
"Jyun-Yan You <[email protected]>",
4+
"Emilio Cobos Álvarez <[email protected]>",
5+
"The Servo project developers",
6+
]
7+
build = "build.rs"
8+
description = "A binding generator for Rust"
9+
homepage = "https://github.com/servo/rust-bindgen"
10+
keywords = ["bindings", "ffi", "code-generation"]
11+
license = "BSD-3-Clause"
12+
name = "libbindgen"
13+
readme = "README.md"
14+
repository = "https://github.com/servo/rust-bindgen"
15+
version = "0.17.0"
16+
17+
[dev-dependencies]
18+
diff = "0.1"
19+
clap = "2"
20+
shlex = "0.1"
21+
tests_expectations = { path = "tests/expectations" }
22+
23+
[build-dependencies]
24+
quasi_codegen = "0.20"
25+
26+
[dependencies]
27+
cfg-if = "0.1.0"
28+
clang-sys = "0.8.0"
29+
lazy_static = "0.1.*"
30+
libc = "0.2"
31+
log = "0.3"
32+
env_logger = "0.3"
33+
rustc-serialize = "0.3.19"
34+
syntex_syntax = "0.44"
35+
regex = "0.1"
36+
cexpr = "0.2"
37+
38+
[dependencies.aster]
39+
features = ["with-syntex"]
40+
version = "0.28"
41+
42+
[dependencies.clippy]
43+
optional = true
44+
version = "*"
45+
46+
[dependencies.quasi]
47+
features = ["with-syntex"]
48+
version = "0.20"
49+
50+
[features]
51+
llvm_stable = []
52+
static = []
53+
# This feature only exists for CI -- don't use it!
54+
_docs = []
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.

src/lib.rs renamed to libbindgen/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
//!
66
//! See the [Builder](./struct.Builder.html) struct for usage.
77
8-
#![crate_name = "bindgen"]
9-
#![crate_type = "dylib"]
10-
118
#![cfg_attr(feature = "clippy", feature(plugin))]
129
#![cfg_attr(feature = "clippy", plugin(clippy))]
1310

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.

0 commit comments

Comments
 (0)