A research project · not released yet

Web apps whose compiler refuses whole classes of bugs.

Pleris is a language for web apps, with a compiler and a server for it. You write the data, the server's reads and writes, and the pages in one language, and the compiler refuses programs with bugs that TypeScript, React, Next.js and Svelte let through to production.

price.pw
module price

fn price(cents: Int) -> String !{} {
    cents
}
pw check
error: [PW0606] `price.price` declares its result `String` and this produces `Int`
 --> price.pw:4:5
  |
3 | fn price(cents: Int) -> String !{} {
  |    ----- `price` declares its result here
4 |     cents
  |     ^^^^^ `price.price` declares its result `String` and this produces `Int`
  |
  = note: every value a body returns — its last expression, each branch of it, and each `return` — must have the result type its signature declares
  = help: produce a `String` here, or change the declared result

What the compiler refuses

Each refusal has a code, a one-sentence rule and the decision behind it: 220 codes, from the compiler's own registry.

Every error code · What it refuses, and what it does not do yet

Fast where a reader feels it

The same apps in Pleris, React, Svelte, Next.js and SvelteKit, measured by the project's own instrument: Chromium on one development PC, medians of five runs; Slow 4G is Lighthouse's profile of a slow phone network.

MeasuredPlerisReact or Next.jsSvelte or SvelteKit
TodoMVC: the first todo added, to the frame that shows it (Slow 4G)31 ms33 ms React34 ms Svelte
A store: ready to use on a first visit (Slow 4G)1,381 ms2,067 ms Next.js1,749 ms SvelteKit
A store: ready to use on the next visit (Slow 4G)626 ms660 ms Next.js638 ms SvelteKit
A store: a press with 19 other tabs of it open21 ms43 ms Next.js44 ms SvelteKit
A store: server CPU for each request, under load0.20 ms5.12 ms Next.js1.17 ms SvelteKit

Where it still loses: the first download (TodoMVC sends 142 KB, Svelte 21 KB), Svelte's first visit by about 120 ms, and latency under load against SvelteKit, whose server keeps connections open. These numbers come from a branch still under review (PR #76), and field performance is not claimed. The runs, the commands and every row, losses first.

Every example compiles

Each example in the guide is a whole program, and a test runs every one through the real compiler: one meant to compile must build, one meant to fail must fail with exactly the codes it names, and where a page shows the compiler's output, the compiler must print exactly that.

Build a guestbook with sign-in, end to end.

What it does not do yet

  • An app's storage is written in Rust, behind host bindings.
  • Sign-in is a development provider, and there is one server.
  • No pw new, no project file and no editor support.
  • Some checks have gaps, each shown in the guide.

The whole list, honestly.