What is the exact script used to build the stable Rust toolchain binary from source?
Including the std libraries that is cross compiled.
Ideally, it should be identical to the official release.
The process described in Rust Forge is for updating the release channels to a new release, and that isn't what you want to do (unless you are maintaining a fork of Rust with its own similar infrastructure). For instructions on compiling the compiler, see this page in the rustc dev guide. The page on bootstrapping may also be of interest. The main script to use for the build process is x.py.
You'll probably want to start from github-actions/ci.yml, lookup the dist- job for the platform you're interested in and then look up the scripts it uses.
Note that on several major platforms we compile with PGO which can give different results on different runs. We do ship the actual PGO profiles we used in the reproducible-artifacts component, but I think you will have to wire up these profiles yourself to the build process in the place of the first build step to generate the PGO profiles.