Skip to content
Closed
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
23 changes: 19 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ jobs:
- uses: actions/checkout@v5
- name: Build
run: cargo build --verbose
- name: Build with serde
run: cargo build --features serde --verbose
- name: Build with miniserde
run: cargo build --features nanoserde --verbose
- name: Build with miniserde
run: cargo build --features miniserde --verbose
- name: Build with borsh
run: cargo build --features borsh --verbose
- name: Run tests
run: cargo test --verbose
- name: Run miniserde tests
Expand Down Expand Up @@ -54,19 +62,26 @@ jobs:
strategy:
fail-fast: false
matrix:
rust: [1.82.0, 1.83.0]
rust: [1.85.0, 1.86.0]
timeout-minutes: 45
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- run: cargo build
- run: cargo build --features serde
- run: cargo build --features serde --no-default-features
- run: cargo build --features nanoserde
- run: cargo build --features miniserde
- run: cargo build --features borsh
- run: cargo build --features borsh,serde,nanoserde
- run: cargo build --features borsh,serde,nanoserde,miniserde
- run: cargo build --features borsh,serde,nanoserde,miniserde --no-default-features
- run: cargo test
- run: cargo test --features serde
- run: cargo test --features nanoserde
- run: cargo test --features miniserde
- run: cargo test --features borsh
- run: cargo test --features borsh,serde,nanoserde,miniserde
- run: cargo test --features borsh,serde,nanoserde,miniserde --no-default-features

clippy:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"rust-analyzer.cargo.features": ["serde", "nanoserde"]
"rust-analyzer.cargo.features": ["serde", "nanoserde", "smallvec", "portable-atomic"]
}
50 changes: 20 additions & 30 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,34 +1,24 @@
[package]
name = "bit-vec"
version = "0.9.1"
authors = ["Alexis Beingessner <a.beingessner@gmail.com>"]
license = "Apache-2.0 OR MIT"
description = "A vector of bits"
repository = "https://github.com/contain-rs/bit-vec"
homepage = "https://github.com/contain-rs/bit-vec"
documentation = "https://docs.rs/bit-vec/"
keywords = ["data-structures", "bitvec", "bitmask", "bitmap", "bit"]
readme = "README.md"
edition = "2021"
rust-version = "1.82"
[workspace]

[dependencies]
borsh = { version = "1.6.0", default-features = false, features = ["derive"], optional = true }
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"], optional = true }
miniserde = { version = "0.1", optional = true }
nanoserde = { version = "0.2", optional = true }
members = [
"vec",
"set",
"matrix",
]

[dev-dependencies]
serde_json = "1.0"
rand = "0.9"
rand_xorshift = "0.4"
exclude = [
"fuzz",
]

[features]
default = ["std"]
serde_std = ["std", "serde/std"]
serde_no_std = []
borsh_std = ["borsh/std"]
std = ["serde?/std"]
resolver = "2"

[package.metadata.docs.rs]
features = ["borsh", "serde", "miniserde", "nanoserde"]
# add debug info for profiling?
[profile.release]
debug = false

[workspace.dependencies]

[workspace.package]
# shared version of all public crates in the workspace
version = "0.10.0"
rust-version = "1.82.0"
137 changes: 0 additions & 137 deletions README.md

This file was deleted.

1 change: 1 addition & 0 deletions README.md
2 changes: 2 additions & 0 deletions fuzz/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/out

27 changes: 27 additions & 0 deletions fuzz/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[package]
name = "bit-fuzz"
version = "0.1.0"
authors = ["Dawid Ciężarkiewicz <dpc@dpc.pw>", "Peter Blackson <pioczarn@gmail.com>"]
edition = "2021"
publish = false

[package.metadata]
cargo-fuzz = true

[features]
default = ["afl"]
afl_fuzz = ["afl"]
honggfuzz_fuzz = ["honggfuzz"]
nanoserde = ["bit-vec/nanoserde"]

[dependencies]
honggfuzz = { version = "0.5", optional = true }
afl = { version = "0.17", optional = true }
bit-vec = { path = "../vec/", features = ["smallvec"] }
bit-set = { path = "../set/", features = ["smallvec"] }
bit-matrix = { path = "../matrix/" }
smallvec = "1.15"

[[bin]]
name = "bit_ops"
path = "fuzz_targets/bit_ops.rs"
1 change: 1 addition & 0 deletions fuzz/LICENSE-APACHE
1 change: 1 addition & 0 deletions fuzz/LICENSE-MIT
9 changes: 9 additions & 0 deletions fuzz/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# fuzzer for bit-vec, bit-set and bit-matrix

Based on fuzzing in `smallvec`.

# fuzzing

```sh
cargo afl build --release --bin bit_ops --features afl && cargo afl fuzz -i in -o out target/release/bit_ops
```
Loading
Loading