5 ms·
Very exciting. Are there plans to maintain the bootstrap path over the longer term? It always makes me sad when I hear about compilers which must bootstrap from
by endgame 4y ago
Very exciting. Are there plans to maintain the bootstrap path over the longer term? It always makes me sad when I hear about compilers which must bootstrap from magic binary blobs.
- anonymoushn 4y agoI hope so, but it seems like even if they didn't maintain it you could build today's stage1 using LLVM 14 and then work from the resulting binary instead of a binary you downloaded from online.
- hiccuphippo 4y agoThey have a project for maintaining this: https://github.com/ziglang/zig-bootstrap https://github.com/ziglang/zig-bootstrap
- Schroedingersat 4y agoI believe the goal is to replace the C++ with a C bootstrap that is initially auto generated from the zig code by zig but manually cleaned up and maintained to match
- pabs3 4y agoStarting from auto-generated code isn't considered a proper bootstrap process by the Bootstrappable Builds project. You need to be able to start without any binaries or auto-generated code from the project itself. Usually that would mean starting with a basic implementation in another language, but starting with an older version of the same project that was written in another language and then going through several older versions of different milestones is often easier than reimplementing the language from scratch in another language. https://bootstrappable.org/ https://bootstrappable.org/
- Schroedingersat 4y agoPlease read comments before responding
- Kamq 4y ago> Starting from auto-generated code isn't considered a proper bootstrap process by the Bootstrappable Builds project. Is there a reason we should weigh the Bootstrappable Builds project's opinion highly here? There's nothing on their benefits page that is subverted by an auto-generated compiler that's hand maintained. Actually, there's no mention of auto-generated code in their best-practices section. Do you have a link to where they even say this?
- pjmlp 4y agoI am quite sure bootstraping as concept, precedes by several decades that website.
- edflsafoiewq 4y agoWhy?
- hiccuphippo 4y agoProbably because they'll start adding features to the Zig version that might not be trivially portable to the C++ version due to architectural differences.
- Gibbon1 4y agoI think because Zig compilers can compile C but not C++.
- int_19h 4y agoZig can compile C++ just fine. Which is no surprise, since it's Clang doing the heavy lifting - Zig provides the convenient CLI.
- nyberg 4y agoYep, https://github.com/ziglang/zig/issues/6378 https://github.com/ziglang/zig/issues/6378
- boomer918 4y agoC++ stage1 compiler is a magic binary blob :)
- movq 4y agoIt's possible to bootstrap GCC starting from only a 357-byte binary seed: https://github.com/fosslinux/live-bootstrap https://github.com/fosslinux/live-bootstrap
- solarkraft 4y agoThis work is impressive, but ... that's still a binary blob, and isn't the system it has to be run on kind of one as well?
- movq 4y agoYeah, it's a binary blob, but it's small enough to be easily auditable. Anyone with some knowledge of x86 assembly can read the annotated version [1] and verify that it does what it claims (which is to convert ASCII hex with comments into binary). You're right, it also requires a Linux kernel, and of course, you also have to trust the hardware you're running it on. Still, it reduces the amount of stuff we have to take for granted as trusted, which I think is a good thing. (I'm not involved in the project, just an admirer). [1]: https://github.com/oriansj/bootstrap-seeds/blob/b09a8b8cbcb6d3fdb025f1bf827d98a8cb3b4d41/POSIX/x86/hex0_x86.hex0 https://github.com/oriansj/bootstrap-seeds/blob/b09a8b8cbcb6...