Spotlight › Weave and Loom
Weave and Loom
Build WAB applications on the PC from declarative UI, event handlers and spreadsheet formulas.
- Build host
- 4.77 MHz 8088
- Pong frame rate
- 17.7 fps
- Single-app minimum RAM
- 256KB
01 / Application format
Application format
A Weave project combines WML controls, WJS event handlers and optional FX formulas. Compilation produces a .WAB bundle opened by the runtime as an os8088 application. These are project-specific languages, not HTML/CSS or browser JavaScript.
The bundle contains compiled control records and bytecode. The documented sample Pong bundle is 1,008 bytes; runtime/package memory is additional.
02 / Example applications
Example applications
Greeter exercises controls and script events, Picnic Budget combines grid formulas with event handlers, and Pong exercises the animated canvas. Canvas colour is optional; ordinary controls keep the desktop theme.
03 / Build on the target
Build on the target
Loom edits the project files and compiles them with Ctrl-P. Diagnostics identify the source line. Host tools and the in-guest compiler are tested for byte-identical sample bundles.
A generated bundle is written beside its project sources and needs access to the runtime there. The two example directories are self-contained for that reason.
04 / Runtime scheduling
Runtime scheduling
Event bytecode runs in bounded slices. Long handlers can yield; a handler that exceeds the defined execution limit is terminated. The canvas uses a separate task only while its animation is active.
Rendering goes through the shared desktop API and tracks changed controls/regions. The recorded 10,000-30,000 bytecode operations/s is workload-dependent and is not a frame-rate guarantee.
05 / Language and memory limits
Language and memory limits
The script language is event-driven and implements its own restricted semantics. It is not a general ECMAScript implementation and cannot load a web page.
The recorded 256KB configuration fits one Weave application; larger hosts can fit more. Colour belongs to the canvas path, with monochrome fallback. The WAB contract defines supported controls, opcodes and resource limits.
06 / Build and run a bundle
Build and run a bundle
Use the dedicated Weave image. Open WEAVE/PONG.WAB to run the example, or LOOM/PONG.WML to edit and compile it. The QEMU recipe below boots that software set.
qemu-system-i386 -drive file=os8088.img,format=raw,if=floppy -boot a \
-drive file=weave.img,format=raw,if=floppy,index=1 \
-chardev msmouse,id=m0 -serial chardev:m0