<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>src/tools/build-manifest/README.md - fork/rust @ master</title>
<meta name="description" content="src/tools/build-manifest/README.md in fork/rust at master.">
<meta property="og:title" content="src/tools/build-manifest/README.md - fork/rust @ master">
<meta property="og:description" content="src/tools/build-manifest/README.md in fork/rust at master.">
<meta property="og:type" content="website">
<meta property="og:site_name" content="git.julia.blue">
<link rel="stylesheet" href="/css/style.css?v=62">
<script type="module" src="/js/main.js?v=62"></script>
</head>
<body>
<main data-ref="master" data-tip="3bcad65fbf67b6edf87c949531fbc13435882e6b">
<noscript>
  <div class="callout">
    <p>
      hey! this is a static git repo viewer. commit diffs, file history,
      older commits and other revisions won't load without javascript.
    </p>
    <p>
      you are still able to view source files on branch/tag tips,
      but the experience is degraded.
    </p>
  </div>
</noscript>
<header class="repo"><div>
<h1>fork/rust</h1>
</div>
<pre class="clone">git clone https://git.julia.blue/fork/rust</pre>
</header>
<p class="snapshot-commit"><span class="commit-author">bors</span><span class="commit-message" data-commit="3bcad65fbf67b6edf87c949531fbc13435882e6b">Auto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee</span><span class="snapshot-sha sha" data-commit="3bcad65fbf67b6edf87c949531fbc13435882e6b">3bcad65fbf6</span><time datetime="2023-10-05T15:24:54+00:00" title="2023-10-05 15:24:54 +0000">2023-10-05</time></p>
<header class="topbar"><details class="switcher"><summary>master</summary><div class="menu"><strong>branches</strong><a class="current" href="/fork/rust/ref/master/">master</a><strong>tags</strong><a href="/fork/rust/ref/1.39.0/">1.39.0</a><a href="/fork/rust/ref/1.40.0/">1.40.0</a><a href="/fork/rust/ref/1.41.0/">1.41.0</a><a href="/fork/rust/ref/1.41.1/">1.41.1</a><a href="/fork/rust/ref/1.42.0/">1.42.0</a><a href="/fork/rust/ref/1.43.0/">1.43.0</a><a href="/fork/rust/ref/1.43.1/">1.43.1</a><a href="/fork/rust/ref/1.44.0/">1.44.0</a><a class="all" href="/fork/rust/refs">all refs →</a></div></details><nav class="crumbs"><a href="/fork/rust/">rust</a> / <a href="/fork/rust/ref/master/tree/src/">src</a> / <a href="/fork/rust/ref/master/tree/src/tools/">tools</a> / <a href="/fork/rust/ref/master/tree/src/tools/build-manifest/">build-manifest</a> / <span class="cur">README.md</span></nav>
<span class="view-stats"><span>1.5 KiB</span><span>33 lines</span></span><span class="actions"><a class="raw" href="/fork/rust/raw/9d30c554186be1f6bd109170f1adbc07f8846502/src/tools/build-manifest/README.md">raw</a></span></header>
<div class="markdown-view"><input type="radio" name="markdown-view" id="markdown-rendered" checked><label for="markdown-rendered">rendered</label><input type="radio" name="markdown-view" id="markdown-code"><label for="markdown-code">code</label><section class="readme rendered"><h1>build-manifest</h1>
<p>This tool generates the manifests uploaded to static.rust-lang.org and used by rustup.
You can see a full list of all manifests at <a href="https://static.rust-lang.org/manifests.txt">https://static.rust-lang.org/manifests.txt</a>.
This listing is updated by <a href="https://github.com/rust-lang/generate-manifest-list">https://github.com/rust-lang/generate-manifest-list</a> every 7 days.</p>
<p>This gets called by <code>promote-release</code> <a href="https://github.com/rust-lang/promote-release">https://github.com/rust-lang/promote-release</a> via <code>x.py dist hash-and-sign</code>.</p>
<h2>Adding a new component</h2>
<ol>
<li>Add a new <code>Step</code> to <code>dist.rs</code>. This should usually be named after the filename of the uploaded tarball. See https://github.com/rust-lang/rust/pull/101799/files#diff-2c56335faa24486df09ba392d8900c57e2fac4633e1f7038469bcf9ed3feb871 for an example.
a. If appropriate, call <code>tarball.is_preview(true)</code> for the component.</li>
<li>Add a new <code>PkgType</code> to build-manifest. Fix all the compile errors as appropriate.</li>
</ol>
<h2>Testing changes locally</h2>
<p>In order to test the changes locally you need to have a valid dist directory
available locally. If you don't want to build all the compiler, you can easily
create one from the nightly artifacts with:</p>
<pre class="language-bash"><a-k>for</a-k> <a-pr>component</a-pr> <a-k>in</a-k> rust rustc rust-std rust-docs cargo; <a-k>do</a-k>
    <a-f>wget</a-f> <a-co>-P</a-co> build/dist https://static.rust-lang.org/dist/<a-eb>${</a-eb><a-pr>component</a-pr><a-eb>}</a-eb>-nightly-x86_64-unknown-linux-gnu.tar.gz
<a-k>done</a-k></pre>
<p>Then, you can generate the manifest and all the packages from <code>build/dist</code> to
<code>build/manifest</code> with:</p>
<pre class="language-bash"><a-f>mkdir</a-f> <a-co>-p</a-co> build/manifest
<a-f>cargo</a-f> +nightly run <a-co>--release</a-co> <a-co>-p</a-co> build-manifest build/dist build/manifest 1970-01-01 http://example.com nightly</pre>
</section><div class="code-panel"><pre class="code src" data-hl="src/tools/build-manifest/README.md"><span class="code-line"><a class="ln" id="L1" href="#L1">1</a><span class="code-text"># build-manifest</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L2" href="#L2">2</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L3" href="#L3">3</a><span class="code-text">This tool generates the manifests uploaded to static.rust-lang.org and used by rustup.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L4" href="#L4">4</a><span class="code-text">You can see a full list of all manifests at &lt;https://static.rust-lang.org/manifests.txt&gt;.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L5" href="#L5">5</a><span class="code-text">This listing is updated by &lt;https://github.com/rust-lang/generate-manifest-list&gt; every 7 days.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L6" href="#L6">6</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L7" href="#L7">7</a><span class="code-text">This gets called by `promote-release` &lt;https://github.com/rust-lang/promote-release&gt; via `x.py dist hash-and-sign`.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L8" href="#L8">8</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L9" href="#L9">9</a><span class="code-text">## Adding a new component</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L10" href="#L10">10</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L11" href="#L11">11</a><span class="code-text">1. Add a new `Step` to `dist.rs`. This should usually be named after the filename of the uploaded tarball. See https://github.com/rust-lang/rust/pull/101799/files#diff-2c56335faa24486df09ba392d8900c57e2fac4633e1f7038469bcf9ed3feb871 for an example.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L12" href="#L12">12</a><span class="code-text">    a. If appropriate, call `tarball.is_preview(true)` for the component.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L13" href="#L13">13</a><span class="code-text">2. Add a new `PkgType` to build-manifest. Fix all the compile errors as appropriate.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L14" href="#L14">14</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L15" href="#L15">15</a><span class="code-text">## Testing changes locally</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L16" href="#L16">16</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L17" href="#L17">17</a><span class="code-text">In order to test the changes locally you need to have a valid dist directory</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L18" href="#L18">18</a><span class="code-text">available locally. If you don't want to build all the compiler, you can easily</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L19" href="#L19">19</a><span class="code-text">create one from the nightly artifacts with:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L20" href="#L20">20</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L21" href="#L21">21</a><span class="code-text">```sh</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L22" href="#L22">22</a><span class="code-text">for component in rust rustc rust-std rust-docs cargo; do</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L23" href="#L23">23</a><span class="code-text">    wget -P build/dist https://static.rust-lang.org/dist/${component}-nightly-x86_64-unknown-linux-gnu.tar.gz</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L24" href="#L24">24</a><span class="code-text">done</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L25" href="#L25">25</a><span class="code-text">```</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L26" href="#L26">26</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L27" href="#L27">27</a><span class="code-text">Then, you can generate the manifest and all the packages from `build/dist` to</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L28" href="#L28">28</a><span class="code-text">`build/manifest` with:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L29" href="#L29">29</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L30" href="#L30">30</a><span class="code-text">```sh</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L31" href="#L31">31</a><span class="code-text">mkdir -p build/manifest</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L32" href="#L32">32</a><span class="code-text">cargo +nightly run --release -p build-manifest build/dist build/manifest 1970-01-01 http://example.com nightly</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L33" href="#L33">33</a><span class="code-text">```</span></span></pre></div></div>
</main>
</body>
</html>
