summaryrefslogtreecommitdiffstats
path: root/development/rust/README.SLACKWARE
blob: 86a0449d9263c317ffa125fc50f795a5c868dca8 (plain)
Bootstrapping rust from source on Slackware

The README describes the official way to bootstrap rust from source by using
the mozilla binary stage0 compiler and binary cargo from rust-lang.org.

If you'd rather bootstap rust completely from source, there is an
experimental, alternative rust compiler written in C++, mrustc. A
slackbuild for it is also available on slackbuilds.org.

For stability against rust's 6 week release cycle, mrustc is frozen to support
building rust 1.19.0 from source. Once this is done, you can use this rust to
continue building each successive rust version until you get to the most recent
one.

Here is a rough guide to bootstrap rust completely from source:

* Build and install mrustc (from slackbuilds.org). You now have a fully
  functional rust 1.19.0.
* Now build for rust 1.20.0, 1.21.0, 1.22.1, 1.23.0, 1.24.1, 1.25.0, and finally
  1.26.2.

This slackbuild is currently compatible with each of those versions.
Since we are building completely from source, you only need the source
tarball of each version and not all the other binary files listed in
rust.info. Simply replace the version in the url.

Example:

    VERSION=1.20.0 FULL_BOOTSTRAP=yes LOCAL_BOOTSTRAP=yes ./rust.SlackBuild
    VERSION=1.21.0 FULL_BOOTSTRAP=no  LOCAL_BOOTSTRAP=yes ./rust.SlackBuild
    VERSION=1.22.1 FULL_BOOTSTRAP=no  LOCAL_BOOTSTRAP=yes ./rust.SlackBuild
    VERSION=1.23.0 FULL_BOOTSTRAP=no  LOCAL_BOOTSTRAP=yes ./rust.SlackBuild
    VERSION=1.24.1 FULL_BOOTSTRAP=no  LOCAL_BOOTSTRAP=yes ./rust.SlackBuild
    VERSION=1.25.0 FULL_BOOTSTRAP=no  LOCAL_BOOTSTRAP=yes ./rust.SlackBuild
    VERSION=1.26.2 FULL_BOOTSTRAP=no  LOCAL_BOOTSTRAP=yes ./rust.SlackBuild

You might prefer to do a full bootstrap for 1.20.0, which is what mrustc's own
bootstrap script suggests. The versions after that do not need a full bootstrap.

After building the first version (1.20.0), remove mrustc and install
rust-1.20.0. Then build the next version and upgrade rust with the
result and carry on until you have built the final version.

Additionally, I currently have a shell script which automates this whole
process to end up with the current rust package version:

https://github.com/aclemons/slack-rust-bootstrap