replace zg with uucode for unicode operations
Replace the zg dependency with uucode for grapheme segmentation and display width measurement. This eliminates runtime allocations by using compile-time lookup tables instead of runtime-allocated data structures.
Key changes:
- Update build.zig.zon to use uucode dependency instead of zg
- Configure uucode with wcwidth field in build.zig
- Simplify Unicode.zig by removing allocation requirements
- Update gwidth.zig to use uucode's stateless API
- Migrate Parser.zig from code_point.Iterator to uucode.utf8.Iterator
- Update Loop.zig, TextView.zig, Terminal.zig, and other widgets to use uucode's grapheme iterator
- Remove DisplayWidth and Graphemes public exports from main.zig
- Add MIGRATION_ZG_TO_UUCODE.md documenting the migration
Benefits:
- No allocations required for Unicode operations
- Simpler API without init/deinit lifecycle
- Less state to manage and pass around
- Smaller binary size with selective field inclusion
Amp-Thread-ID: https://ampcode.com/threads/T-4e217d39-617e-4f4f-9ed8-4d6153fd5e2f
Co-authored-by: Amp <amp@ampcode.com>