PAM Native
PAM Native keeps PHP 8.4 alive and renders platform controls directly. Rust owns validation, reconciliation, diffing, and layout. Kotlin applies mutation batches to Android Views; Swift applies the same protocol to UIKit.
It is not a WebView and does not ship React’s JavaScript runtime.
App::run(fn () => Screen::make( Column::make( Text::make('Checkout')->style(new Style(fontSize: 28)), Button::make('Pay')->onPress($pay), )->style(new Style(flexGrow: 1, padding: 24, gap: 16)),));Authoring styles
Section titled “Authoring styles”Every public authoring style resolves to the same Renderable → Element → PNT1/PNP1 path:
- explicit typed PHP trees;
- class components;
- functional components;
- declarative
.pamviews; - single-file
*.pam.phpcomponents; and - generated custom native views.
Templates are parsed once, validated, and kept in memory. Expressions read component or data paths and do not use eval.
Native component surface
Section titled “Native component surface”The Android renderer includes layout, text, images, inputs, pressables, scrolling and recycled lists, modals, activity indicators, status bar control, keyboard avoidance, refresh control, Android-specific touch behavior, and system APIs.
The iOS renderer decodes protocol v1 mutation batches and maps the shared node surface to UIKit. It includes input, press, image, scroll/end-reached, refresh, drawer, modal, custom-view, runtime, storage, HTTP, and system bridges. See iOS renderer for the exact implementation and current verification boundary.
Performance-sensitive behavior stays native: input cursor and selection, press feedback, scrolling, image loading, modal interaction, refresh gestures, animations, and view mutation commits do not require a round trip through PHP.
Platform support
Section titled “Platform support”| Requirement | Contract |
|---|---|
| PHP | 8.4.x |
| Android | API 26–36 |
| PAM Native protocol | Version 1 |
| iOS | Swift/UIKit renderer implemented; host and device verification in progress |