Re: Some rather stupid questions about Rust and FreeBSD

From: Alan Somers <asomers_at_freebsd.org>
Date: Thu, 12 Sep 2024 01:38:18 UTC
On Wed, Sep 11, 2024, 7:33 PM Charlie Li <vishwin@freebsd.org> wrote:

> Alan Somers wrote:
> > On Wed, Sep 11, 2024 at 3:26 PM Aryeh Friedman wrote:
> >> 1. It takes FOREVER to compile
> >
> > I assume you mean lang/rust.  It does take FOREVER to compile, because
> > it builds its own version of LLVM.  That's why I suggest adding it to
> > ALLOW_MAKE_JOBS_PACKAGES , if you're using Poudriere.  Ordinary Rust
> > programs generally compile at a similar speed as C programs.  Slower
> > than Go, but faster than C++.
> >
> rustc (lang/rust) supports using an existing LLVM toolchain
> (devel/llvm*). Since LLVM 8.0, the Rust Project maintain their copy of
> LLVM nearly the same way we do in base, and as such track the latest two
> release branches. Using the PORT_LLVM option in the port reduces the
> build time significantly (from not building LLVM) with no change in
> runtime behaviour.
>

Oh, sweet.  I need to try that out. What's the downside? Do you know why it
isn't the default?

>