Skip to content

Use a shared workspace for bindgen, libbindgen, and test_expectations #327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ script:
- git add -A
- git diff @
- git diff-index --quiet HEAD
- cargo test -p tests_expectations
- cargo build --features "$BINDGEN_FEATURES _docs"
- cd ..
- cd tests/expectations
- cargo test
- cd ../../../bindgen
- cargo test --features "$BINDGEN_FEATURES"
- cargo test --release --features "$BINDGEN_FEATURES"

Expand Down
29 changes: 5 additions & 24 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
[package]
authors = [
"Jyun-Yan You <[email protected]>",
"Emilio Cobos Álvarez <[email protected]>",
"The Servo project developers",
[workspace]
members = [
"bindgen",
"libbindgen",
"libbindgen/tests/expectations",
]
description = "A binding generator for Rust"
homepage = "https://github.com/servo/rust-bindgen"
keywords = ["bindings", "ffi", "code-generation"]
license = "BSD-3-Clause"
name = "bindgen"
readme = "README.md"
repository = "https://github.com/servo/rust-bindgen"
version = "0.17.0"

[dependencies]
clang-sys = "0.11.1"
clap = "2"
libbindgen = { path = "libbindgen" }
log = "0.3"
env_logger = "0.3"
rustc-serialize = "0.3.19"

[features]
llvm_stable = ["libbindgen/llvm_stable"]
26 changes: 26 additions & 0 deletions bindgen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
authors = [
"Jyun-Yan You <[email protected]>",
"Emilio Cobos Álvarez <[email protected]>",
"The Servo project developers",
]
description = "A binding generator for Rust"
homepage = "https://github.com/servo/rust-bindgen"
keywords = ["bindings", "ffi", "code-generation"]
license = "BSD-3-Clause"
name = "bindgen"
readme = "README.md"
repository = "https://github.com/servo/rust-bindgen"
version = "0.17.0"
workspace = ".."

[dependencies]
clang-sys = "0.11.1"
clap = "2"
libbindgen = { path = "../libbindgen" }
log = "0.3"
env_logger = "0.3"
rustc-serialize = "0.3.19"

[features]
llvm_stable = ["libbindgen/llvm_stable"]
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions libbindgen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ license = "BSD-3-Clause"
name = "libbindgen"
readme = "README.md"
repository = "https://github.com/servo/rust-bindgen"
version = "0.17.0"
version = "0.1.0"
workspace = ".."

[dev-dependencies]
diff = "0.1"
clap = "2"
shlex = "0.1"
tests_expectations = { path = "tests/expectations" }

[build-dependencies]
quasi_codegen = "0.21"
Expand Down
3 changes: 3 additions & 0 deletions libbindgen/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `libbindgen`

Generate Rust FFI bindings from C/C++ header files.
1 change: 1 addition & 0 deletions libbindgen/tests/expectations/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ authors = [
"Emilio Cobos Álvarez <[email protected]>",
"The Servo project developers",
]
workspace = "../../.."

[dependencies]
2 changes: 1 addition & 1 deletion libbindgen/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::fs;
use std::io::{BufRead, BufReader, Error, ErrorKind, Read, Write};
use std::path::PathBuf;

#[path="../../src/options.rs"]
#[path="../../bindgen/src/options.rs"]
mod options;
use options::builder_from_flags;

Expand Down