Skip to content

Commit 2f1e5b0

Browse files
committed
deps: setup workspace
There are a few sub-crates in this repository, so sharing a target directory makes sense.
1 parent ffefa20 commit 2f1e5b0

File tree

8 files changed

+17
-16
lines changed

8 files changed

+17
-16
lines changed

Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ categories = ["text-processing"]
1717
travis-ci = { repository = "rust-lang/regex" }
1818
appveyor = { repository = "rust-lang-libs/regex" }
1919

20+
[workspace]
21+
members = ["bench", "regex-capi", "regex-debug", "regex-syntax"]
22+
2023
[dependencies]
2124
# For very fast prefix literal matching.
2225
aho-corasick = "0.6.0"
@@ -94,5 +97,11 @@ name = "backtrack-utf8bytes"
9497
path = "tests/test_backtrack_bytes.rs"
9598
name = "backtrack-bytes"
9699

100+
[profile.release]
101+
debug = true
102+
103+
[profile.bench]
104+
debug = true
105+
97106
[profile.test]
98107
debug = true

bench/Cargo.toml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ documentation = "http://doc.rust-lang.org/regex/regex/index.html"
99
homepage = "https://github.com/rust-lang/regex"
1010
description = "Regex benchmarks for Rust's and other engines."
1111
build = "build.rs"
12+
workspace = ".."
1213

1314
[dependencies]
1415
docopt = "0.6"
@@ -56,12 +57,3 @@ name = "bench"
5657
path = "src/bench.rs"
5758
test = false
5859
bench = true
59-
60-
[profile.release]
61-
debug = true
62-
63-
[profile.bench]
64-
debug = true
65-
66-
[profile.test]
67-
debug = true

ci/script.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ cargo doc --verbose --manifest-path regex-syntax/Cargo.toml
3333

3434
# Run tests on regex-capi crate.
3535
cargo build --verbose --manifest-path regex-capi/Cargo.toml
36-
(cd regex-capi/ctest && ./compile && LD_LIBRARY_PATH=../target/debug ./test)
37-
(cd regex-capi/examples && ./compile && LD_LIBRARY_PATH=../target/debug ./iter)
36+
(cd regex-capi/ctest && ./compile && LD_LIBRARY_PATH=../../target/debug ./test)
37+
(cd regex-capi/examples && ./compile && LD_LIBRARY_PATH=../../target/debug ./iter)
3838

3939
# Make sure benchmarks compile. Don't run them though because they take a
4040
# very long time.

regex-capi/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ homepage = "https://github.com/rust-lang/regex"
1010
description = """
1111
A C API for Rust's regular expression library.
1212
"""
13+
workspace = ".."
1314

1415
[lib]
1516
name = "rure"

regex-capi/ctest/compile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
set -ex
44

55
cargo build --manifest-path ../Cargo.toml
6-
gcc -DDEBUG -o test test.c -ansi -Wall -I../include -L../target/debug -lrure
6+
gcc -DDEBUG -o test test.c -ansi -Wall -I../include -L../../target/debug -lrure
77
# If you're using librure.a, then you'll need to link other stuff:
88
# -lutil -ldl -lpthread -lgcc_s -lc -lm -lrt -lutil -lrure

regex-capi/examples/compile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ set -ex
44

55
# N.B. Add `--release` flag to `cargo build` to make the example run faster.
66
cargo build --manifest-path ../Cargo.toml
7-
gcc -O3 -DDEBUG -o iter iter.c -ansi -Wall -I../include -L../target/debug -lrure
7+
gcc -O3 -DDEBUG -o iter iter.c -ansi -Wall -I../include -L../../target/debug -lrure
88
# If you're using librure.a, then you'll need to link other stuff:
99
# -lutil -ldl -lpthread -lgcc_s -lc -lm -lrt -lutil -lrure

regex-debug/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ repository = "https://github.com/rust-lang/regex"
88
documentation = "http://doc.rust-lang.org/regex"
99
homepage = "https://github.com/rust-lang/regex"
1010
description = "A tool useful for debugging regular expressions."
11+
workspace = ".."
1112

1213
[dependencies]
1314
docopt = "0.6"
1415
regex = { version = "0.2", path = ".." }
1516
regex-syntax = { version = "0.4.0", path = "../regex-syntax" }
1617
rustc-serialize = "0.3"
17-
18-
[profile.release]
19-
debug = true

regex-syntax/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ repository = "https://github.com/rust-lang/regex"
77
documentation = "http://doc.rust-lang.org/regex/regex_syntax/index.html"
88
homepage = "https://github.com/rust-lang/regex"
99
description = "A regular expression parser."
10+
workspace = ".."
1011

1112
[dev-dependencies]
1213
quickcheck = { version = "0.6", default-features = false }

0 commit comments

Comments
 (0)