AUTHOR: rhubarbpieguy@vivaldi.net

DATE: 2024-08-12

LICENSE: GNU Free Documentation License Version 1.3

SYNOPSIS: Compiling rustc without an internet connection.

DESCRIPTION:
The rustc documentation requires an internet connection when compiling to
download dependencies not included in the source tarball. This hint presents
a method to avoid an internet connection when compiling.

ATTACHMENTS: none

PREREQUISITES:
This hint requires that you have sufficient knowledge of LinuxFromScratch.
This hint is applicable only for users that follow the LFS development book
as of the submission date above.

HINT:
   DOWNLOADING DEPENDENCIES
   ------------------------
From the rustc source directory, edit src/stage0. Select one dependency
file each of cargo, rustc, and rust-std for your system. Use .xz, not .gz files.
Examples below:

   dist/2024-06-13/cargo-1.79.0-x86_64-unknown-linux-gnu.tar.xz
   dist/2024-06-13/rustc-1.79.0-x86_64-unknown-linux-gnu.tar.xz
   dist/2024-06-13/rust-std-1.79.0-x86_64-unknown-linux-gnu.tar.xz

Download the dependencies from https://static.rust-lang.org to a location of
your choice. Note the yyyy-mm-dd string in the dependency files for later use.
From the examples use 2024-06-13.

   COMPILING
   ---------
From the source directory, mkdir -pv build/cache/2024-06-13 (using above string).
Copy the downloaded dependencies to build/cache/2024-06-13.

Follow the documentation and rustc will compile without an internet connection.

ACKNOWLEDGEMENTS:

CHANGELOG:

[2023-04-25]
  * Initial hint.

[2024-08-10]
  * Changed src/stage0.json to src/stage0.
  * Updated examples to rustc-1.80.0.

[2024-08-12]
  * Changed "Examples using rustc-1.80.0." to Examples below:" to avoid confusion.
  * Changed (use above string) to (using above string) for clarity.