- https://forge.rust-lang.org/infra/channel-layout.html
- https://forge.rust-lang.org/infra/other-installation-methods.html
Guix Rustup
In case you want to use this channel, add the following code to
your ~~/.config/guix/channels.scm~, and call guix pull
.
(cons*
(channel
(name 'rustup)
(url "https://github.com/declantsien/guix-rustup")
(introduction
(make-channel-introduction
"325d3e2859d482c16da21eb07f2c6ff9c6c72a80"
(openpgp-fingerprint
"F695 F39E C625 E081 33B5 759F 0FC6 8703 75EF E2F5"))))
%default-channels)
guix search rust-toolchain
guix build -e '((@@ (rustup build toolchain) rustup) "stable")' guix build -e '((@@ (rustup build toolchain) rustup) "beta")' guix build -e '((@@ (rustup build toolchain) rustup) "nightly")'
(use-modules (rustup build toolchain))
;; (packages->manifest (list (rustup "nightly-2024-05-18")))
(packages->manifest (list (rustup)))
rustup-toolchain
rustup-toolchain.toml
Procedure rustup
will search for these two file in parent folders like
guix shell
search for mainfest.scm
file. You can manully specify the
location of the toolchain file with (rustup "path/to/rust-toolchain")
(define* (rustup #:optional (channel-or-toolchain-file #f)
#:key
(components (list ))
(targets (list ))
(profile 'default))
...)
Procedure make-cargo-build-system
takes the same arguments(toolchain spec)
as rustup
. Which will replace the default rustc/cargo with rust-toolchain
requested by toolchain spec
(package (name "rust-*") (build-system (make-cargo-build-system "nightly-2024-01-25")) ...)
export RUSTUP_DIST_SERVER="https://mirrors.ustc.edu.cn/rust-static"