Skip to content

Commit

Permalink
feat: add more features to reduce dependencies (#239)
Browse files Browse the repository at this point in the history
When importing sub crates directly (like artifacts) we don't need regex,
walkdir, and other deps.

No functional changes intended.
  • Loading branch information
DaniPopes authored Jan 7, 2025
1 parent d91b258 commit 55f0e01
Show file tree
Hide file tree
Showing 10 changed files with 840 additions and 755 deletions.
3 changes: 3 additions & 0 deletions crates/artifacts/artifacts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ foundry-compilers-artifacts-vyper.workspace = true

[features]
async = ["foundry-compilers-artifacts-solc/async"]
checksum = ["foundry-compilers-artifacts-solc/checksum"]
walkdir = ["foundry-compilers-artifacts-solc/walkdir"]
rayon = ["foundry-compilers-artifacts-solc/rayon"]
25 changes: 18 additions & 7 deletions crates/artifacts/solc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,26 @@ foundry-compilers-core.workspace = true

alloy-json-abi.workspace = true
alloy-primitives.workspace = true
futures-util = { workspace = true, optional = true }
md-5.workspace = true
rayon.workspace = true
semver.workspace = true
serde_json.workspace = true
serde_repr = "0.1"
serde.workspace = true
thiserror.workspace = true
tokio = { workspace = true, optional = true }
tracing.workspace = true
walkdir.workspace = true
yansi.workspace = true
serde_repr = "0.1"

# async
tokio = { workspace = true, optional = true, features = ["fs"] }
futures-util = { workspace = true, optional = true }

# checksum
md-5 = { workspace = true, optional = true }

# walkdir
walkdir = { workspace = true, optional = true }

# rayon
rayon = { workspace = true, optional = true }

[target.'cfg(windows)'.dependencies]
path-slash.workspace = true
Expand All @@ -41,4 +49,7 @@ similar-asserts.workspace = true
foundry-compilers-core = { workspace = true, features = ["test-utils"] }

[features]
async = ["dep:tokio", "futures-util", "tokio/fs"]
async = ["dep:tokio", "dep:futures-util"]
checksum = ["dep:md-5"]
walkdir = ["dep:walkdir", "foundry-compilers-core/walkdir"]
rayon = ["dep:rayon"]
Loading

0 comments on commit 55f0e01

Please sign in to comment.