Skip to content
forma.
v3.2.0
☰
Browse documentation
Start here
Application guides
Architecture
Build interfaces
Native rendering
Tooling
Security and operations
API reference

Docs/Architecture

FORMA 3.2

Forma stack architecture

Follow components through the compiler, native server, islands and optional router.

View source ↗Markdown ↓Site guide · 3.2.0
On this page

These guides target the coordinated 3.2.0 release.

Forma 3.2 coordinates eight packages. TypeScript components compile to FMIR v3; Rust renders native modules with typed request data; the browser adopts declared islands. The optional router connects compatible destinations while retaining their common layouts. An application can also use ordinary documents, zero-JavaScript routes or browser rendering.

Packages and boundaries#

PackageResponsibility
@getforma/coreSignals, DOM ownership, island adoption and the explicit HTML runtime
@getforma/compilerThe native source subset, declared props, island identity and FMIR emission
@getforma/buildBundles, manifests, asset integrity and native navigation groups
@getforma/routerBrowser, native and generated-HTML navigation adapters
@getforma/create-appConnected starter applications and their coordinated dependency locks
forma-irNative module parsing, validation and HTML rendering
forma-ir-deriveThe Rust PageProps derive macro
forma-serverTyped page binding, complete responses, assets and Axum integration

Use the coordinated 3.2.0 versions. Add the router only where an application needs it; the minimal template and Field Notes demonstrate applications without it.

Build, render and activate#

The compiler analyzes supported native source without executing application data. Unsupported expressions produce a build diagnostic. Explicit browser routes and browser-only islands describe a chosen execution mode; they do not silently replace a failed native compilation. See the native subset.

The build emits native modules, browser entries, styles and a manifest. Rust loads the declared modules, binds their schemas to PageProps, and finalizes the registry before listening. A typed page handle renders validated request data into a complete PageResponse, including its nonce, CSP and cache policy. Return that response intact. See declared props and the server integration.

Declared islands validate and adopt existing server-rendered nodes. Local signals then drive interaction. Static markup outside islands needs no activation, and ordinary no-JavaScript pages need no executable browser bundle. The explicit HTML runtime separately mounts reviewed markup through an owner with a declared tier and grants; importing it does not scan or activate the document.

The router has three adapters. A browser adapter constructs destination content with Forma. A native adapter receives typed Rust owner branches and adopts fresh leaf islands. A generated-HTML adapter validates registered document digests before admitting their content regions. One coordinator owns navigation in each document.

Compatible shared owners retain their DOM, state and resources. Departing owners dispose their work. Unsupported pages and incompatible builds use document navigation. Rendering, navigation and durable persistence remain separate choices. Read routing and navigation and try the native router lab.

Security and compatibility#

Native rendering accepts the application's trusted build artifacts. Typed props and response policy do not supply authentication, authorization or a database. Rust handlers own request validation, CSRF, transactions and application services. Trusted Types and sink rules constrain client markup operations; they do not make arbitrary HTML trusted. See response policy and building a backend.

Deploy the server binary, manifest, modules and browser assets from one build. Retain a complete rollback and verify direct requests, no-JavaScript behavior, island identity and navigation against the running application. The packages and deployment guide covers the coordinated build and rollout; the compatibility reference defines wire-version rules.

Find your next answer.

Search Forma documentation, guides and examples.