Skip to content

Commit 5ba0421

Browse files
committed
fix: use stable rust
1 parent fb8c54c commit 5ba0421

File tree

3 files changed

+11
-33
lines changed

3 files changed

+11
-33
lines changed

.cargo/config.toml

+9-30
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,17 @@
1-
[alias]
2-
b = "build"
3-
c = "check"
4-
d = "doc"
5-
t = "test"
6-
r = "run"
7-
81
[build]
92
incremental = true
10-
# might be helpful but we don't enforce sccache installation atm
11-
# https://github.com/mozilla/sccache
12-
# rustc-wrapper = "sccache"
13-
14-
# For details checkout https://jondot.medium.com/8-steps-for-troubleshooting-your-rust-build-times-2ffc965fd13e
15-
[target.x86_64-unknown-linux-gnu]
16-
# clang has been listed as prerequisite in the doc
17-
linker = "clang"
18-
# enable avx2 by default since it's avaiable on almost all x86_64 CPUs
19-
rustflags = ["-Ctarget-feature=+avx2,+fma", "-Zshare-generics=y", "--cfg", "tokio_unstable"]
203

21-
[target.x86_64-unknown-linux-musl]
22-
# clang has been listed as prerequisite in the doc
23-
linker = "clang"
24-
# enable avx2 by default since it's avaiable on almost all x86_64 CPUs
25-
rustflags = ["-Ctarget-feature=+avx2,+fma", "-Zshare-generics=y", "--cfg", "tokio_unstable"]
4+
# In all cases, pass --cfg=tokio_unstable for tokio console integration
5+
# See(https://github.com/ChainSafe/forest/pull/2245)
6+
# on x86_64-linux-*, most CPUs support the specified vector instructions, so use those
267

27-
[target.x86_64-apple-darwin]
28-
# zld might help here
29-
# brew install michaeleisel/zld/zld
30-
# "-Clink-arg=-fuse-ld=zld"
31-
# For details checkout https://jondot.medium.com/8-steps-for-troubleshooting-your-rust-build-times-2ffc965fd13e
32-
rustflags = ["-Zshare-generics=y", "--cfg", "tokio_unstable"]
8+
# Note, rustflags aren't additive, so we can't specify tokio_unstable in `build.rustflags`
9+
# So we use a `cfg(foo)` and `cfg(not(foo))` for our common flags.
10+
[target.'cfg(all(target_arch = "x86_64", target_os = "linux"))']
11+
rustflags = ["--cfg=tokio_unstable", "-Ctarget-feature=+avx2,+fma"]
3312

34-
[target.aarch64-apple-darwin]
35-
rustflags = ["-Zshare-generics=y", "--cfg", "tokio_unstable"]
13+
[target.'cfg(not(all(target_arch = "x86_64", target_os = "linux")))']
14+
rustflags = ["--cfg=tokio_unstable"]
3615

3716
[net]
3817
git-fetch-with-cli = true

.github/workflows/docs.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ on:
1414
- main
1515

1616
env:
17-
# https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html#--index-page-provide-a-top-level-landing-page-for-docs
18-
RUSTDOCFLAGS: "-Dwarnings -Zunstable-options --enable-index-page"
17+
RUSTDOCFLAGS: "-Dwarnings"
1918
CACHE_TIMEOUT_MINUTES: 5
2019
SCCACHE_ENDPOINT: ${{ vars.SCCACHE_ENDPOINT }}
2120
SCCACHE_BUCKET: ${{ vars.SCCACHE_BUCKET }}

rust-toolchain.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = "nightly-2023-04-19"
2+
channel = "1.69"
33
components = ["clippy", "llvm-tools-preview", "rustfmt"]
44
targets = ["wasm32-unknown-unknown"]

0 commit comments

Comments
 (0)