public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Mike Hommey <mh@glandium.org>
Cc: git@vger.kernel.org, gitster@pobox.com, ps@pks.im
Subject: Re: [RFC PATCH] Move rust gitcore crate to a different subdirectory
Date: Thu, 5 Feb 2026 02:06:32 +0000	[thread overview]
Message-ID: <aYP7KKD1tDsormI3@fruit.crustytoothpaste.net> (raw)
In-Reply-To: <5h7fs4smilvvuqyry4uef3rjgky5woodmapb3fy72src2hvlzv@o3bbh7zxqqvt>

[-- Attachment #1: Type: text/plain, Size: 2231 bytes --]

On 2026-02-05 at 01:45:53, Mike Hommey wrote:
> On Thu, Feb 05, 2026 at 12:10:28AM +0000, brian m. carlson wrote:
> > On 2026-02-04 at 23:22:08, Mike Hommey wrote:
> > > While `src/` is the default directory convention for Rust projects, it
> > > is too generic in the context of a multi-language project that is barely
> > > starting to (optionally) use Rust code.
> > > 
> > > Additionally, having `Cargo.toml` at the top-level of the repository
> > > implies that one can run `cargo build` directly, but this doesn't
> > > produce anything useful on its own.
> > > 
> > > Moving all Rust-specific files into a dedicated `rust/` subdirectory
> > > makes things clearer.
> > 
> > If we're going to do this, we should place the `src` directory under the
> > `rust` subdirectory to maintain the normal layout.  There are many tools
> > that depend on this repository layout and we want to make it as easy as
> > possible for people to use native, standard tooling to build things.
> 
> Not that I'm going to argue your preference, but I'm curious what tools
> you'd know that would not support a layout different than the typical
> one, because that means they're broken with some existing crates (e.g.
> those from https://github.com/servo/servo/) and should probably be
> fixed.

One of my goals is to see if we can get Git's Rust code to compile with
mrustc since that might make it easier for NonStop, as well as some
Linux OSes on obsolete architectures.

I can tell you from my experience that mrustc's cargo implementation is
extremely limited and does only the bare minimum in terms of
functionality.  It already needs some help to work with static
libraries, but I'd really like to minimize the work that needs to be
done on it since it's not lovely code, and using a standard layout is
going to help with minimizing the necessary changes.  I will admit that
I haven't tested using a non-standard layout, but I fully expect it will
not work based on my experience of the codebase.

Certainly people may think this is folly, but it costs nothing for us to
keep the standard layout and make the porting process a little easier.
-- 
brian m. carlson (they/them)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2026-02-05  2:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-04 23:22 [RFC PATCH] Move rust gitcore crate to a different subdirectory Mike Hommey
2026-02-05  0:10 ` brian m. carlson
2026-02-05  1:45   ` Mike Hommey
2026-02-05  2:06     ` brian m. carlson [this message]
2026-02-05  4:55       ` Mike Hommey
2026-02-09 22:48 ` [PATCH v2] " Mike Hommey

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=aYP7KKD1tDsormI3@fruit.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mh@glandium.org \
    --cc=ps@pks.im \
    /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