Skip to content

912 Bytes

Choose a tag to compare

@RetroDev256 RetroDev256 released this 22 Aug 17:46
· 40 commits to master since this release

This update has been long waiting. I had not been able to work on this project for 2 years, and finally got back to it. I updated Zig (now on self-hosted), and attempted to build the project. Surprisingly, the project (once compiler errors were fixed) was about 12 KiB. I went down the rabbit hole of creating my own linker script (attempting to remove padding between sections), which helped the binary (seems like Zig linked differently back in the day). Unfortunately, 8 KiB was still way too much. After much pain, I realized that this new version of Zig had embedded certain initialized arrays into the binary, instead of executing them at runtime. After that was fixed, I made small incremental improvements to the code and shrunk the size down to 1008 Bytes. This was a bit larger than I had anticipated, and someone on discord was kind enough to let me know about the existence of PHDRS (which I had completely forgotten about). Down the rabbit hole again, the output is now 912 bytes! Woohoo!