* Can zig-build-system be an alternative to the gnu-build-system?
@ 2023-01-27 2:03 jgart
2023-02-01 10:11 ` Pjotr Prins
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: jgart @ 2023-01-27 2:03 UTC (permalink / raw)
To: guix-devel
Can `zig-build-system` be an alternative to the `gnu-build-system`?
https://ziglang.org/learn/why\_zig\_rust\_d\_cpp/#a-package-manager-and-build-system-for-existing-projects
> Not only can you write Zig code instead of C or C++ code, but you can use Zig as a replacement for autotools, cmake, make, scons, ninja, etc. And on top of this, it (will) provide a package manager for native dependencies. This build system is intended to be appropriate even if the entirety of a project’s codebase is in C or C++.
WDYT
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Can zig-build-system be an alternative to the gnu-build-system?
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
2023-02-01 14:31 ` Ekaitz Zarraga
2023-02-01 15:45 ` jgart
2 siblings, 2 replies; 10+ messages in thread
From: Pjotr Prins @ 2023-02-01 10:11 UTC (permalink / raw)
To: jgart; +Cc: guix-devel
Hi jgart,
zig as a build system is nice, but it is llvm bound and only targets
zig and C/C++. It does not handle packages, and that is a feature in
my book ;). Mind they are planning to go down the packaging route,
from what I can tell.
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.
Pj.
On Fri, Jan 27, 2023 at 02:03:06AM +0000, jgart wrote:
> Can `zig-build-system` be an alternative to the `gnu-build-system`?
>
> https://ziglang.org/learn/why\_zig\_rust\_d\_cpp/#a-package-manager-and-build-system-for-existing-projects
>
> > Not only can you write Zig code instead of C or C++ code, but you can use Zig as a replacement for autotools, cmake, make, scons, ninja, etc. And on top of this, it (will) provide a package manager for native dependencies. This build system is intended to be appropriate even if the entirety of a project’s codebase is in C or C++.
>
> WDYT
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Can zig-build-system be an alternative to the gnu-build-system?
2023-02-01 10:11 ` Pjotr Prins
@ 2023-02-01 15:37 ` Blake Shaw
2023-02-02 17:52 ` Philip McGrath
1 sibling, 0 replies; 10+ messages in thread
From: Blake Shaw @ 2023-02-01 15:37 UTC (permalink / raw)
To: Pjotr Prins; +Cc: jgart, guix-devel
This has reminded me of Make's built-in support for guile[1].
I've assumed that the fact that we don't use it means that it
probably depends on an earlier guile, as many projects many
that support "guile scripting" typically depend on ~v1.8; but
that is just an assumption.
Does anyone know what its status is?
[1] https://www.gnu.org/software/make/manual/html_node/Guile-Integration.html
Pjotr Prins <pjotr.public12@thebird.nl> writes:
> Hi jgart,
>
> zig as a build system is nice, but it is llvm bound and only targets
> zig and C/C++. It does not handle packages, and that is a feature in
> my book ;). Mind they are planning to go down the packaging route,
> from what I can tell.
>
> 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.
>
> Pj.
>
> On Fri, Jan 27, 2023 at 02:03:06AM +0000, jgart wrote:
>> Can `zig-build-system` be an alternative to the `gnu-build-system`?
>>
>> https://ziglang.org/learn/why\_zig\_rust\_d\_cpp/#a-package-manager-and-build-system-for-existing-projects
>>
>> > Not only can you write Zig code instead of C or C++ code, but you
>> can use Zig as a replacement for autotools, cmake, make, scons,
>> ninja, etc. And on top of this, it (will) provide a package manager
>> for native dependencies. This build system is intended to be
>> appropriate even if the entirety of a project’s codebase is in C or
>> C++.
>>
>> WDYT
>>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Can zig-build-system be an alternative to the gnu-build-system?
2023-02-01 10:11 ` Pjotr Prins
2023-02-01 15:37 ` Blake Shaw
@ 2023-02-02 17:52 ` Philip McGrath
2023-02-02 18:33 ` zuo build system; formerly: " Pjotr Prins
1 sibling, 1 reply; 10+ messages in thread
From: Philip McGrath @ 2023-02-02 17:52 UTC (permalink / raw)
To: Pjotr Prins, jgart; +Cc: Brian Cully
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Can zig-build-system be an alternative to the gnu-build-system?
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 14:31 ` Ekaitz Zarraga
2023-02-01 15:45 ` jgart
2 siblings, 0 replies; 10+ messages in thread
From: Ekaitz Zarraga @ 2023-02-01 14:31 UTC (permalink / raw)
To: jgart; +Cc: guix-devel
Hi
> Can `zig-build-system` be an alternative to the `gnu-build-system`?
It could be, but in order to do that we need to add the zig-build-system:
https://issues.guix.gnu.org/60889
:)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Can zig-build-system be an alternative to the gnu-build-system?
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 14:31 ` Ekaitz Zarraga
@ 2023-02-01 15:45 ` jgart
2023-02-01 15:47 ` Ekaitz Zarraga
2023-02-01 15:51 ` jgart
2 siblings, 2 replies; 10+ messages in thread
From: jgart @ 2023-02-01 15:45 UTC (permalink / raw)
To: Ekaitz Zarraga; +Cc: guix-devel
hola Ekaitz,
I added it as a pre-release to Guix 'R Us a few weeks ago:
https://toys.whereis.みんな/symbols?search=zig-build-system
;()
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Can zig-build-system be an alternative to the gnu-build-system?
@ 2023-02-01 22:46 Nathan Dehnel
0 siblings, 0 replies; 10+ messages in thread
From: Nathan Dehnel @ 2023-02-01 22:46 UTC (permalink / raw)
To: pjotr.public12, guix-devel
Would this Guixy build system store build artifacts in /gnu/store?
This could allow, for example, reproducible incremental builds.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-02-02 18:34 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).