summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PROJECT_CONTEXT.md1
-rw-r--r--TODO.md3
-rw-r--r--doc/COMPLETED.md12
-rw-r--r--doc/HOWTO.md18
4 files changed, 33 insertions, 1 deletions
diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md
index 165fe60..ae79bbf 100644
--- a/PROJECT_CONTEXT.md
+++ b/PROJECT_CONTEXT.md
@@ -90,6 +90,7 @@
## Recently Completed
**Feb 9, 2026:**
+- Size measurement system (Task #76) - Demo: 4.4MB, External: 2.0MB
- Hot-reload file watcher (debug-only, 0 bytes overhead)
- WGSL uniform buffer validation (Task #75)
- Uniform buffer alignment fixes (Task #74)
diff --git a/TODO.md b/TODO.md
index 9d17d64..aad105e 100644
--- a/TODO.md
+++ b/TODO.md
@@ -58,7 +58,8 @@ Final phase tasks for reaching 64KB binary size:
- **Task #28:** Spectrogram Quantization (optimize frequency distribution)
- **Task #34:** Full STL Removal (custom containers)
- **Task #35:** CRT Replacement (CRT-free entry)
-- **Task #76:** External Library Size Measurement (see `doc/SIZE_MEASUREMENT.md`)
+
+**Measurement:** Use `./scripts/measure_size.sh` to track progress (Task #76 complete)
---
diff --git a/doc/COMPLETED.md b/doc/COMPLETED.md
index 49cfbe9..d1c89af 100644
--- a/doc/COMPLETED.md
+++ b/doc/COMPLETED.md
@@ -31,6 +31,18 @@ Use `read @doc/archive/FILENAME.md` to access archived documents.
## Recently Completed (February 9, 2026)
+- [x] **External Library Size Measurement (Task #76)**
+ - **Goal**: Measure true demo code size vs external library overhead
+ - **Implementation**:
+ - Audio: Use miniaudio's `ma_backend_null` (excludes platform drivers, saves 100-200KB)
+ - GPU/Platform: Stub our abstractions (~30 functions) instead of external APIs (~300 functions)
+ - Created `src/platform/stub_types.h` with minimal WebGPU opaque types
+ - Created `src/platform/stub_platform.cc` and `src/gpu/stub_gpu.cc`
+ - Added `DEMO_STRIP_EXTERNAL_LIBS` build mode
+ - Created `scripts/measure_size.sh` for automated measurement
+ - **Result**: Demo=4.4MB (69%), External=2.0MB (31%). Binary compiles but doesn't run.
+ - **Documentation**: `doc/SIZE_MEASUREMENT.md`
+
- [x] **WGSL Uniform Buffer Validation & Consolidation (Task #75)**
- **Goal**: Standardize uniform buffer usage across all post-process effects and add validation tooling
- **Implementation**:
diff --git a/doc/HOWTO.md b/doc/HOWTO.md
index c6e4e79..fa3395a 100644
--- a/doc/HOWTO.md
+++ b/doc/HOWTO.md
@@ -58,6 +58,24 @@ cmake --build build -j4
**Note:** `DEMO_ALL_OPTIONS=ON` enables tests, tools, AND `STRIP_ALL`, which removes debug-only code. Use selective flags for debugging.
+### Size Measurement Build
+```bash
+./scripts/measure_size.sh
+```
+Measures demo code size by stubbing external libraries (wgpu/GLFW/miniaudio). Binary compiles but **does NOT run**.
+
+**Manual:**
+```bash
+cmake -S . -B build_size -DDEMO_STRIP_EXTERNAL_LIBS=ON
+cmake --build build_size -j4
+strip build_size/demo64k
+ls -lh build_size/demo64k
+```
+
+**Typical results:** Demo=4.4MB (69%), External=2.0MB (31%)
+
+See `doc/SIZE_MEASUREMENT.md` for details.
+
---
## Build System