🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.devel
Article #457

Re: RFS: Bringing [zig] to Debian: A from-source bootstrap that reproduces upstream's seed

#457
From: Edmund Lodewijks
Date: Fri, 13 Nov 2026 07:40
178 lines
10170 bytes
Hi Ivan,

On 2026/11/12 22:24, Ivan Carvalho wrote:
> Can you invite me to lobste.rs so I can post a reply? Invite
> ivancarvalho@gatech.edu; that's my personal email (although the work
> one would be fine).

Sorry, can't do (don't have the option).

> I will post a more detailed reply later, but of course we will ship a
> compiler that supports C++. The idea of not being able to compile
> Ghostty is absurd.

Unless, of course, the deps can be pulled from the archive, which is the 
whole idea behind devendoring.

Also, while Ghostty is cool, Zig is more than getting Ghostty into Debian.

> Unvendoring and shipping a minimal Zig doesn't mean the result will be
> botched. For libc++, we'd try to use libc++abi-dev, then try a
> separate package like zig-libc++, then vendor referencing a precedent.
> I need to check what Emscripten does today, they are a C++ compiler
> targeting WASM that we should study.

I guess I did not explain things clearly enough. Currently, Zig will not 
look at whatever system-C++ you have installed. The code path in Zig has 
not been written yet (it does work for command-line invocations, but not 
when using build.zig).

> Unvendoring doesn't mean stripping everything, it just means trying to
> reuse as much as possible from Debian itself to avoid duplicate work.

I'm not sure that I understand / that that sounds correct.

> No one wants to apply the same fix to thousands of packages, the
> Debian release and security teams want to fix  libc++abi-dev once and
> have it propagate everywhere.

Again, I must have not explained the issue correctly. See above.

@Maytham: Perhaps a Zig mailing list on Debian would be useful to keep 
these discussion open and public, and that they can be re-read and used 
again later. I think that much of what is written now will be lost for 
the future, which is a shame in terms of findings made. For now, I am 
Cc-ing debian-devel again.

Another reason: I was not aware of there being any current effort in 
trying to get Zig into Debian when I started looking into it a few weeks 
ago. It caused a bunch of double work.

Some coordination by a Debian DD (not sure if you want to be that, but I 
have been including you since I was told that you "own" the zig-team 
Salsa repo) of the attempt to get Zig into Debian would be very welcome, 
too.

Kind regards,

     Edmund




== Ivan replied to: ==

On 2026/11/12 22:05, Edmund Lodewijks wrote:
 > Hi Ivan,
 >
 > Thank you for your email, and for adding me to the zig repo!
 >
 > I apologise, I didn't have much time today to work on Zig-in-Debian (or
 > my emails) at all.
 >
 > On 2026/11/11 21:25, Ivan Carvalho wrote:
 >> If you send an MR to zig-wasm-bootstrap extending the chain I can
 >> review it. However, in my opinion, the most useful work you can do is:
 >
 > Okay.
 >
 >> 1. Try to shorten the number of hops from 0.16 -> 0.17. I haven't
 >> looked at your transitions, but small patches that save a hop save us
 >> build time. Saving a hop save us build time.
 >
 > I'll have a look, but not sure that can be done.
 >
 >> 2. Check if the bootstrap works in aarch64. Both 0.10 -> 0.16 and 0.16
 >> -> 0.17. Worst case use QEMU. I haven't had time to test it, but this
 >> is valuable data.
 >
 > Happy to do that!
 >
 >> Going forward, getting Zig into Debian means recognizing that most
 >> tasks will be boring. Everyone wants to upload the package, few want
 >> to solve the mundane tasks. Let Jesse unvendor things, he already
 >> started. Focus on translating your hops to work with the Magefiles. I
 >> will manage the repositories and secure upload sponsorship.
 >
 > Yep, very aware of the mundane efforts of getting this done. Happy to
 > put in my share, to help Zig into Debian.
 >
 > I did already do a bunch of unvendoring in the last week -- with a
 > script to test what works and what breaks when I remove stuff.
 >
 > Also, have a look at what AndrewK, Zig creator, writes on lobste.rs. I
 > think you and Jesse might find this interesting:
 >
 > https://lobste.rs/s/0ouxwf/libghostty_1_0#c_rzalas
 >
 > I have been testing a little on this unvendoring thing based on what
 > Andrew wrote. I can unvendor everything, but if I unvendor the C++
 > stuff, things break. Zig can't compile C++ anymore, and Zig doesn't have
 > the code yet to use the system's compiler even if it is installed (I
 > found a TODO comment in the Zig code about that).
 >
 > So, the zig-team will have to choose between two options, it seems to me:
 >
 > 1. Whether we unvendor everything, including C++. That means that zig
 > can't compile C++ on Debian until this is sorted upstream (and patched
 > in Debian). Ghostty has deps written in C++, so... Bye bye Ghostty? Not
 > necessarily, because we can just use those C++ deps from Debian straight
 > (provided the versions match..). For example, harfbuzz is a C++ dep, and
 > Zig would compile it for Ghostty with its C++ compiler. If we declare
 > harfbuzz as a dependency of Ghostty, zig might not find it necessary to
 > compile it from source (I have not tested this). Alternatively:
 >
 > 2. Whether we unvendor everything, except C++. This was my initial
 > unvendor build and resulted in:
 >
 > Removing lib/libc, lib/include and lib/libtsan, and keeping lib/libcxx,
 > lib/libcxxabi and lib/libunwind. That takes the source from 21,961 files
 > to 4,758, and it removes the licences that are the actual obstacle:
 > APSL-1.1, which is not DFSG-free, plus BSD-4-clause, ZPL-2.1 and a
 > header that has IETF RFC terms in it.
 >
 > It's a big win all the same. The licenses (checked via `licensecheck`)
 > look okay. By far the most files are Apache-2.0 with LLVM excepteion.
 > Then the rest are Apache-2.0 and/or Boost, Apache-2.0 and/or Unicode;
 > and 3 unknown (haven't looked further).
 >
 > On lobste.rs, @rcalixte pm'd me and shared two links of his, in which he
 > had worked around the fact that Zig can't currently use C++. I haven't
 > looked much into it, but considering what he patched, that would mean
 > that we would have to patch EVERY software written in Zig with C++ deps,
 > which seems to me to not weigh up against leaving C++ dirs with DFSG
 > okay licenses in Zig for now.
 >
 > Anyway, just wanted to share this. Please do share it with Jesse as well
 > if you like; I simply haven't found the time yet to reach out and say hi.
 >
 >> n.b.: I am not a zig-team admin, ask Mayham for membership.
 >> n.b 2:  have already talked with DDs who are willing to sponsor this
 >> package once things are suitable.
 >
 > I am sure DD's won't be an issue to find if we have a good proposal.
 > What we mostly need now is coordination and focus to get something into
 > NEW soon, so that it can be adjudicated, and that we have time to fix
 > things if it isn't accepted at once.
 >
 > Happy to hear your thought. I haven't reached out yet to DD Maytham yet
 > about joining Zig team, either. Will come in time. In fact, let me just
 > Cc him, if he's heading the Zig-team. Hello @Maytham!
 >
 > This email got much longer than intended... I just wanted to say thanks,
 > and let you know that I will find time again later.
 >
 > Kind regards,
 >
 >      Edmund
 >
 >
 > P.S.: After writing this, and considering that it's lights-out where I
 > live now, I decided to just Cc Maytham and Jesse. I hope you don't mind!
 > Hi! Sorry for the somewhat rocky introduction.. o/



-- 
Edmund Lodewijks <edmund@proteamail.com>
TZ: UTC+2 / GMT+2
Technical Details
Message-ID: <NYU37-bAvq-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <NYgp3-beka-9@gated-at.bofh.it> <NYhO9-bf2j-1@gated-at.bofh.it> <NYkVH-bgRa-3@gated-at.bofh.it> <NYU37-bAvq-3@gated-at.bofh.it> <NYU37-bAvq-5@gated-at.bofh.it> <NYU37-bAvq-7@gated-at.bofh.it> <NYU37-bAvq-9@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Edmund Lodewijks <edmund@proteamail.com>
Newsgroups: linux.debian.devel
Subject: Re: RFS: Bringing [zig] to Debian: A from-source bootstrap that  reproduces upstream's seed
Date: Fri, 13 Nov 2026 08:40:01 +0100
Message-ID: <NYU37-bAvq-1@gated-at.bofh.it>
References: <NYgp3-beka-9@gated-at.bofh.it> <NYhO9-bf2j-1@gated-at.bofh.it> <NYkVH-bgRa-3@gated-at.bofh.it> <NYU37-bAvq-3@gated-at.bofh.it> <NYU37-bAvq-5@gated-at.bofh.it> <NYU37-bAvq-7@gated-at.bofh.it> <NYU37-bAvq-9@gated-at.bofh.it>
X-Mailbox-Line: From debian-devel-request@lists.debian.org  Fri Nov 13 07:37:13 2026
Old-Return-Path: <edmund@proteamail.com>
X-Amavis-Spam-Status: No, score=-2.1 tagged_above=-10000 required=5.3
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
 DKIM_VALID_EF=-0.1] autolearn=ham autolearn_force=no
X-Policyd-Weight: using cached result; rate: -4.6
X-Dkim-Filter: PhoenixDKIM Filter v1.0.0 mail.proteamail.com via nbg-mx-proteamail-1 4jQpx54HJBz2xh9
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
X-Dkim-Key-Compromise: NOTE REGARDING DKIM KEY COMPROMISE https://proteamail.com/dkim-rotate/README.txt https://proteamail.com/dkim-rotate/ac/acdc081a1caaad5738bc16e9f737f661.pem
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Mailing-List: <debian-devel@lists.debian.org> archive/latest/373182
List-ID: <debian-devel.lists.debian.org>
List-URL: <https://lists.debian.org/debian-devel/>
List-Archive: https://lists.debian.org/msgid-search/e4e9f7cc-48f8-43d2-add6-b1c8751a4326@proteamail.com
Approved: robomod@news.nic.it
Lines: 178
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: maytham@debian.org, jmr@google.com, debian-devel@lists.debian.org
X-Original-Date: Fri, 13 Nov 2026 09:36:55 +0200
X-Original-Message-ID: <e4e9f7cc-48f8-43d2-add6-b1c8751a4326@proteamail.com>
X-Original-References: <827eeca2-f7cf-4544-8eba-c1f59abb57b9@debian.org>
 <87ik23mp28.fsf@josefsson.org>
 <CAKyZ7_bfoODFpe35cGfPNRLqnHXfv1f3hVQ4pL3PRC9mGmn0rg@mail.gmail.com>
 <cb7cf7af9c54ed88accd0d2e1c8c486d@proteamail.com>
 <CAKyZ7_bzVbCrOztRJvvArzu2FKPU6YqDM=qpj9Sdm1Fn6RWwjg@mail.gmail.com>
 <e16dbc72-9505-426a-91f9-4d310cb72ae6@proteamail.com>
 <CAKyZ7_a=yi1A5Ud416kHzbP+KUdPc1GYm+-tYiChd6rha+x8Sg@mail.gmail.com>