Files
ruff/fuzz/Cargo.toml
Micha Reiser e9b5ea71b3 Update Salsa (#19020)
## Summary

This PR updates Salsa to pull in Ibraheem's multithreading improvements (https://github.com/salsa-rs/salsa/pull/921).

## Performance

A small regression for single-threaded benchmarks is expected because
papaya is slightly slower than a `Mutex<FxHashMap>` in the uncontested
case (~10%). However, this shouldn't matter as much in practice because:

1. Salsa has a fast-path when only using 1 DB instance which is the
common case in production. This fast-path is not impacted by the changes
but we measure the slow paths in our benchmarks (because we use multiple
db instances)
2. Fixing the 10x slowdown for the congested case (multi threading)
outweights the downsides of a 10% perf regression for single threaded
use cases, especially considering that ty is heavily multi threaded.

## Test Plan

`cargo test`
2025-07-02 09:55:37 -04:00

76 lines
1.9 KiB
TOML

[package]
name = "ruff-fuzz"
version = "0.0.0"
authors = [
"Charlie Marsh <charlie.r.marsh@gmail.com>",
"Addison Crump <research@addisoncrump.info>",
]
publish = false
edition = "2021"
[features]
default = ["libfuzzer"]
full-idempotency = []
libfuzzer = ["libfuzzer-sys/link_libfuzzer"]
[package.metadata]
cargo-fuzz = true
[dependencies]
ruff_db = { path = "../crates/ruff_db" }
ruff_linter = { path = "../crates/ruff_linter" }
ruff_python_ast = { path = "../crates/ruff_python_ast" }
ruff_python_codegen = { path = "../crates/ruff_python_codegen" }
ruff_python_parser = { path = "../crates/ruff_python_parser" }
ruff_source_file = { path = "../crates/ruff_source_file" }
ruff_python_formatter = { path = "../crates/ruff_python_formatter" }
ruff_text_size = { path = "../crates/ruff_text_size" }
ty_python_semantic = { path = "../crates/ty_python_semantic" }
ty_vendored = { path = "../crates/ty_vendored" }
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer", default-features = false }
salsa = { git = "https://github.com/salsa-rs/salsa", rev = "fc00eba89e5dcaa5edba51c41aa5f309b5cb126b" }
similar = { version = "2.5.0" }
tracing = { version = "0.1.40" }
# Prevent this from interfering with workspaces
[workspace]
members = ["."]
[[bin]]
name = "ty_check_invalid_syntax"
path = "fuzz_targets/ty_check_invalid_syntax.rs"
[[bin]]
name = "ruff_parse_simple"
path = "fuzz_targets/ruff_parse_simple.rs"
[[bin]]
name = "ruff_fix_validity"
path = "fuzz_targets/ruff_fix_validity.rs"
[[bin]]
name = "ruff_formatter_validity"
path = "fuzz_targets/ruff_formatter_validity.rs"
[[bin]]
name = "ruff_parse_idempotency"
path = "fuzz_targets/ruff_parse_idempotency.rs"
[[bin]]
name = "ruff_formatter_idempotency"
path = "fuzz_targets/ruff_formatter_idempotency.rs"
[profile.release]
opt-level = 3
debug = true
[profile.dev]
opt-level = 3
debug = true
[profile.test]
opt-level = 3
debug = true