Skip to the page
Kiln / Components

Start here01

The language02

Programs and the world03

Kiln04

04 Kiln / 04

Components

Parts of a page the browser works out, in Hematite, and how Kiln serves them.

What changes only the page, like choosing a size, counting, or showing what's typed as it's typed, needs nothing from the server: a template with a client block is a component, which the browser works out (see components in the language's guide).

Kiln compiles the app's components for the browser when it starts, and serves what they need under /.hem/, compressed for a browser that takes it so: pages with components load /.hem/components.js, which runs them on Hematite's own VM, built for WebAssembly; a page without components loads nothing.

A browser keeps the VM and the components' program for good, since their names change when they do, and asks about components.js each time, which costs it a few bytes when nothing changed. A component whose code the browser can't run (a database, files or C) is a failure when the server starts, at its place.

This one is on this page, working. Press it: