From nobody Thu Sep 12 01:38:18 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X40T35V5nz5WB8v for ; Thu, 12 Sep 2024 01:38:31 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-vk1-f182.google.com (mail-vk1-f182.google.com [209.85.221.182]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X40T33mmHz4dj6; Thu, 12 Sep 2024 01:38:31 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-vk1-f182.google.com with SMTP id 71dfb90a1353d-502bb8ebd2aso146868e0c.1; Wed, 11 Sep 2024 18:38:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726105110; x=1726709910; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QIkANoCnhHWZYoHMsui9TYUJQ4mQlINDb7OhbdYTfFg=; b=j/2vH/27lp4D7A+yEDp+PXkPmmMN3k0wNCinCmoScUGAxL8RrjHvM1UgJm4PZZnun6 0CjbxXIRR2C0QOK48pmbhkaeIyW4aE9RmE5+oIt/OzBY4ymKcWvnfQ8sLeV8gcTgadWH H6F/wQ6QfA55SQnekwa2/rT7adogUyCRsayXy+0MWU2+PJzKLqulVhDmz43HHJMJMNCP 6rq+pfVtCGVCHtbCsuzd7jwUjH+QLntBep4rbYmLVZ4VJT2o//1nOSM2ytDpr5/qAj7+ lS6RlWqMb4HK6GaoJnU0RxmaHcIw4DVBZ3gDzqoIjHgfr7nUG5BbMdJ//bCw72zcLaxe xl5Q== X-Forwarded-Encrypted: i=1; AJvYcCXeAS7MiDUDo7IghcN9PiKHLlMd2ZxNhQiVB40it6edwbxxq+RXGdW94lYEM6lVJwR7blGNp8C0rJjB7HjfNvY=@freebsd.org X-Gm-Message-State: AOJu0YyUXJigMtXb+3XGxvKBQ0nXneiRih8O++l1FzyRqr8nY6TdF4IE pq85tL5Hs/RCPZwoHUpEPj87glOd9api66DJcAfZfQtRrFFsUPsiVBa/rLr9Krstu1IU4tI9Ohk bWRJjvYZYJgruOY67X3g2BI1dseJUVA== X-Google-Smtp-Source: AGHT+IGTrYz2R0bTt9T6O8tyrmiEfYoSXk1Wx4XeurZykN3xRCagGuk8+GqHYfgkvu45PAzStMqsSW+tU6xi97+caOI= X-Received: by 2002:a05:6122:a02:b0:4f6:b610:61bf with SMTP id 71dfb90a1353d-5032d4bbf94mr1336918e0c.8.1726105109970; Wed, 11 Sep 2024 18:38:29 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 References: <33fc2e5d-f135-4770-9ba6-cfae3a4ad120@freebsd.org> In-Reply-To: <33fc2e5d-f135-4770-9ba6-cfae3a4ad120@freebsd.org> From: Alan Somers Date: Wed, 11 Sep 2024 19:38:18 -0600 Message-ID: Subject: Re: Some rather stupid questions about Rust and FreeBSD To: Charlie Li Cc: Alan Somers , Aryeh Friedman , FreeBSD Mailing List Content-Type: multipart/alternative; boundary="000000000000ecc7140621e229a6" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_RCPT(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4X40T33mmHz4dj6 --000000000000ecc7140621e229a6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Sep 11, 2024, 7:33=E2=80=AFPM Charlie Li wrot= e: > Alan Somers wrote: > > On Wed, Sep 11, 2024 at 3:26=E2=80=AFPM 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? > --000000000000ecc7140621e229a6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Sep 11, 2024, 7:33=E2=80=AFPM Charlie Li <<= a href=3D"mailto:vishwin@freebsd.org">vishwin@freebsd.org> wrote:
Alan Somers wrote:=
> On Wed, Sep 11, 2024 at 3:26=E2=80=AFPM Aryeh Friedman wrote:
>> 1. It takes FOREVER to compile
>
> I assume you mean lang/rust.=C2=A0 It does take FOREVER to compile, be= cause
> it builds its own version of LLVM.=C2=A0 That's why I suggest addi= ng it to
> ALLOW_MAKE_JOBS_PACKAGES , if you're using Poudriere.=C2=A0 Ordina= ry Rust
> programs generally compile at a similar speed as C programs.=C2=A0 Slo= wer
> 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.=C2=A0 I need to try that out. What's the d= ownside? Do you know why it isn't the default?
<= div class=3D"gmail_quote">
--000000000000ecc7140621e229a6--