examples: replace snake with mandelbrot (f64 + libc dyn-link demo)

This commit is contained in:
2026-05-11 17:38:25 +09:00
parent 9e383b7ba0
commit 647d3ee05e
5 changed files with 98 additions and 306 deletions

View File

@@ -0,0 +1,15 @@
# examples/mandelbrot — built with the ww toolchain only (w6c → w6a → w6l).
#
# `ww build` does the whole pipeline. -l c routes putchar through w6l's
# dynamic linker (PT_INTERP + PT_DYNAMIC + PLT/GOT), so the resulting
# binary maps libc.so.6 at runtime via the system loader. No cc.
WW := $(shell cd ../..; pwd)/out/bin/ww
mandelbrot: mandelbrot.ww
$(WW) build mandelbrot.ww -L /usr/lib -l c
clean:
rm -f mandelbrot mandelbrot.o mandelbrot.s mandelbrot.combined.ww
.PHONY: clean