all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Philip McGrath" <philip@philipmcgrath.com>
To: "Pjotr Prins" <pjotr.public12@thebird.nl>, jgart <jgart@dismail.de>
Cc: "Brian Cully" <guix-devel@gnu.org>
Subject: Re: Can zig-build-system  be an alternative to the gnu-build-system?
Date: Thu, 02 Feb 2023 12:52:28 -0500	[thread overview]
Message-ID: <87b04cb1-6b0a-4fcf-836c-6b5763768fba@app.fastmail.com> (raw)
In-Reply-To: <20230201101127.eiq7unzgdbzidnky@thebird.nl>

Hi Pjotr,

On Wed, Feb 1, 2023, at 5:11 AM, Pjotr Prins wrote:
>
> There have been some older discussions about creating our own
> replacement for autotools, cmake and others. I often fight these make
> make systems - and meson and/or language specific build systems. It is
> a time waster for programmers and none of these systems leverages the
> power of Guix itself. I kinda settled for cmake because, even though
> it is an effing dragon, at least I can make it work (pun intended).
>
> We need someone with deep experience in build systems to write a guile
> replacement - generating ninja is one idea. That is my opinion :). I
> would love a simple way to describe a project in guile. It should not
> be too hard actually (famously that is how these projects start and
> turn out to be a real time sink). Maybe someone wants to try with
> guidance from us, or maybe we can do it when we get bored some day.
>

You might be interested in Zuo, which was created to replace the work of `make` in the build system for Racket and Racket's branch of Chez Scheme. (The name comes from a Chinese word for "make".) It's packaged for Guix: https://packages.guix.gnu.org/packages/zuo/

The documentation is at: https://docs.racket-lang.org/zuo/

One important aspect is that the primary implementation is *not* in Racket or Guile: a single C source file implements the tiny Scheme-like language, and most of the functionality is implemented in the Zuo language. This simplifies bootstrapping, and it also means that, if your project already needs a C compiler, you can add Zuo without adding a build dependency on another scripting language. (On unfriendly systems like Windows, even requiring Python can be a significant complication.)

By design, Zuo does not try to replace the `configure` part of your build system: Racket uses Autoconf, and Chez has its own custom `configure` script. Similarly, it works well to have a stub Makefile that just runs Zuo, and Zuo even cooperates with the GNU Make jobserver. When Racket adopted Zuo, almost all make-based workflows continued to work unchanged.

The build system part of Zuo is modeled on Shake (used by GHC). The paper "Build Systems à la Carte" is a nice overview of the design space: https://dl.acm.org/doi/pdf/10.1145/3236774

The thread about replacing Racket's build scripts is here: https://github.com/racket/racket/pull/4179

-Philip


  parent reply	other threads:[~2023-02-02 17:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27  2:03 Can zig-build-system be an alternative to the gnu-build-system? jgart
2023-02-01 10:11 ` Pjotr Prins
2023-02-01 15:37   ` Blake Shaw
2023-02-02 17:52   ` Philip McGrath [this message]
2023-02-02 18:33     ` zuo build system; formerly: " Pjotr Prins
2023-02-01 14:31 ` Ekaitz Zarraga
2023-02-01 15:45 ` jgart
2023-02-01 15:47   ` Ekaitz Zarraga
2023-02-01 15:51   ` jgart
  -- strict thread matches above, loose matches on Subject: below --
2023-02-01 22:46 Nathan Dehnel

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=87b04cb1-6b0a-4fcf-836c-6b5763768fba@app.fastmail.com \
    --to=philip@philipmcgrath.com \
    --cc=guix-devel@gnu.org \
    --cc=jgart@dismail.de \
    --cc=pjotr.public12@thebird.nl \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.