Commit graph

10 commits

Author SHA1 Message Date
Jan Hohenheim
6f7c554daa
Fix common capitalization errors in documentation (#14562)
WASM -> Wasm
MacOS -> macOS

Nothing important, just something that annoyed me for a while :)
2024-07-31 21:16:05 +00:00
Giacomo Stevanato
f009d37fe5
Use rust-lld on windows rustdoc in config_fast_builds.toml (#13553)
# Objective

- Rustdoc doesn't seem to follow cargo's `linker` setting
- Improves the situation in #12207

## Solution

- Explicitly set the linker in rustdoc flags

## Testing

- I tested this change on Windows and it significantly improves testing
performances (can't give an exact estimate since they got stuck before
this change)

---

Note: I avoided changing the settings on Linux and MacOS because I can't
test on those platforms. It would be nice if someone could test similar
changes there and report so they can be done on all major platforms.
2024-07-08 00:34:21 +00:00
Jan Hohenheim
a58c4f7825
Fix footgun for Windows users in fast_config.toml (#14103)
# Objective

- https://github.com/bevyengine/bevy/pull/13136 changed the default
value of `-Zshare-generics=n` to `-Zshare-generics=y` on Windows
- New users are encouraged to use dynamic builds and LLD when setting up
Bevy
- New users are also encouraged to check out `fast_config.toml`
- https://github.com/bevyengine/bevy/issues/1126 means that running
dynamic builds, using LLD and sharing generics on Windows results in a
cryptic error message

As a result, a new Windows user following all recommendations for better
compiles is actually not able to compile Bevy at all.

## Solution

- Set `-Zshare-generics=n` on Windows with a comment saying this is for
dynamic linking

## Testing

I verified that https://github.com/bevyengine/bevy/issues/1126 is still
in place on the current nightly (1.80)

## Additional Info

Maybe the website should mention this as well? The relevant snippet
there looks like this:
```toml
# /path/to/project/.cargo/config.toml
[target.x86_64-unknown-linux-gnu]
rustflags = [
  # (Nightly) Make the current crate share its generic instantiations
  "-Zshare-generics=y",
]
```
so it kinda implies it's only for Linux? Which is not quite true, this
setting works on macOS as well AFAIK
2024-07-02 13:29:10 +00:00
Jan Hohenheim
d1dd61477b
Fix minor typo (#13898)
*No description needed*
2024-06-17 15:25:39 +00:00
BD103
62bb83cbbc
Add cargo ci alias for ci tool (#13280)
# Objective

- Running `cargo run --package ci -- ...` is lengthy, and `cargo r -p ci
-- ...` isn't much better.
- Closes #13197.

## Solution

- Add an opt-in alias to the `ci` tool with `cargo ci ...`.
- You need to copy `config_fast_builds.toml` to `config.toml` to enable
this functionality.

## Testing

- Copy `config_fast_builds.toml` to `config.toml`, then run `cargo ci
--help`.

---

## Changelog

- Added `cargo ci` alias for internal `ci` tool.
2024-05-13 18:33:47 +00:00
BD103
dac66e83b2
Improve config_fast_builds.toml (#13136)
# Objective

- `config_fast_builds.toml` could use some general improvements and
additions.
- [Mold](https://github.com/rui314/mold) is a modern linker with serious
performance improvements that provides a good alternative to LLD.
- This is exactly the same as #12949; I accidentally deleted the branch.
😅

## Solution

- Majorly improve `config_fast_builds.toml`.
  - Add further documentation.
- Add a section for the alternative Mold linker, which is **much**
faster.
- Disable nightly options by default so that developers running stable
can copy the file without having to edit it. (Nightly is still
recommended, but this is following suite with `rustfmt.toml`.)

---

## Changelog

- Majorly improved `config_fast_builds.toml` documentation and added
Mold linker.
2024-04-30 17:42:28 +00:00
Jan Hohenheim
8dd5692b3e
Add nightly hint to config.toml (#12257)
# Objective

- The build on Windows currently fails on stable when using the
`config.toml` as described but commenting out all lines that say
"Nightly"

## Solution

- Add a missing nightly specifier for a flag that won't run on stable
2024-03-02 14:41:37 +00:00
Doonv
d7c65e40ee
Use -Z threads=0 option in config_fast_builds.toml (#11541)
# Objective

Improve compile times.

## Solution

The `-Z threads=0` option has been introduced into nightly rust somewhat
recently, and was showcased in this [rust-lang
article](https://blog.rust-lang.org/2023/11/09/parallel-rustc.html).
This option improves multithreading in rust and speeds up compilation. I
added this option to `config_fast_builds.toml` so others can also use
this option to improve compile times.

`-Z threads=0` automatically uses the same amount of threads as the
amount of threads in your system (See [rustc source
code](6b4f1c5e78/compiler/rustc_session/src/options.rs (L617))).

### Benchmarks

> **Disclaimer:** This section was written before I knew of `-Z
threads=0`, so it uses `-Z threads=8` instead.

I compiled bevy with/without the `-Z threads=8` and saw about a 7%
improvement in compliation times on my Kubuntu system with a 13th Gen
Intel® Core™ i5-13400.

Also the compile times go down over time, probably because I had other
things running in the background.

#### Without `-Z threads=8` 

- 42.33s
- 40.90s
- 38.27s
- 38.07s
- 37.17s
- 37.67s
- 36.63s
- 37.24s

**Average**: 38.535

#### With `-Z threads=8`

- 36.77s
- 39.50s
- 38.86s
- 35.61s
- 34.37s
- 34.32s
- 34.44s
- 33.74s

**Average**: 35.95125
2024-01-29 23:13:22 +00:00
Doonv
a93cefe2cf
Improve config_fast_builds.toml (#11529)
# Objective

Theres no explaination for what the compiler flags
`config_fast_builds.toml` do

## Solution

Explain what the flags in `config_fast_builds.toml` do.
2024-01-25 19:07:51 +00:00
Doonv
98087139a1
Add .toml extension to .cargo/config_fast_builds (#11506)
# Objective

`config_fast_builds` has no highlighting.

## Solution

Add `.toml` extension to `.cargo/config_fast_builds` so it has
highlighting
2024-01-24 15:20:34 +00:00
Renamed from .cargo/config_fast_builds (Browse further)