4
6
Fork
You've already forked guix-rustup
1
Rust binary toolchain channel for Guix
  • Scheme 99.1%
  • Roff 0.9%
Find a file
2026年02月17日 15:01:01 +08:00
.github/workflows Fix gh ci 2026年02月01日 18:30:33 +08:00
etc Sanitize profile string 2024年05月24日 09:58:29 +08:00
guix add s390x-unknown-none-softfloat 2026年02月17日 15:01:01 +08:00
scripts Added notes regarding guile required modules 2025年07月21日 15:40:27 +08:00
.dir-locals.el Init 2024年05月13日 15:57:51 +08:00
.editorconfig Init 2024年05月13日 15:57:51 +08:00
.envrc Document channel introductions 2024年05月22日 08:21:46 +08:00
.gitattributes Init 2024年05月13日 15:57:51 +08:00
.gitignore Init 2024年05月13日 15:57:51 +08:00
.guix-authorizations Channel introduction 2024年05月13日 15:58:01 +08:00
.guix-channel migrating to Codeberg.org 2026年02月01日 13:30:37 +08:00
BUG Init 2024年05月13日 15:57:51 +08:00
NEWS Add news entry regarding codeberg migrating 2026年02月01日 13:31:39 +08:00
README.org migrating to Codeberg.org 2026年02月01日 13:30:37 +08:00
TODO.org Document channel introductions 2024年05月22日 08:21:46 +08:00

Guix Rustup

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"