Rust binary toolchain channel for Guix
- Scheme 99.1%
- Roff 0.9%
| .github/workflows | Fix gh ci | |
| etc | Sanitize profile string | |
| guix | add s390x-unknown-none-softfloat | |
| scripts | Added notes regarding guile required modules | |
| .dir-locals.el | Init | |
| .editorconfig | Init | |
| .envrc | Document channel introductions | |
| .gitattributes | Init | |
| .gitignore | Init | |
| .guix-authorizations | Channel introduction | |
| .guix-channel | migrating to Codeberg.org | |
| BUG | Init | |
| NEWS | Add news entry regarding codeberg migrating | |
| README.org | migrating to Codeberg.org | |
| TODO.org | Document channel introductions | |
Guix Rustup
- https://forge.rust-lang.org/infra/channel-layout.html
- https://forge.rust-lang.org/infra/other-installation-methods.html
Overview
Guix Rustup
Channel introduction
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://codeberg.org/declantsien/guix-rustup")
(introduction
(make-channel-introduction
"325d3e2859d482c16da21eb07f2c6ff9c6c72a80"
(openpgp-fingerprint
"F695 F39E C625 E081 33B5 759F 0FC6 8703 75EF E2F5"))))
%default-channels)
Usage
For stable Rusts
guix search rust-toolchain
For latest nightly/beta
guix build -e '((@@ (rustup build toolchain) rustup) "stable")'
guix build -e '((@@ (rustup build toolchain) rustup) "beta")'
guix build -e '((@@ (rustup build toolchain) rustup) "nightly")'
With guix shell manifest.scm
(use-modules (rustup build toolchain))
;; (packages->manifest (list (rustup "nightly-2024年05月18日")))
(packages->manifest (list (rustup)))
Rustup toolchain file
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")
rustup arguments
(define* (rustup #:optional (channel-or-toolchain-file #f)
#:key
(components (list ))
(targets (list ))
(profile 'default))
...)
cargo-build-system
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日"))
...)
Using rustup dist server mirror
export RUSTUP_DIST_SERVER="https://mirrors.ustc.edu.cn/rust-static"