help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rust development tools


From: mikadoZero
Subject: Re: Rust development tools
Date: Thu, 18 Apr 2019 16:23:36 -0400
User-agent: mu4e 1.2.0; emacs 26.2

Ivan Petkov writes:

> Hi!
>
>> On Apr 17, 2019, at 7:26 PM, mikadoZero <address@hidden> wrote:
>
> The rust integrations within Guix are a bit incomplete at the moment, but 
> I’ve been
> making some efforts to get things going. Right now it is possible to build 
> individual
> crates but with a *ton* of manual intervention in the package definitions. 
> I’m working
> on another change that should make it possible to start packaging rust based
> packages/applications into Guix, hoping to share something next week.
>

Thank you for working on this.

>> If cargo is not packaged are people who are using rust with Guix System
>> using rustc and manually managing their dependencies?
>
> Cargo is packaged in Guix today, however, it is exposed as an output of the 
> rust
> package (http://guix.info/manual/en/Packages-with-Multiple-Outputs.html 
> <http://guix.info/manual/en/Packages-with-Multiple-Outputs.html>).
>

Thanks for pointing out this useful section of the manual out.

> This confused me a bit the first time I installed rust on Guix as well. 
> You’ll need
> to run `guix package -i rust:cargo` to make it available. Perhaps the Guix 
> search
> needs updated to also search for matching package outputs…
>

I was able to install cargo by adding `rust:cargo` to a manifest
configuration file.

> As for extra tools like rls, rustfmt, and clippy: these are usually 
> distributed with
> the compiler source tarball. Currently they are not being build/packaged as
> outputs because no one has done the work to expose them as such.
>
> If you’re interested in using them, I encourage you to try exposing them in 
> the
> rust package definitions! If you need any help, feel free to reach out!
>

I think I would consider attempting clippy.  Would exposing it be
similar to cargo?  Searching through `rust.scm` cargo is all over the
place.  Would exposing clippy be as far reaching and extensive?

I am new to packaging for Guix.  I just had my first patch for a package
committed just the other day.  I have not yet learned Guile.  Would
adding clippy as an output be overly ambitious?  Should I learn Guile
first?

>> Are there any special considerations for Guix packages that provide
>> programs like cargo and rustup that are also package managers?
>> 
>> How does Guix deal with something like rust nightly releases if at all?
>
> Guix does not package nightly rust, and I don’t anticipate it ever will. 
> Getting
> the rust compiler built and packaged into rust takes a little bit of effort,
> and it would be impossible to keep up with the nightlies by hand.
>
> Rustup seems to be the right way to make alternative rust toolchains available
> and maintained outside of the Guix store. The last time I tried to install 
> rustup
> via the conventional installer, it failed to run on my machine outright, 
> probably
> because all necessary artifacts are in the store and not in the usual Linux 
> distro
> locations.
>
> Once the Guix cargo build system is flushed out a bit more, I anticipate it 
> should
> be possible to define and build rustup as a Guix package.

It is good to hear about a potential way to use rust nightly on Guix.

>
> —Ivan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]