From: Antoni Boucher <bouanto@zoho.com>
To: Sam James <sam@gentoo.org>,
"brian m. carlson" <sandals@crustytoothpaste.net>
Cc: me@ttaylorr.com, git@vger.kernel.org,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
Helge Deller <deller@gmx.de>,
John David Anglin <dave.anglin@bell.net>,
arsen@gentoo.org
Subject: Re: [DISCUSS] Introducing Rust into the Git project
Date: Fri, 12 Jan 2024 09:46:54 -0500 [thread overview]
Message-ID: <b6fc8dd7be709b350bd50fa507ae03f4c3c89d8d.camel@zoho.com> (raw)
In-Reply-To: <87jzofrlm4.fsf@gentoo.org>
While usable, there are a few things missing in rustc_codegen_gcc:
* Unwinding doesn't work correctly when compiling Rust code in release
mode.
* Rustup distribution: might not be mandatory, but I guess it would be
very helpful to have an easy way to install rustc_codegen_gcc and being
able to pin to a specific version.
* Debug info: again might not be mandatory, but would be helpful.
* Have not been tested on many platforms: these platforms had a few
tests, so while it's possible to use Rust on them, that doesn't mean
everything works (in particular, I know that changes will be needed to
both the Rust spec file and the standard library — or its tests — for
m68k): SuperH, ARC, m68k [1] and there's currently someone
experimenting on AVR. Related to the platform support, could you please
send me a list of platforms where git is officially supported?
* Not sure if it would be needed, but the new inline asm syntax is not
supported on architectures not supported by rustc.
* I also expect bad compilation in some cases.
> Is this simply library support in the libc crate? That's very easy
to add.
We might also need to update the object crate.
As for the progress, we plan to have most of the patches merged for
libgccjit 14, but one important one will be missing because it's not
ready (the one for try/catch that is necessary to support Rust panics).
I expect there will be much less patches for libgccjit 15: probably
try/catch and bug fixing for the most part.
We also plan to have rustup distribution in the coming months, so
that's something that will help for adoption.
Along with rustup distribution, we plan on making architectures
currently not supported by rustc usable more easily in the coming
months.
Recently, I built and ran the tests of a dozen of the most popular
crates and all of their tests passed [2]. And rustc_codegen_gcc was
already able to build the Rust compiler in March 2022 and while not
completely working, the resulting compiler could compile a "Hello,
world!" [3].
[1] https://github.com/rust-lang/rustc_codegen_gcc/wiki
[2]
https://blog.antoyo.xyz/rustc_codegen_gcc-progress-report-26#state_of_compiling_popular_crates
[3] https://blog.antoyo.xyz/rustc_codegen_gcc-progress-report-10
On Fri, 2024-01-12 at 08:24 +0000, Sam James wrote:
>
> "brian m. carlson" <sandals@crustytoothpaste.net> writes:
>
> > [[PGP Signed Part:Undecided]]
> > On 2024-01-11 at 11:45:07, Sam James wrote:
> > > Something I'm a bit concerned about is that right now, neither
> > > rustc_codegen_gcc nor gccrs are ready for use here.
> > >
> > > We've had trouble getting things wired up for rustc_codegen_gcc
> > > - which is not to speak against their wonderful efforts - because
> > > the Rust community hasn't yet figured out how to handle things
> > > which
> > > pure rustc supports yet. See
> > > e.g. https://github.com/rust-lang/libc/pull/3032.
> >
> > Is this simply library support in the libc crate? That's very easy
> > to add.
>
> [CC'd the rustc_codegen_gcc maintainer as well as some folks who have
> tried using rustc_codegen_gcc for their distributions.]
>
> Evidently not on the last point? ;)
>
> Even just patching it in downstream isn't easy because you then have
> to
> do it for many many packages. But after that PR stalling because of
> the
> policy issue, there wasn't really anywhere to go, because of the
> chicken-and-egg situation.
>
> Let alone then, once the libc crate has it, going around and wiring
> up
> in other crates.
>
> The discussion on the PR seems clear that the intention is to not add
> it until some policy is revised/formulated? I also don't want to have
> to have that debate with every crate just because rustc doesn't
> support
> it.
>
> >
> > > I think care should be taken in citing rustc_codegen_gcc and
> > > gccrs
> > > as options for alternative platforms for now. They will hopefully
> > > be great options in the future, but they aren't today, and they
> > > probably
> > > won't be in the next 6 months at the least.
> >
> > What specifically is missing for rust_codegen_gcc? I know gccrs is
> > not
> > ready at the moment, but I was under the impression that
> > rust_codegen_gcc was at least usable. I'm aware it requires some
> > patches to GCC, but distros should be able to carry those.
> >
> > If rust_codegen_gcc isn't viable, then I agree we should avoid
> > making
> > Rust mandatory, but I'd like to learn more.
>
> It's in a general state of instability. There's still *very* active
> work
> ongoing in libgccjit (by the rust_codegen_gcc maintainer).
>
> I'd say "you need to patch your GCC" is probably not a good state of
> affairs for using something critical like git anyway, but even then,
> I'm not aware of anyone having used it to build real-world common
> applications using Rust for a non-rustc-supported platform, at least
> not then using those builds day-to-day.
>
> So, even if we were willing to chase the active flurry of libgccjit
> patches (which is wonderful to see!), it's a significant moving
> target. In Gentoo, we're probably better-placed than most people
> to be able to do that, but it's still a lot of work and it doesn't
> sound very robust for us to be doing for core infrastructure.
>
> We have a lot of packages in Gentoo - partly actually stuff in the
> Python ecosystem - where we're very excited to be able to use
> rust_codegen_gcc (or gccrs, whichever comes first inreadiness, surely
> rust_codegen_gcc) for alt platforms, but it's just not there yet.
next prev parent reply other threads:[~2024-01-12 14:47 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-10 20:16 [DISCUSS] Introducing Rust into the Git project Taylor Blau
2024-01-10 21:57 ` Dragan Simic
2024-01-10 22:11 ` Junio C Hamano
2024-01-10 22:15 ` rsbecker
2024-01-10 22:26 ` Taylor Blau
2024-01-10 23:52 ` rsbecker
2024-01-11 0:59 ` Elijah Newren
2024-01-11 1:44 ` rsbecker
2024-01-11 2:21 ` Elijah Newren
2024-01-11 2:57 ` rsbecker
2024-01-11 5:06 ` Elijah Newren
2024-01-11 6:56 ` Patrick Steinhardt
2024-01-11 13:07 ` rsbecker
2024-01-11 2:55 ` brian m. carlson
2024-01-11 3:24 ` rsbecker
2024-01-11 20:07 ` Trevor Gross
2024-01-11 21:28 ` rsbecker
2024-01-11 23:23 ` Trevor Gross
2024-01-22 23:17 ` Defining a platform support policy (Was: [DISCUSS] Introducing Rust into the Git project) Emily Shaffer
2024-01-23 0:11 ` rsbecker
2024-01-23 0:57 ` Defining a platform support policy Junio C Hamano
2024-01-23 0:31 ` Junio C Hamano
2024-01-24 7:54 ` Defining a platform support policy (Was: [DISCUSS] Introducing Rust into the Git project) Elijah Newren
2024-01-10 23:40 ` [DISCUSS] Introducing Rust into the Git project brian m. carlson
2024-01-11 0:33 ` Elijah Newren
2024-01-11 5:39 ` Dragan Simic
2024-01-11 16:57 ` Elijah Newren
2024-01-17 21:30 ` Dragan Simic
2024-01-24 4:15 ` Elijah Newren
2024-01-24 5:14 ` Dragan Simic
2024-01-11 0:12 ` Elijah Newren
2024-01-11 5:33 ` Dragan Simic
2024-01-11 1:56 ` brian m. carlson
2024-01-11 11:45 ` Sam James
2024-01-11 23:48 ` brian m. carlson
2024-01-12 8:24 ` Sam James
2024-01-12 14:46 ` Antoni Boucher [this message]
2024-01-11 23:53 ` Trevor Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b6fc8dd7be709b350bd50fa507ae03f4c3c89d8d.camel@zoho.com \
--to=bouanto@zoho.com \
--cc=arsen@gentoo.org \
--cc=dave.anglin@bell.net \
--cc=deller@gmx.de \
--cc=git@vger.kernel.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=me@ttaylorr.com \
--cc=sam@gentoo.org \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).