Skip to content

Commit

Permalink
tokio unstable flag
Browse files Browse the repository at this point in the history
  • Loading branch information
0o-de-lally committed Nov 18, 2024
1 parent f0508c8 commit 1d5bd4a
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[env]
# set coin name for diem dependencies
RUST_DIEM_COIN_MODULE="libra_coin"
RUST_DIEM_COIN_NAME="LibraCoin"

[target.'cfg(target_os = "linux")']
# Dramatically increases the link performance for the eventbus
rustflags = ["-C", "link-arg=-fuse-ld=lld"] # sudo apt -y install lld
# Uncomment following lines for faster link times (see brew cmd to install zld)
# [target.'cfg(target_os = "macos")']
# rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/zld"] # brew install michaeleisel/zld/zld

[build]
rustflags = ["--cfg", "tokio_unstable", "-C", "force-frame-pointers=yes", "-C", "force-unwind-tables=yes"]

# TODO(grao): Figure out whether we should enable other cpu features, and whether we should use a different way to configure them rather than list every single one here.
[target.x86_64-unknown-linux-gnu]
rustflags = [
"--cfg",
"tokio_unstable",
"-C",
"link-arg=-fuse-ld=lld",
"-C",
"force-frame-pointers=yes",
"-C",
"force-unwind-tables=yes",
"-C",
"target-feature=+sse4.2",
]

# 64 bit MSVC
[target.x86_64-pc-windows-msvc]
rustflags = [
"--cfg",
"tokio_unstable",
"-C",
"force-frame-pointers=yes",
"-C",
"force-unwind-tables=yes",
"-C",
"link-arg=/STACK:8000000", # Set stack to 8 MB
]

[target.aarch64-apple-darwin]
rustflags = [
"-C",
"link-arg=-L/opt/homebrew/opt/gmp",
]
2 changes: 2 additions & 0 deletions .cargo/rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
reorder_imports = true
imports_granularity = "Crate"

0 comments on commit 1d5bd4a

Please sign in to comment.