Skip to content

Commit

Permalink
refactor: Use workspaces (properly)
Browse files Browse the repository at this point in the history
Fixes issues with the IDE as well, where I didn't have intellisense (but
did have clippy checks) for directories like `./tests`, and had to use
the `linkedProjects` setting, which is unnecessary.
  • Loading branch information
alexpovel committed Jun 14, 2023
1 parent 27734b2 commit 211535a
Show file tree
Hide file tree
Showing 9 changed files with 206 additions and 482 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
tarpaulin-report.html
fuzz-inputs.txt
5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

173 changes: 173 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "b4s"
version = "0.3.0"
edition = "2021"
edition.workspace = true
rust-version = "1.64.0"
authors = ["Alex Povel <rust@alexpovel.de>"]
description = "Binary Search Single Sorted String: Perform binary search on a single, delimited string slice of sorted but unevenly sized substrings."
Expand All @@ -12,6 +12,9 @@ documentation = "https://docs.rs/b4s"
keywords = ["search", "string", "str", "uneven"]
categories = ["algorithms"]

[workspace.package]
edition = "2021"

[dependencies]
ascii = "1.1.0"
itertools = "0.10.5"
Expand All @@ -20,3 +23,7 @@ itertools = "0.10.5"
criterion = { version = "0.5.1", features = ["html_reports"] }
phf = { version = "0.11.1", features = ["macros"] }
rstest = "0.17.0"

[workspace]

members = ["fuzz"]
6 changes: 3 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ onboard:
# Runs fuzz testing.
[unix]
fuzz: install-afl
cd {{ justfile_directory() / 'fuzz' }} && cargo afl build
cd {{ justfile_directory() }} && cargo afl build --package afl-target

# Kill any running fuzzers, they like to get stuck.
kill -9 $(lsof -t {{ justfile_directory() / 'fuzz' / 'out' }}/*) || true
cd {{ justfile_directory() }} && kill -9 $(lsof -t 'fuzz/out'/*) || true

cd {{ justfile_directory() / 'fuzz' }} && cargo afl fuzz -i in -o out target/debug/afl-target
cd {{ justfile_directory() }} && cargo afl fuzz -i fuzz/in -o fuzz/out target/debug/afl-target

# Provisions AFL (https://rust-fuzz.github.io/book/afl/setup.html#tools).
[unix]
Expand Down
1 change: 0 additions & 1 deletion fuzz/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
target
out
fuzz-inputs.txt
Loading

0 comments on commit 211535a

Please sign in to comment.