Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/forge bin as lib #13

Merged
merged 1 commit into from
Apr 29, 2024
Merged
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
84 changes: 84 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ members = [
"crates/evm/traces/",
"crates/fmt/",
"crates/forge/",
"crates/forge/bin",
"crates/macros/",
"crates/test-utils/",
]
Expand Down
6 changes: 3 additions & 3 deletions crates/forge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[[bin]]
name = "forge"
path = "bin/main.rs"
#[[bin]]
#name = "forge"
#path = "bin/main.rs"

[build-dependencies]
vergen = { workspace = true, default-features = false, features = [
Expand Down
136 changes: 136 additions & 0 deletions crates/forge/bin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
[package]
name = "forge-cmd"
description = "Forge command line interface"

version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
#name = "forge_cmd"
path = "cmd/lib.rs"
#name = "forge"

[build-dependencies]
vergen = { workspace = true, default-features = false, features = [
"build",
"git",
"gitcl",
] }

[dependencies]
# lib
foundry-block-explorers = { workspace = true, features = ["foundry-compilers"] }
foundry-common.workspace = true
foundry-compilers = { workspace = true, features = ["full"] }
foundry-config.workspace = true
foundry-evm.workspace = true
foundry-wallets.workspace = true
foundry-linking.workspace = true
forge.workspace = true

ethers-contract = { workspace = true, features = ["abigen"] }

revm-inspectors.workspace = true

comfy-table = "7"
eyre.workspace = true
proptest = "1"
rayon = "1"
serde.workspace = true
tracing.workspace = true
yansi.workspace = true
humantime-serde = "1.1.1"

# bin
forge-doc.workspace = true
forge-fmt.workspace = true
forge-verify.workspace = true
forge-script.workspace = true
foundry-cli.workspace = true
foundry-debugger.workspace = true

alloy-dyn-abi.workspace = true
alloy-json-abi.workspace = true
alloy-primitives = { workspace = true, features = ["serde"] }
alloy-rpc-types.workspace = true
alloy-provider = { workspace = true, features = ["reqwest", "ws", "ipc"] }
alloy-network.workspace = true
alloy-transport.workspace = true
alloy-signer.workspace = true
alloy-consensus.workspace = true
alloy-chains.workspace = true

async-trait = "0.1"
clap = { version = "4", features = ["derive", "env", "unicode", "wrap_help"] }
clap_complete = "4"
clap_complete_fig = "4"
dialoguer = { version = "0.11", default-features = false }
dunce = "1"
futures = "0.3"
hex.workspace = true
indicatif = "0.17"
itertools.workspace = true
once_cell = "1"
parking_lot = "0.12"
regex = { version = "1", default-features = false }
reqwest = { workspace = true, features = ["json"] }
semver = "1"
serde_json.workspace = true
similar = { version = "2", features = ["inline"] }
solang-parser.workspace = true
strum = { workspace = true, features = ["derive"] }
thiserror = "1"
tokio = { version = "1", features = ["time"] }
toml = { version = "0.8", features = ["preserve_order"] }
toml_edit = "0.22.4"
watchexec = "2.3.2"
evm-disassembler.workspace = true
rustc-hash.workspace = true

# doc server
axum = { workspace = true, features = ["ws"] }
hyper.workspace = true
tower-http = { workspace = true, features = ["fs"] }
opener = "0.6"

[target.'cfg(unix)'.dependencies]
tikv-jemallocator = { workspace = true, optional = true }

[dev-dependencies]
anvil.workspace = true
foundry-test-utils.workspace = true

mockall = "0.12"
criterion = "0.5"
globset = "0.4"
paste = "1.0"
path-slash = "0.2"
pretty_assertions.workspace = true
svm = { package = "svm-rs", version = "0.5", default-features = false, features = [
"rustls",
] }
tempfile.workspace = true
tracing-subscriber = { workspace = true, features = ["env-filter", "fmt"] }

alloy-signer-wallet.workspace = true

[features]
default = ["rustls"]
rustls = [
"foundry-cli/rustls",
"foundry-wallets/rustls",
"reqwest/rustls-tls",
"reqwest/rustls-tls-native-roots",
]
openssl = ["foundry-cli/openssl", "reqwest/default-tls"]
asm-keccak = ["alloy-primitives/asm-keccak"]
jemalloc = ["dep:tikv-jemallocator"]

#[[bench]]
#name = "test"
#harness = false
9 changes: 9 additions & 0 deletions crates/forge/bin/cmd/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#[path = "mod.rs"]
mod cmd;
use cmd::{install, watch};

mod test;
pub use test::FilterArgs;

#[macro_use]
extern crate tracing;
2 changes: 1 addition & 1 deletion crates/forge/bin/cmd/test/summary.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::cmd::test::TestOutcome;
use forge::result::TestOutcome;
use comfy_table::{
modifiers::UTF8_ROUND_CORNERS, Attribute, Cell, CellAlignment, Color, Row, Table,
};
Expand Down
Loading