How emilk/eframe_template works
This is a starter GUI application template: a user launches it natively or opens its web version, then interacts with a small egui app. The app restores and saves serialized state through eframe storage; the web version also supports offline caching through its service worker. The README documents native and web use, persistence, and PWA behavior. Runtime links are grounded in the sampled Rust sources or README; web page and service-worker details are documented but their implementation was not sampled.
Main entry points: app.rs Template app · main.rs Native entry · sw.js Service worker · index.html Web page
Components 12
App launch
- Native entry
src/main.rs - Web entry
src/main.rs
GUI app
- Template app
src/app.rs - App state
src/app.rs - App UI
src/app.rs
Web runtime
- Web page
index.html - Service worker
assets/sw.js - Web manifest
assets/manifest.json
Other components
- User
- Native runtime
- Browser
- Eframe storage
Connections 13
- User → Native entry: launches
README.md - Native entry → Native runtime: starts
src/main.rs - Native entry → Template app: constructs
src/main.rs - User → Browser: opens
README.md - Browser → Web page: loads
README.md - Web page → Web entry: hosts
- Web entry → Browser: starts in
src/main.rs - Web entry → Template app: constructs
src/main.rs - Template app → App state: restores and saves
src/app.rs - Template app → Eframe storage: reads and writes
src/app.rs - Template app → App UI: renders
src/app.rs - Service worker → Web manifest: caches
README.md - Service worker → Browser: enables offline use
README.md