Factored out test program and fuzzing features; core crate now only depends on smallvec and log.
This commit is contained in:
20
Cargo.toml
20
Cargo.toml
@@ -4,24 +4,20 @@ version = "0.0.1"
|
||||
authors = ["Chris Fallin <chris@cfallin.org>", "Mozilla SpiderMonkey Developers"]
|
||||
edition = "2018"
|
||||
license = "Apache-2.0 WITH LLVM-exception AND MPL-2.0"
|
||||
description = "Backtracking register allocator ported from IonMonkey"
|
||||
repository = "https://github.com/cfallin/regalloc2"
|
||||
description = "Backtracking register allocator inspired from IonMonkey"
|
||||
repository = "https://github.com/bytecodealliance/regalloc2"
|
||||
|
||||
[dependencies]
|
||||
log = { version = "0.4.8", default-features = false }
|
||||
smallvec = "1.6.1"
|
||||
# keep this in sync with libfuzzer_sys's crate version:
|
||||
arbitrary = "^0.4.6"
|
||||
rand = "0.8"
|
||||
rand_chacha = "0.3"
|
||||
env_logger = "*"
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = "0.3"
|
||||
# The below are only needed for fuzzing.
|
||||
# Keep this in sync with libfuzzer_sys's crate version:
|
||||
arbitrary = { version = "^0.4.6", optional = true }
|
||||
|
||||
[profile.release]
|
||||
debug = true
|
||||
|
||||
[[bench]]
|
||||
name = "regalloc"
|
||||
harness = false
|
||||
[features]
|
||||
default = []
|
||||
fuzzing = ["arbitrary"]
|
||||
|
||||
@@ -10,14 +10,12 @@ edition = "2018"
|
||||
cargo-fuzz = true
|
||||
|
||||
[dependencies]
|
||||
regalloc2 = { path = "../", features = ["fuzzing"] }
|
||||
libfuzzer-sys = "0.3"
|
||||
arbitrary = { version = "^0.4.6", features = ["derive"] }
|
||||
log = { version = "0.4.8", default-features = false }
|
||||
env_logger = "0.8.3"
|
||||
|
||||
[dependencies.regalloc2]
|
||||
path = ".."
|
||||
|
||||
# Prevent this from interfering with workspaces
|
||||
[workspace]
|
||||
members = ["."]
|
||||
|
||||
@@ -25,6 +25,8 @@ pub mod index;
|
||||
pub use index::{Block, Inst, InstRange, InstRangeIter};
|
||||
|
||||
pub mod checker;
|
||||
|
||||
#[cfg(feature = "fuzzing")]
|
||||
pub mod fuzzing;
|
||||
|
||||
/// Register classes.
|
||||
|
||||
28
test/Cargo.toml
Normal file
28
test/Cargo.toml
Normal file
@@ -0,0 +1,28 @@
|
||||
[package]
|
||||
name = "regalloc2-test"
|
||||
version = "0.0.1"
|
||||
authors = ["Chris Fallin <chris@cfallin.org>", "Mozilla SpiderMonkey Developers"]
|
||||
edition = "2018"
|
||||
license = "Apache-2.0 WITH LLVM-exception AND MPL-2.0"
|
||||
description = "small test driver for benchmarking regalloc2"
|
||||
repository = "https://github.com/bytecodealliance/regalloc2"
|
||||
|
||||
[dependencies]
|
||||
regalloc2 = { version = "*", path = "../", features = ["fuzzing"] }
|
||||
|
||||
# Keep this in sync with libfuzzer_sys's crate version:
|
||||
arbitrary = { version = "^0.4.6" }
|
||||
rand = { version = "0.8" }
|
||||
rand_chacha = { version = "0.3" }
|
||||
env_logger = { version = "*" }
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = "0.3"
|
||||
|
||||
[profile.release]
|
||||
debug = true
|
||||
|
||||
[[bench]]
|
||||
name = "regalloc"
|
||||
harness = false
|
||||
|
||||
Reference in New Issue
Block a user