From e01027906f7c16876a68340a39f5debd5ccc04b5 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 11 Nov 2016 15:34:56 -0800 Subject: [PATCH 1/8] Remove install button from front page --- css/style.css | 27 ++------------------------- en-US/index.html | 22 +++------------------- 2 files changed, 5 insertions(+), 44 deletions(-) diff --git a/css/style.css b/css/style.css index 673cc1874..cffcb4bd7 100644 --- a/css/style.css +++ b/css/style.css @@ -147,8 +147,8 @@ div.install { text-decoration: none; } -.install-row { - margin-bottom: 0em; +.pitch-row { + margin-bottom: 2em; } p.pitch { @@ -170,19 +170,6 @@ p.pitch a { font-size: 80%; } -.install-box { - color: #777; - text-align: right; - font-size: 130%; - margin-top: 0.8em; -} - -.version-rec-box-inner { - display: block; - font-size: 12px; - text-align: center; -} - hr { margin-top: 2em; margin-bottom: 3em; @@ -206,12 +193,6 @@ hr { list-style-type: square; } -.install-box a.btn { - display: block; - margin:1em auto; - max-width: 250px; -} - ul.laundry-list { column-count: 2; -moz-column-count: 2; @@ -224,10 +205,6 @@ ul.laundry-list { } @media (min-width: 992px) { - .install-box a.btn { - font-size: 18px; - padding: 10px 15px; - } ul.laundry-list { column-count: auto; -moz-column-count: auto; diff --git a/en-US/index.html b/en-US/index.html index 93a79db39..96d7266d1 100644 --- a/en-US/index.html +++ b/en-US/index.html @@ -3,7 +3,8 @@ title: The Rust Programming Language --- -
+
+

Rust is a systems programming language @@ -14,22 +15,7 @@ See who's using Rust.

-
- - Recommended Version:
- - {{ site.stable }} - (source) - -
- Install - Other Downloads -
+
@@ -70,6 +56,4 @@

Featuring

{% include editor.js %} }); }); - - {% include set_platform.js %} From 0f4e0a9522de2b7b5d0d8d9ce25e5bb725453233 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 11 Nov 2016 15:39:10 -0800 Subject: [PATCH 2/8] Rename the download page to install. Set up redirects --- _layouts/basic.html | 2 +- downloads.html | 8 +- en-US/downloads.html | 216 +------------------------------------------ en-US/install.html | 216 ++++++++++++++++++++++++++++++++++++++++++- install.html | 8 +- 5 files changed, 225 insertions(+), 225 deletions(-) diff --git a/_layouts/basic.html b/_layouts/basic.html index 652a987bd..2e561a591 100644 --- a/_layouts/basic.html +++ b/_layouts/basic.html @@ -28,7 +28,7 @@ diff --git a/downloads.html b/downloads.html index 9bc660a85..0f3bde88d 100644 --- a/downloads.html +++ b/downloads.html @@ -1,3 +1,5 @@ ---- -layout: redirect ---- + + + + + diff --git a/en-US/downloads.html b/en-US/downloads.html index e273361f3..0f3bde88d 100644 --- a/en-US/downloads.html +++ b/en-US/downloads.html @@ -1,213 +1,5 @@ ---- -layout: default -title: Downloads · The Rust Programming Language ---- -

Downloads

+ -
- -
-
-

{{ site.stable }} 

-

{{ site.stable_date | date: "%B %-d, %Y" }}

-

- The - - current stable release of Rust, - updated every six weeks and backwards-compatible. -

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Linux (.tar.gz)
64-bit
32-bit
Mac (.pkg)
64-bit
32-bit
Windows (MSVC ABI ) (.msi)
64-bit
32-bit
Windows (GNU ABI ) (.msi)
64-bit
32-bit
 
Source
-
-
- -
-
-

An easy way to install the stable binaries for Linux and Mac is to run this in your shell:

-
curl -sSf https://static.rust-lang.org/rustup.sh | sh
-
-
- -
- -
-
-

Beta  ({{ site.beta }})

-

- A preview of the upcoming stable release, intended for testing by - crate authors. Updated every six weeks and as needed. -

-

Scheduled for stable release
{{ site.beta_date | date: "%B %-d, %Y" }}
.

-

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Linux (.tar.gz)
64-bit
32-bit
Mac (.pkg)
64-bit
32-bit
Windows (MSVC ABI ) (.msi)
64-bit
32-bit
Windows (GNU ABI ) (.msi)
64-bit
32-bit
 
Source
-
-
- -
-
-

An easy way to install the beta binaries for Linux and Mac is to run this in your shell:

-
curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=beta
-
-
- -
- -
-
-

Nightly  ({{ site.nightly }})

-

- The current development branch. - It includes - unstable features - that are not available in the betas or stable releases. -

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Linux (.tar.gz)
64-bit
32-bit
Mac (.pkg)
64-bit
32-bit
Windows (MSVC ABI ) (.msi)
64-bit
32-bit
Windows (GNU ABI ) (.msi)
64-bit
32-bit
 
Source
-
-
- -
-
-

An easy way to install the nightly binaries for Linux and Mac is to run this in your shell:

-
curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly
-
-
- -
- -
-
-

- Discover other downloads in the archives. -

-
-
- -
- -
-
-

If you installed using the shell script, run this to uninstall:

-
curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --uninstall
-
-
- -
- -
-
- -

- - There are two prominent - ABIs - in use on Windows: the native (MSVC) ABI used by - Visual Studio, - and the GNU ABI used by the - GCC toolchain. - Which version of Rust you need depends largely on what C/C++ libraries you want to interoperate with: - for interop with software produced by Visual Studio use the MSVC build of Rust; for interop with - GNU software built using the - MinGW/MSYS2 toolchain - use the GNU build. -

-

- MSVC builds of Rust additionally require the Microsoft Visual - C++ build tools for Visual Studio 2013 or later. - The easiest way to acquire the build tools is by installing - - Microsoft Visual C++ Build Tools 2015 - which provides just the Visual C++ build tools. - Alternately, you can install - Visual Studio 2015 or Visual Studio 2013 and during install select the "C++ tools". - No additional software installation is necessary for basic use of the GNU build. -

-

- Rust's support for the MSVC ABI is more mature, and is recommended for typical - uses. -

-
-
+ + + diff --git a/en-US/install.html b/en-US/install.html index 597e180a2..a61e2aa4e 100644 --- a/en-US/install.html +++ b/en-US/install.html @@ -1,5 +1,213 @@ - +--- +layout: default +title: Installation · The Rust Programming Language +--- +

Installation

- - - +
+ +
+
+

{{ site.stable }} 

+

{{ site.stable_date | date: "%B %-d, %Y" }}

+

+ The + + current stable release of Rust, + updated every six weeks and backwards-compatible. +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Linux (.tar.gz)
64-bit
32-bit
Mac (.pkg)
64-bit
32-bit
Windows (MSVC ABI ) (.msi)
64-bit
32-bit
Windows (GNU ABI ) (.msi)
64-bit
32-bit
 
Source
+
+
+ +
+
+

An easy way to install the stable binaries for Linux and Mac is to run this in your shell:

+
curl -sSf https://static.rust-lang.org/rustup.sh | sh
+
+
+ +
+ +
+
+

Beta  ({{ site.beta }})

+

+ A preview of the upcoming stable release, intended for testing by + crate authors. Updated every six weeks and as needed. +

+

Scheduled for stable release
{{ site.beta_date | date: "%B %-d, %Y" }}
.

+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Linux (.tar.gz)
64-bit
32-bit
Mac (.pkg)
64-bit
32-bit
Windows (MSVC ABI ) (.msi)
64-bit
32-bit
Windows (GNU ABI ) (.msi)
64-bit
32-bit
 
Source
+
+
+ +
+
+

An easy way to install the beta binaries for Linux and Mac is to run this in your shell:

+
curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=beta
+
+
+ +
+ +
+
+

Nightly  ({{ site.nightly }})

+

+ The current development branch. + It includes + unstable features + that are not available in the betas or stable releases. +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Linux (.tar.gz)
64-bit
32-bit
Mac (.pkg)
64-bit
32-bit
Windows (MSVC ABI ) (.msi)
64-bit
32-bit
Windows (GNU ABI ) (.msi)
64-bit
32-bit
 
Source
+
+
+ +
+
+

An easy way to install the nightly binaries for Linux and Mac is to run this in your shell:

+
curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly
+
+
+ +
+ +
+
+

+ Discover other downloads in the archives. +

+
+
+ +
+ +
+
+

If you installed using the shell script, run this to uninstall:

+
curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --uninstall
+
+
+ +
+ +
+
+ +

+ + There are two prominent + ABIs + in use on Windows: the native (MSVC) ABI used by + Visual Studio, + and the GNU ABI used by the + GCC toolchain. + Which version of Rust you need depends largely on what C/C++ libraries you want to interoperate with: + for interop with software produced by Visual Studio use the MSVC build of Rust; for interop with + GNU software built using the + MinGW/MSYS2 toolchain + use the GNU build. +

+

+ MSVC builds of Rust additionally require the Microsoft Visual + C++ build tools for Visual Studio 2013 or later. + The easiest way to acquire the build tools is by installing + + Microsoft Visual C++ Build Tools 2015 + which provides just the Visual C++ build tools. + Alternately, you can install + Visual Studio 2015 or Visual Studio 2013 and during install select the "C++ tools". + No additional software installation is necessary for basic use of the GNU build. +

+

+ Rust's support for the MSVC ABI is more mature, and is recommended for typical + uses. +

+
+
diff --git a/install.html b/install.html index 597e180a2..9bc660a85 100644 --- a/install.html +++ b/install.html @@ -1,5 +1,3 @@ - - - - - +--- +layout: redirect +--- From 7355caa7d3b50307027d6ef27d85e4d9b7f66e7b Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 11 Nov 2016 16:08:41 -0800 Subject: [PATCH 3/8] Put install link second in header, after docs --- _layouts/basic.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_layouts/basic.html b/_layouts/basic.html index 2e561a591..9fb94667f 100644 --- a/_layouts/basic.html +++ b/_layouts/basic.html @@ -27,8 +27,8 @@ From 7879a427f3ffad91c57dd37f7eec92bb60a6d1c1 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 11 Nov 2016 16:30:44 -0800 Subject: [PATCH 4/8] Switch to rustup installation --- _config.yml | 11 + _includes/rustup.js | 146 +++++++++++++ css/style.css | 173 +++++++++++++++- en-US/index.html | 9 +- en-US/install.html | 426 ++++++++++++++++++++++---------------- en-US/other-installers.md | 397 +++++++++++++++++++++++++++++++++++ 6 files changed, 978 insertions(+), 184 deletions(-) create mode 100644 _includes/rustup.js create mode 100644 en-US/other-installers.md diff --git a/_config.yml b/_config.yml index 81b9ab3fb..c7480ffd6 100644 --- a/_config.yml +++ b/_config.yml @@ -2,6 +2,17 @@ name: The Rust Programming Language stable: "1.13.0" stable_date: "2016-11-10" stable_blog: "/2016/11/10/Rust-1.13.html" +stable_full_version: "rustc 1.13.0 (2c6933acc 2016-11-07)" beta: "1.14" beta_date: "2016-12-22" nightly: "1.15" +channels: + - name: "stable" + vers: "1.13.0" + package: "1.13.0" + - name: "beta" + vers: "1.14" + package: "beta" + - name: "nightly" + vers: "1.15" + package: "nightly" diff --git a/_includes/rustup.js b/_includes/rustup.js new file mode 100644 index 000000000..257409ac3 --- /dev/null +++ b/_includes/rustup.js @@ -0,0 +1,146 @@ +var platform_override = null; + +function detect_platform() { + "use strict"; + + if (platform_override) { + return platform_override; + } + + var os = "unknown"; + + if (navigator.platform == "Linux x86_64") {os = "unix";} + if (navigator.platform == "Linux i686") {os = "unix";} + if (navigator.platform == "Linux i686 on x86_64") {os = "unix";} + if (navigator.platform == "Linux aarch64") {os = "unix";} + if (navigator.platform == "Linux armv6l") {os = "unix";} + if (navigator.platform == "Linux armv7l") {os = "unix";} + if (navigator.platform == "Win32") {os = "win";} + if (navigator.platform == "FreeBSD x86_64") {os = "unix";} + if (navigator.platform == "FreeBSD amd64") {os = "unix";} + + if (navigator.platform == "Linux armv7l" + && navigator.appVersion.indexOf("Android") != -1 ) { + os = "android"; + } + + // I wish I knew by now, but I don't. Try harder. + if (os == "unknown") { + if (navigator.appVersion.indexOf("Win")!=-1) {os = "win";} + if (navigator.appVersion.indexOf("Mac")!=-1) {os = "unix";} + } + + return os; +} + +function adjust_for_platform() { + "use strict"; + + var platform = detect_platform(); + + var unix_div = document.getElementById("platform-instructions-unix"); + var win_div = document.getElementById("platform-instructions-win"); + var android_div = document.getElementById("platform-instructions-android"); + var unknown_div = document.getElementById("platform-instructions-unknown"); + var default_div = document.getElementById("platform-instructions-default"); + + unix_div.style.display = "none"; + win_div.style.display = "none"; + android_div.style.display = "none"; + unknown_div.style.display = "none"; + default_div.style.display = "none"; + + if (platform == "unix") { + unix_div.style.display = "block"; + } else if (platform == "win") { + win_div.style.display = "block"; + } else if (platform == "android") { + android_div.style.display = "block"; + } else if (platform == "unknown") { + unknown_div.style.display = "block"; + } else { + default_div.style.display = "block"; + } + + var platform_specific = document.getElementsByClassName("platform-specific"); + for (var el of platform_specific) { + var el_is_not_win = el.className.indexOf("not-win") !== -1; + var el_is_inline = el.tagName.toLowerCase() == "span"; + var el_visible_style = "block"; + if (el_is_inline) { + el_visible_style = "inline"; + } + if (platform == "win") { + if (el_is_not_win) { + el.style.display = "none"; + } else { + el.style.display = el_visible_style; + } + } else { + if (el_is_not_win) { + el.style.display = el_visible_style; + } else { + el.style.display = "none"; + } + } + } +} + +function cycle_platform() { + if (platform_override == null) { + platform_override = "default"; + } else if (platform_override == "default") { + platform_override = "unknown"; + } else if (platform_override == "unknown") { + platform_override = "win"; + } else if (platform_override == "win") { + platform_override = "unix"; + } else if (platform_override == "unix") { + platform_override = "android"; + } else if (platform_override == "android") { + platform_override = "default"; + } + adjust_for_platform(); +} + +function set_up_cycle_button() { + var cycle_button = document.getElementById("platform-button"); + cycle_button.onclick = cycle_platform; + + var key="test"; + var idx=0; + var unlocked=false; + + document.onkeypress = function(event) { + if (event.key == "n" && unlocked) { + cycle_platform(); + } + + if (event.key == key[idx]) { + idx += 1; + + if (idx == key.length) { + cycle_button.style.display = "block"; + unlocked = true; + cycle_platform(); + } + } else if (event.key == key[0]) { + idx = 1; + } else { + idx = 0; + } + }; +} + +function fill_in_bug_report_values() { + var nav_plat = document.getElementById("nav-plat"); + var nav_app = document.getElementById("nav-app"); + nav_plat.textContent = navigator.platform; + nav_app.textContent = navigator.appVersion; +} + +(function () { + adjust_for_platform(); + set_up_cycle_button(); + fill_in_bug_report_values(); +}()); diff --git a/css/style.css b/css/style.css index cffcb4bd7..b876d83f6 100644 --- a/css/style.css +++ b/css/style.css @@ -148,7 +148,7 @@ div.install { } .pitch-row { - margin-bottom: 2em; + margin-bottom: 0em; } p.pitch { @@ -377,15 +377,15 @@ ul.laundry-list { line-height: 1.5em; margin: 3rem 0 1rem; font-weight: 400; - border-top: 2px solid #dedede; - padding-top: 1rem; + border-top: 2px solid #dedede; + padding-top: 1rem; } .content h3 { font-size: 1em; line-height: 1.5em; font-weight: 500; - margin: .5rem 0; + margin: 2rem 0; } .side-header h2 { @@ -593,3 +593,168 @@ footer a { display: inline-block; font-weight: bold; } + +/* rustup install page styles */ + +.instructions { + background-color: rgb(250, 250, 250); + margin-left: auto; + margin-right: auto; + width: 34rem; + text-align: center; + border-radius: 3px; + border: 1px solid rgb(204, 204, 204); + box-shadow: 0px 1px 4px 0px rgb(204, 204, 204); + margin-top: 4rem; + margin-bottom: 4rem; +} + +.instructions > * { + width: 30rem; + margin-left: auto; + margin-right: auto; +} + +.instructions p { + margin-left: auto; + margin-right: auto; + margin-top: 2rem; + margin-bottom: 2rem; +} + +.instructions hr { + margin-top: 2rem; + margin-bottom: 2rem; +} + +#platform-instructions-unix > pre, +#platform-instructions-default > div > pre { + background-color: #515151; + color: white; + margin-left: auto; + margin-right: auto; + padding-top: 1rem; + padding-bottom: 1rem; + text-align: center; + border-radius: 3px; + box-shadow: inset 0px 0px 20px 0px #444444; + margin-top: 2rem; + margin-bottom: 2rem; +} + +#platform-instructions-win a, +#platform-instructions-default a { + display: block; + padding-top: 0.4rem; + padding-bottom: 0.6rem; + font-family: 'Fira Sans', "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight: 500; + letter-spacing: 0.1rem; +} + +#platform-instructions-unknown div { + line-height: 2rem; +} + +#platform-button { + width: 100%; + font-size: 70%; + text-align: center; + margin-top: 1em; + margin-bottom: 1em; + background-color: #515151; + color: white; + margin-left: auto; + margin-right: auto; + padding: 1em; +} + +.install-examples { + margin-top: 2rem; + margin-bottom: 2rem +} + +.install-example-row > div:first-child { + text-align: right; + margin-top: 1rem +} + +.install-example-row > div:last-child { + margin-top: 0rem; + margin-bottom: 1rem; +} + +.pitch-row .release-button { + display: block; + color: white; + background-color: #428BCA; + border-radius: 3px; + padding-left: 4rem; + padding-top: 2rem; + padding-bottom: 2rem; + margin-top: 4rem; +} + +.release-info-column > div { + margin-top: 4rem; +} + +.release-info-column > div > div:first-child { +} + +.release-info-column .release-version { + font-size: 1.5em; + font-weight: 500; +} + +.release-info-column .release-date { + font-weight: 500; +} + +/* de-emphasize the header to draw attention to the instructions */ +h1.rustup, +h1.rustup ~ h2 { + color: #999; + font-size: 2em; /* same as h2 */ + font-size: 2em; + line-height: 1.5em; + margin: 3rem 0 1rem; + font-weight: 400; + border-top: 2px solid #dedede; + padding-top: 1rem; +} + +.rustup-init-table { + display: flex; + margin: 2rem; + justify-content: space-around; +} + +.rustup-init-table > div > a { + display: block; +} + +.installer-table { + display: flex; + margin: 2rem; + justify-content: space-around; +} + +.installer-table > div > div { + text-align: right +} + +.installer-table > div > div > span { + float: left; + margin-left: 1em; + margin-right: 1em; +} + +.installer-table > div > div > a { + margin-left: 1em; + margin-right: 1em; +} + +.installer-table.stable .no-stable { + display: none; +} diff --git a/en-US/index.html b/en-US/index.html index 96d7266d1..5a3e6ed2c 100644 --- a/en-US/index.html +++ b/en-US/index.html @@ -4,7 +4,6 @@ ---
diff --git a/en-US/install.html b/en-US/install.html index a61e2aa4e..072ea6b41 100644 --- a/en-US/install.html +++ b/en-US/install.html @@ -2,212 +2,282 @@ layout: default title: Installation · The Rust Programming Language --- -

Installation

+
+
+ -
+ + + + + + +
+
+

To install Rust, if you are running Unix,
run the following + in your terminal, then follow the onscreen instructions.

+
curl https://sh.rustup.rs -sSf | sh
+
+ +
+ +
+

+ If you are running Windows,
download and run + rustup‑init.exe + then follow the onscreen instructions. +

+
+
-
-
-

{{ site.stable }} 

-

{{ site.stable_date | date: "%B %-d, %Y" }}

-

- The - - current stable release of Rust, - updated every six weeks and backwards-compatible. -

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Linux (.tar.gz)
64-bit
32-bit
Mac (.pkg)
64-bit
32-bit
Windows (MSVC ABI ) (.msi)
64-bit
32-bit
Windows (GNU ABI ) (.msi)
64-bit
32-bit
 
Source
-
-
-
-

An easy way to install the stable binaries for Linux and Mac is to run this in your shell:

-
curl -sSf https://static.rust-lang.org/rustup.sh | sh
+ +
-
+

Installing Rust

+ +
+
+

+ The most common way to install Rust is to ↑ follow the + instructions above ↑. The installer will explain everything it + does, and everything you need to set up your environment. It's + simple, and it usually just works. If you are confident and + clever then ↑ follow the instructions above ↑. If you are + cautious or have questions, read on. +

-
-
-

Beta  ({{ site.beta }})

- A preview of the upcoming stable release, intended for testing by - crate authors. Updated every six weeks and as needed. + Follow the instructions above. + Doing so will install the latest stable release of Rust, + including the compiler, rustc, the build system and + package manager, cargo, and the Rust toolchain + manager, rustup, to Cargo's application directory, + + ~/.cargo/bin + + + .

-

Scheduled for stable release
{{ site.beta_date | date: "%B %-d, %Y" }}
.

-

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Linux (.tar.gz)
64-bit
32-bit
Mac (.pkg)
64-bit
32-bit
Windows (MSVC ABI ) (.msi)
64-bit
32-bit
Windows (GNU ABI ) (.msi)
64-bit
32-bit
 
Source
-
-
-

An easy way to install the beta binaries for Linux and Mac is to run this in your shell:

-
curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=beta
+
+
+
+

Test the installation by running

+
+
+
~/.cargo/bin/rustc --version
+
%USERPROFILE%\.cargo\bin\rustc --version
+
-
- -
-
-
-

Nightly  ({{ site.nightly }})

-

- The current development branch. - It includes - unstable features - that are not available in the betas or stable releases. -

+
+
+

... which should print

+
+
+
{{ site.stable_full_version }}
+
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Linux (.tar.gz)
64-bit
32-bit
Mac (.pkg)
64-bit
32-bit
Windows (MSVC ABI ) (.msi)
64-bit
32-bit
Windows (GNU ABI ) (.msi)
64-bit
32-bit
 
Source
-
-
-
-
-

An easy way to install the nightly binaries for Linux and Mac is to run this in your shell:

-
curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly
+
+
+

To uninstall Rust, run

+
+
+
~/.cargo/bin/rustup self uninstall
+
%USERPROFILE%\.cargo\bin\rustup self uninstall
+
-
-
-

- Discover other downloads in the archives. -

+

+ If you run into problems see the + troubleshooting guide. +

-
+

Notes about Rust installation

-
+
-

If you installed using the shell script, run this to uninstall:

-
curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --uninstall
+ +

Toolchain management with rustup

+ +

+ Rust is installed and managed by the + rustup + tool. Rust has a 6-week + + rapid release process + and supports a + + great number of platforms + , so there are many builds of Rust available at any time. + rustup manages these builds in a consistent way on every platform + that Rust supports, enabling + + installation of Rust from the beta and nightly release channels + + as well as + + support for additional cross-compilation targets + . +

+ +

+ To keep your Rust installation up to date, periodically + run rustup update. For more information see the + rustup documentation. +

+ +

Configuring the PATH environment variable

+ +

+ In the Rust development environment, all tools are installed + to cargo's + + ~/.cargo/bin + + directory, + and this is where you will find the Rust toolchain, including + rustc, cargo, and rustup. +

+ +

+ Accordingly, it is customary for Rust developers to include this + directory in their + PATH + environment variable. During installation, rustup, + will attempt to configure + PATH, but because of differences between platforms, + command shells, and bugs in rustup the modifications + to PATH may not take effect until the console is + restarted, or the user logged out, or may not succeed at all. +

+ +

+ If, after installation, running rustc --version in the + console fails, this is the most likely reason. Follow the + platform-specific instructions to + modify PATH yourself. +

+ +
+ +

Windows considerations

+ + + +

+ There are two prominent + ABIs + in use on Windows: the native (MSVC) ABI used by + Visual Studio, + and the GNU ABI used by the + GCC toolchain. + Rust can compile for both ABIs, and which one you choose to target + depends largely on what C/C++ libraries you want to interoperate with: + for interop with software produced by Visual Studio use the MSVC build + of Rust; for interop with GNU software built using the + MinGW/MSYS2 toolchain + use the GNU build. +

+ +

+ For best interoperability with other Windows software, Rust targets + the MSVC ABI by default. For this Rust requires the C++ build tools + for Visual Studio 2013 or later. The easiest way to acquire the build + tools is by installing + + Microsoft Visual C++ Build Tools 2015 + which provides just the Visual C++ build tools. + Alternately, you can install + Visual Studio 2015 or Visual Studio 2013 and during install select the "C++ tools". + No additional software installation is necessary for basic use of the GNU build. +

+ +

+ For further information about configuring Rust on Windows see the + Windows-specific rustup documentation. +

+ +
+ +

Other installation methods

+ +

+ The installation described above, via + rustup, is the preferred way to install Rust for most developers, + but Rust can be + installed via other methods as well. +

+
-
+ -
-
- -

- - There are two prominent - ABIs - in use on Windows: the native (MSVC) ABI used by - Visual Studio, - and the GNU ABI used by the - GCC toolchain. - Which version of Rust you need depends largely on what C/C++ libraries you want to interoperate with: - for interop with software produced by Visual Studio use the MSVC build of Rust; for interop with - GNU software built using the - MinGW/MSYS2 toolchain - use the GNU build. -

-

- MSVC builds of Rust additionally require the Microsoft Visual - C++ build tools for Visual Studio 2013 or later. - The easiest way to acquire the build tools is by installing - - Microsoft Visual C++ Build Tools 2015 - which provides just the Visual C++ build tools. - Alternately, you can install - Visual Studio 2015 or Visual Studio 2013 and during install select the "C++ tools". - No additional software installation is necessary for basic use of the GNU build. -

-

- Rust's support for the MSVC ABI is more mature, and is recommended for typical - uses. -

-
-
diff --git a/en-US/other-installers.md b/en-US/other-installers.md new file mode 100644 index 000000000..0c4dafd2d --- /dev/null +++ b/en-US/other-installers.md @@ -0,0 +1,397 @@ +--- +layout: default +title: Other Installation Methods · The Rust Programming Language +--- + +# Other Rust Installation Methods + +- [Which installer should you use?](#which) +- [Other ways to install via `rustup`](#more-rustup) +- [Standalone installers](#standalone) +- [The `rustup.sh` script](#rustup-sh) +- [Obtaining Rust via other package managers](#other) +- [Source code](#source) + +## Which installer should you use? + + +Rust runs on many platforms, and there are many ways to install Rust. If you +want to install Rust in the most straightforward, recommended way, then follow +the instructions on the main [installation page]. + +That page describes installation via [`rustup`], a tool that manages multiple +Rust toolchains in a consistent way across all platforms Rust supports. Why +might one _not_ want to install using those instructions? + +- Offline installation. `rustup` downloads components from the internet on + demand. If you need to install Rust without access to the internet, `rustup` + is not suitable. +- Preference for the system package manager. In Linux in particular, but also on + macOS with [Homebrew], developers sometimes prefer to install Rust with their + platform's package manager. +- Preference against `curl | sh`. On Unix, we usually install `rustup` by + running a shell script via `curl`. Some have concerns about the security of + this arrangement and would prefer to download and run the installer + themselves. +- Validating signatures. Although `rustup` performs its downloads over HTTPS, + the only way to verify the signatures of Rust installers today is to do so + manually with the standalone installers. +- GUI installation and integration with "Add/Remove Programs" on + Windows. `rustup` runs in the console and does not register its installation + like typical Windows programs. If you prefer a more typical GUI installation + on Windows there are standalone `.msi` installers. In the future + `rustup` will also have a GUI installer on Windows. + +Rust's platform support is defined in [three tiers], which correspond closely +with the installation methods available: in general, the Rust project provides +binary builds for all tier 1 and tier 2 platforms, and they are all installable +via `rustup`. Some tier 2 platforms though have only the standard library +available, not the compiler itself; that is, they are cross-compilation targets, +Rust code can run on those platforms, but they do not run the compiler itself. +Such targets can be installed with the `rustup target add` command. + +## Other ways to install via `rustup` + + +The way to install `rustup` differs by platform: + +* On Unix, run `curl https://sh.rustup.rs -sSf | sh` in your + shell. This downloads and runs [`rustup-init.sh`], which in turn + downloads and runs the correct version of the `rustup-init` + executable for your platform. +* On Windows, download and run [`rustup-init.exe`]. + +`rustup-init` can be configured interactively, and all options can additionally +be controlled by command-line arguments, which can be passed through the shell +script. Pass `--help` to `rustup-init` as follows to display the arguments +`rustup-init` accepts: + +``` +curl https://sh.rustup.rs -sSf | sh -s -- --help +``` + +If you prefer not to use the shell script, you may directly download +`rustup-init` for the platform of your choice: + + + +Note that all builds of Rust can target all supported architectures, and on on +Windows, it is always recommended to install using the `i686-pc-windows-gnu` +build of `rustup`, regardless of whether you are targetting the MSVC or GNU ABI, +i686 or x86_64 architecture. Either Windows build of `rustup` will install the +MSVC build of Rust if it detects that MSVC is installed. All four Windows builds +of `rustup` are functionally equivalent, but the MSVC builds have a confusing +(and temporary) limitation: they are dynamically linked to the MSVC runtime, +which may not be installed, causing `rustup` to fail; whereas the GNU builds of +`rustup` are statically linked. On Windows, use the `i686-pc-windows-gnu` build +of `rustup`. + +## Standalone installers + + +The official Rust standalone installers contain a single release of Rust, and +are suitable for offline installation. They come in three forms: tarballs +(extension `.tar.gz`), that work in any Unix-like environment, Windows +installers (`.msi`), and Mac installers (`.pkg`). These installers come with +`rustc`, `cargo`, `rustdoc`, the standard library, and the standard +documentation, but do not provide access to additional cross-targets like +`rustup` does. + +The most common reasons to use these are: + +- Offline installation +- Prefering a more platform-integrated, graphical installer on Windows + +Each of these binaries is signed with the [Rust signing key], which is +[available on keybase.io], by the Rust build infrastructure, with +[GPG]. Validating their signatures provides strong guarantees about their +origins. In the tables below, the `.asc` files are the signatures. + +{% for channel in site.channels %} + +### {{ channel.name | capitalize }} ({{ channel.vers }}) + + + +
+
+ +
+ aarch64-unknown-linux-gnu + .tar.gz + .asc +
+
+ arm-unknown-linux-gnueabi + .tar.gz + .asc +
+
+ arm-unknown-linux-gnueabihf + .tar.gz + .asc +
+
+ i686-apple-darwin + .tar.gz + .asc +
+
+ i686-apple-darwin + .pkg + .asc +
+
+ i686-pc-windows-gnu + .tar.gz + .asc +
+
+ i686-pc-windows-gnu + .msi + .asc +
+
+ i686-pc-windows-msvc + .tar.gz + .asc +
+
+ i686-pc-windows-msvc + .tar.gz + .asc +
+
+ i686-unknown-linux-gnu + .tar.gz + .asc +
+
+ mips-unknown-linux-gnu + .tar.gz + .asc +
+
+ mipsel-unknown-linux-gnu + .msi + .asc +
+
+ mips64-unknown-linux-gnuabi64 + .tar.gz + .asc +
+
+ mips64-unknown-linux-gnuabi64 + .tar.gz + .asc +
+ +
+ +
+ +
+ powerpc-unknown-linux-gnu + .tar.gz + .asc +
+
+ powerpc64-unknown-linux-gnu + .pkg + .asc +
+
+ powerpc64le-unknown-linux-gnu + .tar.gz + .asc +
+
+ s390x-unknown-linux-gnu + .msi + .asc +
+
+ x86_64-apple-darwin + .tar.gz + .asc +
+
+ x86_64-apple-darwin + .pkg + .asc +
+
+ x86_64-pc-windows-gnu + .tar.gz + .asc +
+
+ x86_64-pc-windows-gnu + .msi + .asc +
+
+ x86_64-pc-windows-msvc + .tar.gz + .asc +
+
+ x86_64-pc-windows-msvc + .msi + .asc +
+
+ x86_64-unknown-freebsd + .tar.gz + .asc +
+
+ x86_64-unknown-linux-gnu + .tar.gz + .asc +
+
+ x86_64-unknown-netbsd + .tar.gz + .asc +
+ +
+ +
+ +{% endfor %} + +## The `rustup.sh` script + + +On Unixes, there's a script available for installing the standalone installers, +`rustup.sh` (sometimes confused with `rustup`), which can be conveniently combined +with curl to install Rust from any release channel. + +To install stable Rust: + +``` +curl -sSf https://static.rust-lang.org/rustup.sh | sh +``` + +To install nightly Rust: + +``` +curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly +``` + +## Obtaining Rust via other package managers + + +Rust is packaged by third-parties as well, including Homebrew, Debian, Fedora, +and Arch Linux. The maturity and completeness of third-party packages is +unknown, and Rust makes releases often, so for the most consistent and +up-to-date Rust experience we recommend using the official Rust packages. + +## Source code + + +
+
+
+ Stable + .tar.gz + .asc +
+
+
+
+ Beta + .tar.gz + .asc +
+
+
+
+ Nightly + .tar.gz + .asc +
+
+
+ +[installation page]: install.html +[`rustup`]: https://github.com/rust-lang-nursery/rustup.rs +[other-rustup]: https://github.com/rust-lang-nursery/rustup.rs#other-installation-methods +[`rustup-init.exe`]: https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe +[`rustup-init.sh`]: https://static.rust-lang.org/rustup/rustup-init.sh +[Homebrew]: http://brew.sh/ +[three tiers]: https://forge.rust-lang.org/platform-support.html +[Rust signing key]: https://static.rust-lang.org/rust-key.gpg.ascii +[GPG]: https://gnupg.org/ +[available on keybase.io]: https://keybase.io/rust \ No newline at end of file From fb0056c2d645106c7077b3dc5fe72f21c5b1a3fb Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 29 Nov 2016 10:11:53 -0800 Subject: [PATCH 5/8] Edits --- css/style.css | 44 ++++++----- en-US/index.html | 7 +- en-US/install.html | 154 +++++++++----------------------------- en-US/other-installers.md | 68 +++++------------ 4 files changed, 81 insertions(+), 192 deletions(-) diff --git a/css/style.css b/css/style.css index b876d83f6..7baa2fed2 100644 --- a/css/style.css +++ b/css/style.css @@ -689,39 +689,45 @@ footer a { color: white; background-color: #428BCA; border-radius: 3px; - padding-left: 4rem; - padding-top: 2rem; - padding-bottom: 2rem; + padding: 2rem; margin-top: 4rem; + font-size: 1.5em; + text-align: center; } -.release-info-column > div { - margin-top: 4rem; +.pitch-row .release-version > span { + font-weight: 500; } -.release-info-column > div > div:first-child { +.pitch-row .release-date { + text-align: center; + margin-top: 2rem; +} + +.release-info-column { + text-align: center; + font-weight: 500; +} + +.release-info-column > div { + margin-top: 6rem; + padding-right: 9rem; } .release-info-column .release-version { font-size: 1.5em; - font-weight: 500; } .release-info-column .release-date { - font-weight: 500; + margin-top: 1rem; } -/* de-emphasize the header to draw attention to the instructions */ -h1.rustup, -h1.rustup ~ h2 { - color: #999; - font-size: 2em; /* same as h2 */ - font-size: 2em; - line-height: 1.5em; - margin: 3rem 0 1rem; - font-weight: 400; - border-top: 2px solid #dedede; - padding-top: 1rem; +h1.rustup { + border-top: 0px; +} + +.rustup-row { + margin-bottom: 4rem; } .rustup-init-table { diff --git a/en-US/index.html b/en-US/index.html index 5a3e6ed2c..197d0b31a 100644 --- a/en-US/index.html +++ b/en-US/index.html @@ -14,12 +14,11 @@ See who's using Rust.

- diff --git a/en-US/install.html b/en-US/install.html index 072ea6b41..608d0638f 100644 --- a/en-US/install.html +++ b/en-US/install.html @@ -2,6 +2,10 @@ layout: default title: Installation · The Rust Programming Language --- +

Install Rust

+ +
+
-Note that all builds of Rust can target all supported architectures, and on on +Note that all builds of Rust can target all supported architectures, and on Windows, it is always recommended to install using the `i686-pc-windows-gnu` -build of `rustup`, regardless of whether you are targetting the MSVC or GNU ABI, -i686 or x86_64 architecture. Either Windows build of `rustup` will install the -MSVC build of Rust if it detects that MSVC is installed. All four Windows builds -of `rustup` are functionally equivalent, but the MSVC builds have a confusing -(and temporary) limitation: they are dynamically linked to the MSVC runtime, -which may not be installed, causing `rustup` to fail; whereas the GNU builds of -`rustup` are statically linked. On Windows, use the `i686-pc-windows-gnu` build -of `rustup`. +build of `rustup`, regardless of whether you are targetting the i686 or x86_64 +architecture, the MSVC or GNU ABI. All four Windows builds of `rustup` are +functionally equivalent, and each will install the MSVC build of Rust by +default, but for technical reasons the i686 GNU build of rustup itself should be +preferred. For more information about Rust on Windows see the [`rustup` Windows +documentation][rustup-win]. ## Standalone installers @@ -172,8 +168,7 @@ The most common reasons to use these are: Each of these binaries is signed with the [Rust signing key], which is [available on keybase.io], by the Rust build infrastructure, with -[GPG]. Validating their signatures provides strong guarantees about their -origins. In the tables below, the `.asc` files are the signatures. +[GPG]. In the tables below, the `.asc` files are the signatures. {% for channel in site.channels %} @@ -331,33 +326,6 @@ origins. In the tables below, the `.asc` files are the signatures. {% endfor %} -## The `rustup.sh` script - - -On Unixes, there's a script available for installing the standalone installers, -`rustup.sh` (sometimes confused with `rustup`), which can be conveniently combined -with curl to install Rust from any release channel. - -To install stable Rust: - -``` -curl -sSf https://static.rust-lang.org/rustup.sh | sh -``` - -To install nightly Rust: - -``` -curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly -``` - -## Obtaining Rust via other package managers - - -Rust is packaged by third-parties as well, including Homebrew, Debian, Fedora, -and Arch Linux. The maturity and completeness of third-party packages is -unknown, and Rust makes releases often, so for the most consistent and -up-to-date Rust experience we recommend using the official Rust packages. - ## Source code @@ -391,7 +359,9 @@ up-to-date Rust experience we recommend using the official Rust packages. [`rustup-init.exe`]: https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe [`rustup-init.sh`]: https://static.rust-lang.org/rustup/rustup-init.sh [Homebrew]: http://brew.sh/ +[Chocolatey]: http://chocolatey.org/ [three tiers]: https://forge.rust-lang.org/platform-support.html [Rust signing key]: https://static.rust-lang.org/rust-key.gpg.ascii [GPG]: https://gnupg.org/ -[available on keybase.io]: https://keybase.io/rust \ No newline at end of file +[available on keybase.io]: https://keybase.io/rust +[rustup-win]: https://github.com/rust-lang-nursery/rustup.rs/blob/master/README.md#working-with-rust-on-windows From b878328ebfc82ae668bd5ea54d14900a2f7395d0 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 2 Dec 2016 00:34:45 +0000 Subject: [PATCH 6/8] Remove hr from install page header --- en-US/install.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/en-US/install.html b/en-US/install.html index 608d0638f..4bf53df93 100644 --- a/en-US/install.html +++ b/en-US/install.html @@ -4,8 +4,6 @@ ---

Install Rust

-
-