Skip to content

Commit

Permalink
build: stable rust toolchain (#2876)
Browse files Browse the repository at this point in the history
  • Loading branch information
aatifsyed authored May 24, 2023
1 parent b43e6c0 commit 60366fb
Show file tree
Hide file tree
Showing 14 changed files with 268 additions and 597 deletions.
36 changes: 4 additions & 32 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,38 +1,10 @@
[alias]
b = "build"
c = "check"
d = "doc"
t = "test"
r = "run"

[build]
incremental = true
# might be helpful but we don't enforce sccache installation atm
# https://github.com/mozilla/sccache
# rustc-wrapper = "sccache"

# For details checkout https://jondot.medium.com/8-steps-for-troubleshooting-your-rust-build-times-2ffc965fd13e
[target.x86_64-unknown-linux-gnu]
# clang has been listed as prerequisite in the doc
linker = "clang"
# enable avx2 by default since it's available on almost all x86_64 CPUs
rustflags = ["-Ctarget-feature=+avx2,+fma", "-Zshare-generics=y", "--cfg", "tokio_unstable"]

[target.x86_64-unknown-linux-musl]
# clang has been listed as prerequisite in the doc
linker = "clang"
# enable avx2 by default since it's available on almost all x86_64 CPUs
rustflags = ["-Ctarget-feature=+avx2,+fma", "-Zshare-generics=y", "--cfg", "tokio_unstable"]

[target.x86_64-apple-darwin]
# zld might help here
# brew install michaeleisel/zld/zld
# "-Clink-arg=-fuse-ld=zld"
# For details checkout https://jondot.medium.com/8-steps-for-troubleshooting-your-rust-build-times-2ffc965fd13e
rustflags = ["-Zshare-generics=y", "--cfg", "tokio_unstable"]

[target.aarch64-apple-darwin]
rustflags = ["-Zshare-generics=y", "--cfg", "tokio_unstable"]
# TODO(aatifsyed): remove - this can be pushed out to readme
# In all cases, pass --cfg=tokio_unstable for tokio console integration
# See (https://github.com/ChainSafe/forest/pull/2245)
rustflags = ["--cfg=tokio_unstable"]

[net]
git-fetch-with-cli = true
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ on:
- main

env:
# https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html#--index-page-provide-a-top-level-landing-page-for-docs
RUSTDOCFLAGS: "-Dwarnings -Zunstable-options --enable-index-page"
CACHE_TIMEOUT_MINUTES: 5
SCCACHE_ENDPOINT: ${{ vars.SCCACHE_ENDPOINT }}
SCCACHE_BUCKET: ${{ vars.SCCACHE_BUCKET }}
Expand Down Expand Up @@ -54,8 +52,8 @@ jobs:
RUSTFLAGS: "-Cstrip=symbols"
- name: Execute MDBook
run: make mdbook-build
- name: Build rustdoc
run: make rustdoc
- name: Build vendored docs
run: make vendored-docs
env:
CC: "sccache clang"
CXX: "sccache clang++"
Expand Down
5 changes: 0 additions & 5 deletions .rustfmt.toml

This file was deleted.

Loading

0 comments on commit 60366fb

Please sign in to comment.