Skip to content

Commit 452319f

Browse files
author
bors-servo
authored
Auto merge of #327 - fitzgen:libbindgen-on-crates-io, r=emilio
Use a shared workspace for bindgen, libbindgen, and test_expectations This enables us to publish libbindgen on crates.io
2 parents 233c4bc + ec2e660 commit 452319f

File tree

9 files changed

+41
-29
lines changed

9 files changed

+41
-29
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ script:
3131
- git add -A
3232
- git diff @
3333
- git diff-index --quiet HEAD
34-
- cargo test -p tests_expectations
3534
- cargo build --features "$BINDGEN_FEATURES _docs"
36-
- cd ..
35+
- cd tests/expectations
36+
- cargo test
37+
- cd ../../../bindgen
3738
- cargo test --features "$BINDGEN_FEATURES"
3839
- cargo test --release --features "$BINDGEN_FEATURES"
3940

Cargo.toml

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,6 @@
1-
[package]
2-
authors = [
3-
"Jyun-Yan You <[email protected]>",
4-
"Emilio Cobos Álvarez <[email protected]>",
5-
"The Servo project developers",
1+
[workspace]
2+
members = [
3+
"bindgen",
4+
"libbindgen",
5+
"libbindgen/tests/expectations",
66
]
7-
description = "A binding generator for Rust"
8-
homepage = "https://github.com/servo/rust-bindgen"
9-
keywords = ["bindings", "ffi", "code-generation"]
10-
license = "BSD-3-Clause"
11-
name = "bindgen"
12-
readme = "README.md"
13-
repository = "https://github.com/servo/rust-bindgen"
14-
version = "0.17.0"
15-
16-
[dependencies]
17-
clang-sys = "0.11.1"
18-
clap = "2"
19-
libbindgen = { path = "libbindgen" }
20-
log = "0.3"
21-
env_logger = "0.3"
22-
rustc-serialize = "0.3.19"
23-
24-
[features]
25-
llvm_stable = ["libbindgen/llvm_stable"]

bindgen/Cargo.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[package]
2+
authors = [
3+
"Jyun-Yan You <[email protected]>",
4+
"Emilio Cobos Álvarez <[email protected]>",
5+
"The Servo project developers",
6+
]
7+
description = "A binding generator for Rust"
8+
homepage = "https://github.com/servo/rust-bindgen"
9+
keywords = ["bindings", "ffi", "code-generation"]
10+
license = "BSD-3-Clause"
11+
name = "bindgen"
12+
readme = "README.md"
13+
repository = "https://github.com/servo/rust-bindgen"
14+
version = "0.17.0"
15+
workspace = ".."
16+
17+
[dependencies]
18+
clang-sys = "0.11.1"
19+
clap = "2"
20+
libbindgen = { path = "../libbindgen" }
21+
log = "0.3"
22+
env_logger = "0.3"
23+
rustc-serialize = "0.3.19"
24+
25+
[features]
26+
llvm_stable = ["libbindgen/llvm_stable"]
File renamed without changes.
File renamed without changes.

libbindgen/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ license = "BSD-3-Clause"
1212
name = "libbindgen"
1313
readme = "README.md"
1414
repository = "https://github.com/servo/rust-bindgen"
15-
version = "0.17.0"
15+
version = "0.1.0"
16+
workspace = ".."
1617

1718
[dev-dependencies]
1819
diff = "0.1"
1920
clap = "2"
2021
shlex = "0.1"
21-
tests_expectations = { path = "tests/expectations" }
2222

2323
[build-dependencies]
2424
quasi_codegen = "0.21"

libbindgen/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `libbindgen`
2+
3+
Generate Rust FFI bindings from C/C++ header files.

libbindgen/tests/expectations/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ authors = [
77
"Emilio Cobos Álvarez <[email protected]>",
88
"The Servo project developers",
99
]
10+
workspace = "../../.."
1011

1112
[dependencies]

libbindgen/tests/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::fs;
77
use std::io::{BufRead, BufReader, Error, ErrorKind, Read, Write};
88
use std::path::PathBuf;
99

10-
#[path="../../src/options.rs"]
10+
#[path="../../bindgen/src/options.rs"]
1111
mod options;
1212
use options::builder_from_flags;
1313

0 commit comments

Comments
 (0)