You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This introduces a lightweight WASM backend without SDL dependency,
achieving 60% binary size reduction (891K→357K) compared to SDL-based
approach.
- Add backend/wasm.c: Native WASM backend using Canvas 2D API directly
* Direct Canvas rendering via EM_ASM (no SDL overhead)
* Browser-native image decoding (JPEG/PNG)
* Optimized for minimal runtime with MINIMAL_RUNTIME=1
* Framebuffer accessor functions for zero-copy updates
- Remove twin_dispatch() from API and implementation
* Eliminated unused function across all backends
* All backends now use twin_dispatch_once() consistently
- Make SDL backend native-only
* Removed Emscripten-specific code paths from backend/sdl.c
* SDL now exclusively for native development/testing
This tweaks the WASM backend to support file-based asset loading (TVG,
PNG, JPEG, GIF) through Emscripten's virtual filesystem, addressing
multiple runtime initialization and resource management issues.
- Replace --preload-file with --embed-file for simplified deployment
- Enable FILESYSTEM=1 to support fopen() in image loaders
- Remove MINIMAL_RUNTIME=1 (incompatible with filesystem)
- Implement lazy framebuffer caching in JavaScript
0 commit comments