← All spotlightsPrograms / Features

Spotlight › Weave and Loom

Weave and Loom

Build WAB applications on the PC from declarative UI, event handlers and spreadsheet formulas.

Loom
Loom on the os8088 desktop, editing PONG.WML. A sidebar on the left lists the project's files -- PONG.WML, PONG.WJS, SHEET.WFX, PONG.WSP -- and says Not packed. The editor pane shows the markup for a Pong game: an app element, a card, labels, a canvas with three sprites, and a button.
Loom editing the Pong project on the target.
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.

Weave
The Weave Greeter example running: a text box containing the word ada, a Greet button, a ticked Shout it check box, the line HELLO, ada! below them, and a progress meter three tenths full labelled Greetings so far.
Greeter event/control example.
Weave
The Weave Picnic Budget example: a grid with Item and Cost columns listing Bread 3.5, Cheese 7.25 and Cider 12, a Total row reading 22.75, an Average row reading 7.58, the line Recalculated 4 cells, and two buttons, Show total and Cider +1.
Picnic Budget formula grid.
Weave
The Weave Pong example running in colour: a black playing field with a cyan paddle on the left, a magenta paddle on the right, a yellow ball in flight, a score reading 0 : 0 and a Serve button.
Pong canvas example.

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.

Loom
Loom after building the Pong project. The sidebar now reads Packed, 1008 bytes, and the line along the bottom of the window says: Packed PONG.WAB, 1008 bytes. Reload it in Weave with control R.
Loom build result.

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