Skip to content
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
24 changes: 24 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 @@ -140,6 +140,7 @@ chrono = { version = "0.4", default-features = false, features = ["clock", "std"
hex = { package = "const-hex", version = "1.6", features = ["hex"] }
itertools = "0.11"
solang-parser = "=0.3.2"
tikv-jemallocator = "0.5.4"

#[patch."https://github.com/gakonst/ethers-rs"]
#ethers = { path = "../ethers-rs/ethers" }
Expand Down
6 changes: 5 additions & 1 deletion crates/anvil/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ fdlimit = { version = "0.2", optional = true }
clap_complete_fig = "4"
ethereum-forkid = "0.12"

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = { workspace = true, optional = true }

[dev-dependencies]
ethers = { workspace = true, features = ["abigen"] }
ethers-solc = { workspace = true, features = ["project-util", "full"] }
Expand All @@ -78,6 +81,7 @@ tokio = { version = "1", features = ["full"] }
crc = "3.0.1"

[features]
default = ["cli"]
default = ["cli", "jemalloc"]
jemalloc = ["dep:tikv-jemallocator"]
cmd = ["clap", "clap_complete", "ctrlc", "anvil-server/clap"]
cli = ["tokio/full", "cmd", "fdlimit"]
4 changes: 4 additions & 0 deletions crates/anvil/src/anvil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
use anvil::cmd::NodeArgs;
use clap::{CommandFactory, Parser, Subcommand};

#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

/// A fast local Ethereum development node.
#[derive(Debug, Parser)]
#[clap(name = "anvil", version = anvil::VERSION_MESSAGE, next_display_order = None)]
Expand Down
6 changes: 5 additions & 1 deletion crates/cast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,17 @@ tokio = { version = "1", features = ["macros"] }
tracing = "0.1"
yansi = "0.5"

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = { workspace = true, optional = true }

[dev-dependencies]
foundry-test-utils.workspace = true
async-trait = "0.1"
criterion = "0.5"

[features]
default = ["rustls"]
default = ["rustls", "jemalloc"]
jemalloc = ["dep:tikv-jemallocator"]
rustls = ["foundry-cli/rustls"]
openssl = ["foundry-cli/openssl"]

Expand Down
4 changes: 4 additions & 0 deletions crates/cast/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ pub mod opts;

use opts::{Opts, Subcommands, ToBaseArgs};

#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

#[tokio::main]
async fn main() -> Result<()> {
utils::load_dotenv();
Expand Down
6 changes: 5 additions & 1 deletion crates/chisel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,17 @@ dirs = "5"
time = { version = "0.3", features = ["formatting"] }
regex = "1"

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = { workspace = true, optional = true }

[dev-dependencies]
criterion = { version = "0.5", features = ["async_tokio"] }
serial_test = "2"
once_cell = "1"

[features]
default = ["rustls"]
default = ["rustls", "jemalloc"]
jemalloc = ["dep:tikv-jemallocator"]
rustls = ["ethers/rustls", "reqwest/rustls-tls", "reqwest/rustls-tls-native-roots"]
openssl = ["ethers/openssl", "reqwest/default-tls"]

Expand Down
4 changes: 4 additions & 0 deletions crates/chisel/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ use foundry_config::{
use rustyline::{config::Configurer, error::ReadlineError, Editor};
use yansi::Paint;

#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

// Loads project's figment and merges the build cli arguments into it
foundry_config::merge_impl_figment_convert!(ChiselParser, opts, evm_opts);

Expand Down
6 changes: 5 additions & 1 deletion crates/forge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ thiserror = "1"
tokio = { version = "1", features = ["time"] }
watchexec = "2"

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = { workspace = true, optional = true }

[dev-dependencies]
anvil.workspace = true
foundry-test-utils.workspace = true
Expand All @@ -75,7 +78,8 @@ serial_test = "2"
svm = { package = "svm-rs", version = "0.3", default-features = false, features = ["rustls"] }

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

Expand Down
4 changes: 4 additions & 0 deletions crates/forge/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ mod opts;
use cmd::{cache::CacheSubcommands, generate::GenerateSubcommands, watch};
use opts::{Opts, Subcommands};

#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

fn main() -> Result<()> {
utils::load_dotenv();
handler::install()?;
Expand Down