1
Fork 0
Go to file
Motiejus Jakštys 2050f9ae4c step14 and 15 2024-11-08 19:42:10 +02:00
0.10.0-675-g9d93b2ccf1-TypeOf-hack.patch run: BoundFn hack 2024-11-03 22:20:46 +02:00
0.10.0-747-g7b2a936173-CallOptions.patch add missing patch 2024-11-06 14:11:20 +02:00
0.10.0-961-g54160e7f6a-CMakeLists.txt-remove-stage3.patch step7 and 8 2024-11-06 22:48:24 +02:00
Dockerfile container: +patch 2024-11-06 14:36:03 +02:00
README.md step10 2024-11-08 16:47:27 +02:00
llvm-snapshot.gpg.key Initial commit 2024-11-01 09:33:22 +02:00
llvm.list Initial commit 2024-11-01 09:33:22 +02:00
run step14 and 15 2024-11-08 19:42:10 +02:00

README.md

Building modern Zig from the original C++ implementation

This repository explores building Zig from the C++ implementation without using binary blobs. Forum post goes with this.

Clone zig and prune binary files from history:

$ git clone https://github.com/ziglang/zig zig2
$ cd zig2
$ git filter-repo --prune-empty=never --prune-degenerate never --invert-paths --path-glob 'stage1/zig1.wasm*' --path stage1/zig1.c

Now build an isolated container with a bunch of zig historic dependencies:

$ docker build -t zig-repro .
$ docker run -ti --rm \
    -v ~/code:/x \
    -v /home/$USER/.cache/zig:/home/$USER/.cache/zig \
    -w /x/zig2 \
    zig-repro \
    sh -c "useradd -s /bin/bash -u $UID $USER && su $USER; bash"

And run the thing in the container:

$ ../zig-repro/run