Skip to content

Commit

Permalink
deploy: 7aa5985
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Feb 4, 2024
1 parent 019dd59 commit 748aa74
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
10 changes: 10 additions & 0 deletions build-configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,16 @@ <h3 id="linking"><a class="header" href="#linking">Linking</a></h3>
faster than lld. It is also much newer and may not work in all cases.</p>
<p>Unlike the other options in this chapter, there are no trade-offs here!
Alternative linkers can be dramatically faster, without any downsides.</p>
<h3 id="parallel-frontend"><a class="header" href="#parallel-frontend">Parallel frontend</a></h3>
<p>If you use the nightly channel, you can opt in to using multiple threads in
the compiler frontend.</p>
<p>You can do that by adding <code>-Zthreads=N</code> to RUSTFLAGS, for example:</p>
<pre><code class="language-bash">$ RUSTFLAGS=&quot;-Zthreads=8&quot; cargo build --release
</code></pre>
<p><code>N</code> specifies how many threads will be used for parallelizing the frontend.
Currently, the best results seem to be achieved with up to <code>8</code> threads, higher
thread count provides diminishing results.</p>
<p>You can find out more about this in <a href="https://blog.rust-lang.org/2023/11/09/parallel-rustc.html">this blog post</a>.</p>
<h2 id="custom-profiles"><a class="header" href="#custom-profiles">Custom profiles</a></h2>
<p>In addition to the <code>dev</code> and <code>release</code> profiles, Cargo supports <a href="https://doc.rust-lang.org/cargo/reference/profiles.html#custom-profiles">custom
profiles</a>. It might be useful, for example, to create a custom profile halfway
Expand Down
10 changes: 10 additions & 0 deletions print.html
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,16 @@ <h3 id="linking"><a class="header" href="#linking">Linking</a></h3>
faster than lld. It is also much newer and may not work in all cases.</p>
<p>Unlike the other options in this chapter, there are no trade-offs here!
Alternative linkers can be dramatically faster, without any downsides.</p>
<h3 id="parallel-frontend"><a class="header" href="#parallel-frontend">Parallel frontend</a></h3>
<p>If you use the nightly channel, you can opt in to using multiple threads in
the compiler frontend.</p>
<p>You can do that by adding <code>-Zthreads=N</code> to RUSTFLAGS, for example:</p>
<pre><code class="language-bash">$ RUSTFLAGS=&quot;-Zthreads=8&quot; cargo build --release
</code></pre>
<p><code>N</code> specifies how many threads will be used for parallelizing the frontend.
Currently, the best results seem to be achieved with up to <code>8</code> threads, higher
thread count provides diminishing results.</p>
<p>You can find out more about this in <a href="https://blog.rust-lang.org/2023/11/09/parallel-rustc.html">this blog post</a>.</p>
<h2 id="custom-profiles"><a class="header" href="#custom-profiles">Custom profiles</a></h2>
<p>In addition to the <code>dev</code> and <code>release</code> profiles, Cargo supports <a href="https://doc.rust-lang.org/cargo/reference/profiles.html#custom-profiles">custom
profiles</a>. It might be useful, for example, to create a custom profile halfway
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searchindex.json

Large diffs are not rendered by default.

0 comments on commit 748aa74

Please sign in to comment.