Rust


Rust is a multi-paradigm programming language designed for performance and safety, especially safe concurrency.

Wikipedia


Installation

Install rust with:

$ guix package -i rust
$ guix install rust:cargo

This will give you access to:

  • rustc
  • cargo

Usage

To compile a single file:

rustc run main.rs

To create a new project, and run it’s content:

$ cargo new hello_world
     Created binary (application) `hello_world` package
$ cd hello_world
$ cargo run
   Compiling hello_world v0.1.0 (/home/franz/git/hello_world)
    Finished dev [unoptimized + debuginfo] target(s) in 2.47s
     Running `target/debug/hello_world`
Hello, world!

Compilation issues

error occurred: Failed to find tool. Is cc installed?

export CC='ccmake'

PantherX & (unofficial) GNU Guix Wiki.

Last update: 2021-10-12 20:09:22 +0000

Inspired by the excellent Arch Linux Wiki