Skip to content

Commit 3bfb335

Browse files
authored
Merge pull request #146 from contain-rs/workspace-b
Create a common workspace for the three crates and maintain it + fuzzing
2 parents 774cc3e + 3362361 commit 3bfb335

46 files changed

Lines changed: 3917 additions & 269 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/rust.yml‎

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,16 @@ jobs:
1616
- uses: actions/checkout@v5
1717
- name: Build
1818
run: cargo build --verbose
19+
- name: Build with serde
20+
run: cargo build --features serde --verbose
21+
- name: Build with miniserde
22+
run: cargo build --features miniserde --verbose
23+
- name: Build with borsh
24+
run: cargo build --features borsh --verbose
1925
- name: Run tests
2026
run: cargo test --verbose
2127
- name: Run miniserde tests
2228
run: cargo test --features miniserde --verbose
23-
- name: Run nanoserde tests
24-
run: cargo test --features nanoserde --verbose
2529
- name: Run borsh tests
2630
run: cargo test --features borsh --verbose
2731

@@ -54,19 +58,25 @@ jobs:
5458
strategy:
5559
fail-fast: false
5660
matrix:
57-
rust: [1.82.0, 1.83.0]
61+
rust: [1.85.0, 1.86.0]
5862
timeout-minutes: 45
5963
steps:
6064
- uses: actions/checkout@v5
6165
- uses: dtolnay/rust-toolchain@master
6266
with:
6367
toolchain: ${{matrix.rust}}
6468
- run: cargo build
69+
- run: cargo build --features serde
70+
- run: cargo build --features serde --no-default-features
71+
- run: cargo build --features miniserde
72+
- run: cargo build --features borsh
73+
- run: cargo build --features borsh,serde
74+
- run: cargo build --features borsh,serde,miniserde
75+
- run: cargo build --features borsh,serde,miniserde --no-default-features
6576
- run: cargo test
6677
- run: cargo test --features serde
67-
- run: cargo test --features nanoserde
68-
- run: cargo test --features miniserde
69-
- run: cargo test --features borsh
78+
- run: cargo test --features borsh,serde,miniserde
79+
- run: cargo test --features borsh,serde,miniserde --no-default-features
7080

7181
clippy:
7282
runs-on: ubuntu-latest
@@ -79,7 +89,6 @@ jobs:
7989
- run: cargo clippy --workspace --tests --examples
8090
- run: cargo clippy --workspace --tests --examples --features serde
8191
- run: cargo clippy --workspace --tests --examples --features miniserde
82-
- run: cargo clippy --workspace --tests --examples --features nanoserde
8392
- run: cargo clippy --workspace --tests --examples --features borsh
8493

8594
docs:

‎.vscode/settings.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"rust-analyzer.cargo.features": ["serde", "nanoserde"]
2+
"rust-analyzer.check.command": "clippy",
3+
"rust-analyzer.cargo.features": ["serde", "borsh", "miniserde"]
34
}

‎Cargo.toml‎

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,24 @@
1-
[package]
2-
name = "bit-vec"
3-
version = "0.9.1"
4-
authors = ["Alexis Beingessner <a.beingessner@gmail.com>"]
5-
license = "Apache-2.0 OR MIT"
6-
description = "A vector of bits"
7-
repository = "https://github.com/contain-rs/bit-vec"
8-
homepage = "https://github.com/contain-rs/bit-vec"
9-
documentation = "https://docs.rs/bit-vec/"
10-
keywords = ["data-structures", "bitvec", "bitmask", "bitmap", "bit"]
11-
readme = "README.md"
12-
edition = "2021"
13-
rust-version = "1.82"
1+
[workspace]
142

15-
[dependencies]
16-
borsh = { version = "1.6.0", default-features = false, features = ["derive"], optional = true }
17-
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"], optional = true }
18-
miniserde = { version = "0.1", optional = true }
19-
nanoserde = { version = "0.2", optional = true }
3+
members = [
4+
"vec",
5+
"set",
6+
"matrix",
7+
]
208

21-
[dev-dependencies]
22-
serde_json = "1.0"
23-
rand = "0.9"
24-
rand_xorshift = "0.4"
9+
exclude = [
10+
"fuzz",
11+
]
2512

26-
[features]
27-
default = ["std"]
28-
serde_std = ["std", "serde/std"]
29-
serde_no_std = []
30-
borsh_std = ["borsh/std"]
31-
std = ["serde?/std"]
13+
resolver = "2"
3214

33-
[package.metadata.docs.rs]
34-
features = ["borsh", "serde", "miniserde", "nanoserde"]
15+
# add debug info for profiling?
16+
[profile.release]
17+
debug = false
18+
19+
[workspace.dependencies]
20+
21+
[workspace.package]
22+
# shared version of all public crates in the workspace
23+
version = "0.10.0"
24+
rust-version = "1.85.0"

‎README.md‎

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

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vec/README.md

‎RELEASES.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Version 0.10.0 (TO BE RELEASED)
33

44
<a id="v0.10.0"></a>
55

6+
- removed nanoserde support
7+
68
Version 0.9.1
79
==========================
810

‎fuzz/.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/out
2+

‎fuzz/Cargo.toml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[package]
2+
name = "bit-fuzz"
3+
version = "0.1.0"
4+
authors = ["Dawid Ciężarkiewicz <dpc@dpc.pw>", "Peter Blackson <pioczarn@gmail.com>"]
5+
edition = "2021"
6+
publish = false
7+
8+
[package.metadata]
9+
cargo-fuzz = true
10+
11+
[features]
12+
default = ["afl"]
13+
afl_fuzz = ["afl"]
14+
honggfuzz_fuzz = ["honggfuzz"]
15+
16+
[dependencies]
17+
honggfuzz = { version = "0.5", optional = true }
18+
afl = { version = "0.17", optional = true }
19+
bit-vec = { path = "../vec/" }
20+
bit-set = { path = "../set/" }
21+
bit-matrix = { path = "../matrix/" }
22+
# smallvec = "1.15"
23+
24+
[[bin]]
25+
name = "bit_ops"
26+
path = "fuzz_targets/bit_ops.rs"

‎fuzz/LICENSE-APACHE‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../LICENSE-APACHE

‎fuzz/LICENSE-MIT‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../LICENSE-MIT

0 commit comments

Comments
 (0)