Skip to content

Commit eefaa3d

Browse files
Introduce cargo workspaces
1 parent c57c476 commit eefaa3d

70 files changed

Lines changed: 65 additions & 68 deletions

Some content is hidden

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

.github/workflows/test.yml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -46,48 +46,24 @@ jobs:
4646
with:
4747
command: fetch
4848

49-
- name: Fetch benchmarks
50-
uses: actions-rs/cargo@v1
51-
with:
52-
command: fetch
53-
args: --manifest-path benchmarks/Cargo.toml
54-
5549
- name: Build
5650
uses: actions-rs/cargo@v1
5751
with:
5852
command: build
5953
args: --all-targets
6054

61-
- name: Build benchmarks
62-
uses: actions-rs/cargo@v1
63-
with:
64-
command: build
65-
args: --manifest-path benchmarks/Cargo.toml --all-targets
66-
6755
- name: Check
6856
uses: actions-rs/cargo@v1
6957
with:
7058
command: clippy
7159
args: --all-targets -- -D warnings
7260

73-
- name: Check benchmarks
74-
uses: actions-rs/cargo@v1
75-
with:
76-
command: clippy
77-
args: --manifest-path benchmarks/Cargo.toml --all-targets -- -D warnings
78-
7961
- name: Check formatting
8062
uses: actions-rs/cargo@v1
8163
with:
8264
command: fmt
8365
args: -- --check
8466

85-
- name: Check benchmark formatting
86-
uses: actions-rs/cargo@v1
87-
with:
88-
command: fmt
89-
args: --manifest-path benchmarks/Cargo.toml -- --check
90-
9167
- name: Test
9268
uses: actions-rs/cargo@v1
9369
with:
@@ -103,8 +79,7 @@ jobs:
10379
- name: Test benchmarks
10480
uses: actions-rs/cargo@v1
10581
with:
106-
command: test
107-
args: --manifest-path benchmarks/Cargo.toml --benches
82+
command: bench
10883

10984
- name: SIMD test
11085
if: matrix.rust == 'nightly'
@@ -119,5 +94,5 @@ jobs:
11994
uses: actions-rs/cargo@v1
12095
with:
12196
toolchain: nightly
122-
command: test
123-
args: --manifest-path benchmarks/Cargo.toml --features "simd" --benches
97+
command: bench
98+
args: --features "simd"

Cargo.toml

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,22 @@
1-
[package]
2-
name = "roaring"
3-
version = "0.10.6"
4-
rust-version = "1.65.0"
5-
authors = ["Wim Looman <wim@nemo157.com>", "Kerollmops <kero@meilisearch.com>"]
6-
description = "A better compressed bitset - pure Rust implementation"
1+
[workspace]
2+
members = ["roaring", "benchmarks"]
3+
resolver = "2"
74

8-
documentation = "https://docs.rs/roaring"
9-
repository = "https://github.com/RoaringBitmap/roaring-rs"
5+
[workspace.dependencies]
6+
roaring = { path = "roaring" }
107

11-
readme = "README.md"
12-
keywords = ["roaring", "data-structure", "bitmap"]
13-
categories = ["data-structures"]
14-
edition = "2021"
15-
16-
license = "MIT OR Apache-2.0"
17-
18-
[dependencies]
19-
bytemuck = { version = "1.16.1", optional = true }
20-
byteorder = { version = "1.5.0", optional = true }
21-
serde = { version = "1.0.203", optional = true }
22-
23-
[features]
24-
default = ["std"]
25-
serde = ["dep:serde", "std"]
26-
simd = []
27-
std = ["dep:bytemuck", "dep:byteorder"]
28-
29-
[dev-dependencies]
8+
bincode = "1.3.3"
9+
bytemuck = "1.16.1"
10+
byteorder = "1.5.0"
11+
criterion = "0.3"
12+
git2 = { version = "0.19", default-features = false }
13+
indicatif = "0.17"
14+
itertools = "0.13"
15+
once_cell = "1.9"
3016
proptest = "1.5.0"
17+
serde = "1.0.203"
3118
serde_json = "1.0.120"
32-
bincode = "1.3.3"
19+
zip = { version = "0.6", default-features = false }
3320

3421
[profile.test]
3522
opt-level = 2

README.md

Lines changed: 4 additions & 5 deletions

benchmarks/Cargo.toml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@ description = "An external library for benchmarking the roaring crate with real
44
version = "0.1.0"
55
authors = ["Kerollmops <renault.cle@gmail.com>"]
66
edition = "2021"
7+
rust-version = "1.65.0"
78
publish = false
89

910
[dependencies]
10-
roaring = { path = ".." }
11+
roaring = { workspace = true }
1112

1213
[dev-dependencies]
13-
once_cell = "1.9"
14-
git2 = { version = "0.17", default-features = false, features = ["https", "vendored-openssl"] }
15-
zip = { version = "0.5", default-features = false, features = ["deflate"] }
16-
indicatif = "0.16"
17-
criterion = { version = "0.3", features = ["html_reports"] }
18-
itertools = "0.10"
14+
criterion = { workspace = true, features = ["html_reports"] }
15+
git2 = { workspace = true, default-features = false, features = ["https", "vendored-openssl"] }
16+
indicatif = { workspace = true }
17+
itertools = { workspace = true }
18+
once_cell = { workspace = true }
19+
zip = { workspace = true, default-features = false, features = ["deflate"] }
1920

2021
[features]
2122
simd = ["roaring/simd"]

benchmarks/benches/datasets.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ fn init_datasets() -> Result<PathBuf, Box<dyn std::error::Error>> {
8181
"{{prefix}}{{msg:.cyan/blue}} [{{bar}}] {{pos}}/{}",
8282
progress.total_objects()
8383
))
84+
.expect("template string invalid")
8485
.progress_chars("#> "),
8586
)
8687
.with_prefix(" ")
@@ -168,6 +169,7 @@ fn parse_datasets<P: AsRef<Path>>(path: P) -> Result<Vec<Dataset>, Box<dyn std::
168169
.with_style(
169170
ProgressStyle::default_bar()
170171
.template(" {prefix:.green} [{bar}] {msg}")
172+
.expect("template string invalid")
171173
.progress_chars("#> "),
172174
)
173175
.with_prefix("Parsing")

roaring/Cargo.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[package]
2+
name = "roaring"
3+
version = "0.10.6"
4+
rust-version = "1.65.0"
5+
authors = ["Wim Looman <wim@nemo157.com>", "Kerollmops <kero@meilisearch.com>"]
6+
description = "A better compressed bitset - pure Rust implementation"
7+
8+
documentation = "https://docs.rs/roaring"
9+
repository = "https://github.com/RoaringBitmap/roaring-rs"
10+
11+
readme = "../README.md"
12+
keywords = ["roaring", "data-structure", "bitmap"]
13+
categories = ["data-structures"]
14+
edition = "2021"
15+
16+
license = "MIT OR Apache-2.0"
17+
18+
[dependencies]
19+
bytemuck = { workspace = true, optional = true }
20+
byteorder = { workspace = true, optional = true }
21+
serde = { workspace = true, optional = true }
22+
23+
[features]
24+
default = ["std"]
25+
serde = ["dep:serde", "std"]
26+
simd = []
27+
std = ["dep:bytemuck", "dep:byteorder"]
28+
29+
[dev-dependencies]
30+
proptest = { workspace = true }
31+
serde_json = { workspace = true }
32+
bincode = { workspace = true }
33+

0 commit comments

Comments
 (0)