guix-devel
[Top][All Lists]
Advanced

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

Re: the importance of rust-build-system [Fwd: [tor-dev] Tor in a safer l


From: ng0
Subject: Re: the importance of rust-build-system [Fwd: [tor-dev] Tor in a safer language: Network team update from Amsterdam]
Date: Thu, 7 Dec 2017 20:59:21 +0000

Hi,

my apologies. Occasionally I have a tendency for
very late replies in some threads, as you might have noticed.

Danny Milosavljevic transcribed 1.9K bytes:
> Hi ng0,
> 
> On Sat, 1 Apr 2017 07:58:41 +0000
> ng0 <address@hidden> wrote:
> 
> > Danny, could you list what's left for completion? Is it just circular
> > dependencies? 
> 
> Very little is missing:
> - Rustc and cargo should be disentangled.  Right now they have to be updated 
> in lockstep.

That's not really a problem for producing functional rust crate binaries.
I consider this optional. Or am I wrong?

> - Rust has a new optional maker (instead of makefiles) called rustbuild;
> for some reason I didn't get it to work.  Future versions will drop
> the makefiles, so we have to get it to work eventually.

Can you share the issues you had with this? How far did you come?

> - Eventually we could try to bootstrap a Rust compiler from the
> original ocaml sources.  I'm trying to do that now but it's still
> broken. It would be fine to make it memory-safe by just not
> freeing anything ever - since it would only be used to compile the
> Rust compiler.

Wouldn't it be easier to help the mrustc project, which is aimed at just that 
(bootstrapping rustc) in the long run?
Is it even possible at this point to bootstrap rustc using OCaml without 
wasting too much resources?
They've come a long way and many releases since they've gone selfhosted.

Can you share your findings and work on this?

> - Earlier we had an heuristic in that if there's a Cargo.lock file present we 
> assume
> that it's an application, and if there isn't one we assume that it's a 
> library.
> Not sure how safe that heuristic is.  What's the official way to find out 
> what it is?

> - There's a design limitation in that our rust build system doesn't API 
> support
> version ranges but cargo does.  If multiple libraries depend on the same 
> library
> with differing API version ranges, cargo uses an version range intersection
> algorithm in order to find out which implementation version to use.
> We don't do that - although we do use cargo, so it will fail in that case (and
> not do something invalid silently).

Can you explain this a bit more in detail? You seem to have put more time to
work/think about these issues than I have done so far.
I need to understand most of the issues, so that I can communicate them to
people who'd work on them. At least to get them started on the issues.

> Note that Rust itself makes a distinction between stable features that
> are guaranteed to stay and stay
> the same in the future and unstable features that don't.
> Many Rust crates use unstable features, among them very basic crates.
> That makes us unable to use them, and rightfully so.

You mean fundamental basic crates required by many applications?
Do you have some insight into the implications of this?
I would provide a rustc-nightly outside of Guix master/official,
that's not an issue for me.

> 
> Other than that I've got a big number of (unpolished) Rust packages that do 
> work.

Can you share these package definitions somewhere? I'd like
to help out and see how many intersections (duplicates) we
both have in our unfinished rust crates work.

> > days. I hope you don't mind if I list you as a go-to person for getting
> > involved in upstream (Guix) to fix up the rust-build-system.
> 
> Okay.

-- 
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://c.n0.is/ng0_pubkeys/tree/keys
  WWW: https://n0.is

Attachment: signature.asc
Description: PGP signature


reply via email to

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