public inbox for linux-bcachefs@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Bertschinger <tahbertschinger@gmail.com>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: linux-bcachefs@vger.kernel.org, bfoster@redhat.com
Subject: Re: [PATCH TOOLS 0/2] convert main() from C to Rust
Date: Mon, 15 Jan 2024 10:55:09 -0700	[thread overview]
Message-ID: <20240115175509.GA156208@fedora-laptop> (raw)
In-Reply-To: <pawxsqxbjncrwtxytattvgizwrtmkis6suokgkb6wfm5xvsnhd@njjz4ywheu2a>

On Mon, Jan 15, 2024 at 12:32:23PM -0500, Kent Overstreet wrote:
> I think there's some more rearraging we could do - it'd be cleaner if we
> moved the C sources out of the top level directory, perhaps to c_src,
> and then moved everything in rust-src/ to the toplevel.
> 
> Top level directory is getting a bit crowded, and then the new bcachefs
> binary won't be quite so out of the way; I frequently build and run
> without installing when I'm debugging.

I agree this makes sense. I'll work on a v2 that does this.

Thoughts on keeping Make as the top-level build tool vs. using Cargo? I
am still fairly new to Rust/Cargo so I'm not sure how easy it would be
to replicate all of the Makefile targets in Cargo. It does appear to be
possible to use Cargo to invoke gcc to build the C library.

I can see three approaches:
- keep Make as the primary build tool
- hybrid: use Cargo for source code building but keep the Makefile around
  for the supplemental targets like "make doc", "make rpm", etc.
- use Cargo for everything (not sure if this is easy / possible, but I
  could look into it if desired)

I'm leaning towards keeping Make as the primary build tool for now and
perhaps a future patch can move towards using Cargo. But other opinions
are welcome.

- Thomas Bertschinger

  reply	other threads:[~2024-01-15 17:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-15  5:24 [PATCH TOOLS 0/2] convert main() from C to Rust Thomas Bertschinger
2024-01-15  5:24 ` [PATCH TOOLS 1/2] " Thomas Bertschinger
2024-01-15  5:24 ` [PATCH TOOLS 2/2] remove library from bcachefs-tools Rust package Thomas Bertschinger
2024-01-15 17:32 ` [PATCH TOOLS 0/2] convert main() from C to Rust Kent Overstreet
2024-01-15 17:55   ` Thomas Bertschinger [this message]
2024-01-15 18:45     ` Kent Overstreet
2024-01-15 19:10       ` Thomas Bertschinger
2024-01-15 19:22         ` Kent Overstreet
2024-01-19 19:05           ` Trevor Gross
2024-01-19 21:37             ` Kent Overstreet
2024-01-21 16:11               ` packed, aligned structs in bcachefs (was: Re: [PATCH TOOLS 0/2] convert main() from C to Rust) Thomas Bertschinger
2024-01-21 18:19                 ` Kent Overstreet
2024-01-21 19:32                   ` Thomas Bertschinger
2024-01-22  2:47                     ` Thomas Bertschinger
2024-01-15 17:48 ` [PATCH TOOLS 0/2] convert main() from C to Rust Kent Overstreet
2024-01-15 17:57   ` Thomas Bertschinger

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=20240115175509.GA156208@fedora-laptop \
    --to=tahbertschinger@gmail.com \
    --cc=bfoster@redhat.com \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-bcachefs@vger.kernel.org \
    /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