mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-17 16:32:11 +01:00
Binary size, before: 412128 gen/bin/example-convert-to-nia 50680 gen/bin/example-gifplayer 449680 gen/bin/example-imageviewer 439000 gen/bin/example-sdl-imageviewer 151848 gen/bin/example-toy-aux-image After: 302232 gen/bin/example-convert-to-nia 46144 gen/bin/example-gifplayer 352112 gen/bin/example-imageviewer 329168 gen/bin/example-sdl-imageviewer 138656 gen/bin/example-toy-aux-image For further data points, if you hard-code define'ing WUFFS_CONFIG__DST_PIXEL_FORMAT__ENABLE_ALLOWLIST and WUFFS_CONFIG__DST_PIXEL_FORMAT__ALLOW_BGRA_PREMUL: Binary size, before: 121368 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo 121368 gen/lib/c/clang-static/wuffs-base-pixconv.o 181088 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo 181136 gen/lib/c/gcc-static/wuffs-base-pixconv.o After: 54784 gen/lib/c/clang-dynamic/wuffs-base-pixconv.lo 54784 gen/lib/c/clang-static/wuffs-base-pixconv.o 72144 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo 72272 gen/lib/c/gcc-static/wuffs-base-pixconv.o
Wuffs' Example Programs
This directory contains example programs that use Wuffs the
Library. See Hello wuffs-c for
an example program that uses Wuffs the Language
and its wuffs-c compiler.
Other than the toy-* examples, all of these programs do real work. They're
not just programming language toys at the "calculate the Fibonacci sequence"
level of triviality. For example, the example/crc32
and example/zcat programs are roughly equivalent to
Debian Linux's /usr/bin/crc32 and /bin/zcat programs.
Building
Running build-example.sh from the top level directory will build all of the
examples. To check out and build just one, such as jsonptr:
git clone https://github.com/google/wuffs.git
cd wuffs
./build-example.sh example/jsonptr
When re-building, you only need the last of those three lines. To run it:
gen/bin/example-jsonptr test/data/json-things.unformatted.json
See also the top-level BUILD instructions.