<!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 @ 1.40.0</title>
<meta name="description" content="src/tools/build-manifest/README.md in fork/rust at 1.40.0.">
<meta property="og:title" content="src/tools/build-manifest/README.md - fork/rust @ 1.40.0">
<meta property="og:description" content="src/tools/build-manifest/README.md in fork/rust at 1.40.0.">
<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="1.40.0" data-tip="73528e339aae0f17a15ffa49a8ac608f50c6cf14">
<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="73528e339aae0f17a15ffa49a8ac608f50c6cf14">Auto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum</span><span class="snapshot-sha sha" data-commit="73528e339aae0f17a15ffa49a8ac608f50c6cf14">73528e339aa</span><time datetime="2019-12-16T15:36:22+00:00" title="2019-12-16 15:36:22 +0000">2019-12-16</time></p>
<header class="topbar"><details class="switcher"><summary>1.40.0</summary><div class="menu"><strong>branches</strong><a href="/fork/rust/ref/master/">master</a><strong>tags</strong><a href="/fork/rust/ref/1.39.0/">1.39.0</a><a class="current" 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/1.40.0/tree/src/">src</a> / <a href="/fork/rust/ref/1.40.0/tree/src/tools/">tools</a> / <a href="/fork/rust/ref/1.40.0/tree/src/tools/build-manifest/">build-manifest</a> / <span class="cur">README.md</span></nav>
<span class="view-stats"><span>947 B</span><span>30 lines</span></span><span class="actions"><a class="raw" href="/fork/rust/raw/6834f56efe7dbb7f26841a64a6015be884bcd450/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. The tool is invoked by the bootstrap tool.</p>
<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>#!/bin/bash
for cmpn in rust rustc rust-std rust-docs cargo; do
    wget https://static.rust-lang.org/dist/${cmpn}-nightly-x86_64-unknown-linux-gnu.tar.gz
done
</pre>
<p>Then, you can generate the manifest and all the packages from <code>path/to/dist</code> to
<code>path/to/output</code> with:</p>
<pre>$ BUILD_MANIFEST_DISABLE_SIGNING=1 cargo +nightly run \
    path/to/dist path/to/output 1970-01-01 \
    nightly nightly nightly nightly nightly nightly nightly \
    http://example.com
</pre>
<p>In the future, if the tool complains about missing arguments just add more
<code>nightly</code>s in the middle.</p>
</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</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L4" href="#L4">4</a><span class="code-text">rustup. The tool is invoked by the bootstrap tool.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L5" href="#L5">5</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L6" href="#L6">6</a><span class="code-text">## Testing changes locally</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L7" href="#L7">7</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L8" href="#L8">8</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="L9" href="#L9">9</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="L10" href="#L10">10</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="L11" href="#L11">11</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L12" href="#L12">12</a><span class="code-text">```</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L13" href="#L13">13</a><span class="code-text">#!/bin/bash</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L14" href="#L14">14</a><span class="code-text">for cmpn in rust rustc rust-std rust-docs cargo; do</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L15" href="#L15">15</a><span class="code-text">    wget https://static.rust-lang.org/dist/${cmpn}-nightly-x86_64-unknown-linux-gnu.tar.gz</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L16" href="#L16">16</a><span class="code-text">done</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L17" href="#L17">17</a><span class="code-text">```</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L18" href="#L18">18</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L19" href="#L19">19</a><span class="code-text">Then, you can generate the manifest and all the packages from `path/to/dist` to</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L20" href="#L20">20</a><span class="code-text">`path/to/output` with:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L21" href="#L21">21</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L22" href="#L22">22</a><span class="code-text">```</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L23" href="#L23">23</a><span class="code-text">$ BUILD_MANIFEST_DISABLE_SIGNING=1 cargo +nightly run \</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L24" href="#L24">24</a><span class="code-text">    path/to/dist path/to/output 1970-01-01 \</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L25" href="#L25">25</a><span class="code-text">    nightly nightly nightly nightly nightly nightly nightly \</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L26" href="#L26">26</a><span class="code-text">    http://example.com</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L27" href="#L27">27</a><span class="code-text">```</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L28" href="#L28">28</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L29" href="#L29">29</a><span class="code-text">In the future, if the tool complains about missing arguments just add more</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L30" href="#L30">30</a><span class="code-text">`nightly`s in the middle.</span></span></pre></div></div>
</main>
</body>
</html>
