Over the past few weeks, I’ve been evolving a side project I’ve had in mind since last Elm Camp: programming in Elm for Pebble watches rather than web frontends.
As you may know, there are new Pebble watches running the original operating system, and they even support developing watch faces and apps in JavaScript. However, even a simple Elm worker compiles to JavaScript that is too large to run on the watch.
So here is what Elm Pebble includes so far:
- an IDE built with Phoenix LiveView for Elm development of watch apps, watch faces, and companion apps (on the phone)
- an Elm-to-C compiler (reference counting, no GC; tokenizer/parser generated via Leex/Yecc, with dead-code stripping to keep watch binaries small)
- CodeMirror editor with LSP-backed formatting, completions, diagnostics, hover, and folding (and yes, VIM mode)
- almost complete coverage of the Pebble C API via Elm packages
- a three-root project layout: watch, protocol, and phone, with watch<->phone communication derived from shared Elm types
- companion-app JS APIs exposed as Elm packages
- integrated time-travel debugger that evaluates Elm code for both watch and phone, with timeline events, replay, snapshots, model/view inspection, and tick controls
- project templates for watch faces, games, companion demos, and tutorials
- automated publishing to the Pebble app store, including screenshot capture per watch model
- embedded Pebble emulator for realistic app testing
- experimental WASM Pebble emulator for browser-based emulation
- companion (phone) app generated with the original Elm compiler
- support for Elm packages (on the watch, HTTP/HTML packages are excluded)
- (animated) vector graphics uploadable as SVG
- GitHub integration for project persistence
- MCP/ACP integration so coding agents can read, edit, and build projects through the IDE
- hosted IDE at ide.elm-pebble.dev, or self-hosted via Docker
- website with package documentation built with elm-pages at elm-pebble.dev
Let me know what you think, would be glad to see your Elm watch face in the app store!