The verifiable web framework for Rust

Build and Verify
Your Web Apps.

A Rust web framework for building applications and verifying core logic with Lean 4. Integrated dev tools help you test and secure your apps with AI agents.

curl -fsSL https://h5i.dev/install.sh | sh -s -- --websec --recon --test
[h5i] kernel · proofs
Two scenes. First, a Rust kernel is written and translated into Lean 4 definitions; a rule is proven, then an intentional mutation makes the proof fail. Next, an agent tests a running shop, replays an order request with another order id, and finds a missing owner check.

A Verifiable Web Framework

Build on Axum with a composable, kernel-based Rust architecture. Translate application logic into Lean 4 to verify critical properties, then run the same kernel on servers, embedded devices, and GPUs.

Rust application logic, Lean proofs, and three execution targets Aeneas extracts a Rust application kernel into Lean definitions for theorems such as authorized. The same kernel is then built for three targets: an Axum server on CPUs, a no_std heap-free HTTP/1.1 server on bare-metal devices, and GPUs through Rust-CUDA with CPU fallback. Proof results appear in the Apps tab of the dashboard below. 01 rust · the application kernel NORMAL lib.rs Cargo.toml rust · 153:16 toml · 1:1 149150151152153154155156157158159160161162 fn delete(user: u64, s: &Snapshot, id: u64) -> Outcome { match find_post(&s.posts, id) { None => Err(Error::NotFound), Some(p) => { if p.author == user || is_moderator(&s.moderators, user) { Ok((one(Write::DelPost(id)), Reply::Done)) } else { Err(Error::Forbidden) } } } } 123456789101112 [package] name = "board-kernel" description = "Tutorial 2: a verified bulletin board" edition = "2024" license = "Apache-2.0" version = "0.1.0" publish = false # Extracted to Lean by Charon + Aeneas. [dependencies] h5i-app-schema = { path = "…/crates/h5i-app-schema" } h5i-app-sql = { path = "…/crates/h5i-app-sql" } AENEAS extract DEPLOY build 02 lean 4 · the proof you supply NORMAL proofs/Theorems.lean lean · 79:9 79808182838586 theorem authorized (a : Principal) (s : Snapshot) (c : Command) ws r (hinv : Inv (Snapshot.toSt s)) (h : transition a s c = .ok (.Ok (ws, r))) : ∀ w ∈ ws.val, allowed (Snapshot.toSt s) a.user.val w := by rcases writes_of a s c ws r h with hws | ⟨t, cnt, ht, hc, hws⟩ | … · -- List writes nothing. simp [hws] 03 run · one kernel, three targets RUN the same kernel, three ways to run it cargo build --target … h5i-app-http h5i-app-embedded h5i-app-gpu // Axum server let router = Router::new() .merge(rpc_router(app)); axum::serve(listener, router) .await?; // Embedded, no_std let mut rx = [0u8; 2048]; let mut tx = [0u8; 1024]; serve(&cfg, &router, &app, &mut rx, &mut tx, io).await? // GPU acceleration ld.global.u8 %r1, [%rd1]; setp.ne.u32 %p1, %r1, 0; selp.u32 %r2, 1, 0, %p1; st.global.u32 [%rd2], %r2;

Development Infrastructure

h5i gives human and AI agents the tools to build, verify, and test your applications. Its browser, HTTP, red-teaming, and CI tools also work with any existing web app.

01 what the CLI enables

  1. project toolingDevelopment & Testing

    Scaffold applications and verify properties with Lean 4.

  2. browser · HTTP · reconnaissanceAgent-Native Red-Teaming

    Explore websites, discover attack surfaces, and inspect, modify, and replay HTTP traffic.

  3. CI/CDSecurity Regression Testing

    Turn findings into regression tests and run them in CI to catch recurring vulnerabilities.

  4. sandbox · dashboardSandboxed Workflows

    Run agents with filesystem and network restrictions, and monitor their activity.

02 review the workflow in h5i ui

h5i console · dashboard +
←→↻localhost:8765/#/sandboxes/alice/sandboxlocalhost:8765/#/apps/board/theoremslocalhost:8765/#/sessions/br_9f3k2a/historysitemapactionsfindingsreconabout
3 live214 recorded 1 sandbox1 refused egress9 runsstrongest container 3 theorems proven

checkout-idor

br_9f3k2a waiting on you 6 refused
https://shop.example.test/checkout?order=1042 chromiumproxy-observedalicelive for 2m
host:shop status:4xx|refused verb:replay▌
showrefusederrorsreplaysslowshop.example.test
#verbmethodhostpath ↓statustimeinitiator
108replayGETshop.example.test/api/order/104120031msreplay
109replayGETshop.example.test/api/order/104220029msreplay
110clickPOSTshop.example.test/api/pay40288mssubresource
111replayGETshop.example.test/api/order/9001refused—replay
112—GETpx.example.invalid/t.jsrefused—subresource
5 of 128 fetches match6 refusedthe oldest are in h5i websec requests
▾https://shop.example.testnav904
▾/api134
▾/orderGET34
10421
/cartGET POST7
/loginnav2
▸/assets74
▸https://cdn.example.test35
▸https://auth.example.test3
▸https://px.example.invalid2
https://shop.example.test/api/order/1042
1 allowed
methodsGET
statuses200
parametersnone seen
last fetchreq_109
h5i websec requests --session checkout-idor --host shop.example.test h5i websec show req_109 --session checkout-idor
4 origins · 7 paths6 refused3 paths that answered only 404 are left off
14:02:11openhttps://shop.example.test/3 fetches1.2s
14:02:14snapshot41 refs40ms
14:02:19click@e7 “Checkout”6 fetches310ms
14:02:31replayreq_108 path=/api/order/10421 fetch29ms
14:02:33diffres_108 res_109alike 0.71212ms
14:02:40replayreq_108 path=/api/order/90010 fetches—refused before the wire: the policy allows only the two test tenants
14:02:52click@e21 “Pay now”4 fetches · 40288ms
7 of 12 actions5 older foldedthe whole timeline: h5i browser audit
1 open0 closed
f_01

Order lookup answers for another tenant’s order

alice · 2m ago
rests onreq_108res_108res_109
  • replaying req_108 with order=1042 answered 200 with a different tenant’s order: 1412 → 1903 bytes, alike 0.712
  • the same replay with order=9001 was refused before the wire, so the probe stayed inside the two test tenants
idorunconfirmedh5i websec finding list --session checkout-idor
all 37live 29found, never sent 6gone 2probes
statemethodendpointstatuslearned fromevidence
liveGETshop.example.test/api/order/{id}200historyreq_109
livePOSTshop.example.test/api/pay402historyreq_110
liveGETshop.example.test/api/cart200historyreq_93
foundGETshop.example.test/api/order/export?from&tolink in /checkoutnever sent
foundGETshop.example.test/admin/ordersrobots.txtnever sent
goneGETshop.example.test/api/v1/order404probereq_61
6 of 37 endpointsthe ledger: h5i recon endpoints --session checkout-idor
Proxy-observed: every request the browser sent went through the session’s capture proxy, which wrote it down before forwarding it. It is fail-closed, so a request that is not in it did not go through the session, but the browser process itself is not confined.
statelive
enginechromium
identityalice
policya1f4c9e70b32
captureon: 128 messages stored, owner-only
controlthe agent
h5i browser status --session checkout-idor h5i browser audit --session checkout-idor

alice/sandbox

containerbrowserrefused
EvidenceBrowser
The egress allowlist refused 2 requests to px.example.invalid:443.
policy allows
files$WORK rw
egressallow 3
exitany tool
limitswall 1800s
pagein box
h5i browser open https://shop.example.test
host-observedexit 01.2s14:02:11
·
✓ 3
✓
96M
✓
h5i websec replay req_108 --set path=/api/order/1042
host-observedexit 029ms14:02:31
·
✓ 1
✓
·
·
h5i browser click @e21
host-observedexit 088ms14:02:52
·
2 refused
✓
·
2
3 of 9 runs2 refusedthe receipts: h5i box status sandbox
boardexamples/app/boardreceipt · just now
Guarantees 3ChangesMutations
theoremstatusmutantsaxioms
authorizedproven4 of 4 caughtstandard
inv_preservedproven5 of 5 caughtstandard
transition_totalproven3 of 3 caughtstandard
Guarantee map · boardtheorem–spec relationships · excerpt
Board application guarantee map A guarantee about who can delete a post is connected to two theorems and two specifications. GUARANTEEOnly the author or amoderator deletes a post THEOREMPolicy holds onreachable states THEOREMWhat delete writes SPECIFICATIONPermission policy SPECIFICATIONModerator membership
Lean 4 proofs and mutation checks for the latest verification receipt

Frequently asked questions

The short answers. The manual has the long ones.

What is h5i?
h5i is a kernel-based Rust web framework for building applications, verifying core logic with Lean 4, and running the same kernel on Axum servers, embedded devices, and GPUs. Its development infrastructure also provides red-teaming, CI/CD testing, and sandboxed workflows.
How do I build and verify a web app?
Start an h5i-app project with h5i app new. Write application logic in Rust kernels, extract it to Lean 4 with h5i app extract, check proofs with h5i app prove, and test proof sensitivity with h5i app mutate.
Where can h5i-app kernels run?
On three targets. Axum serves kernels on CPUs. A no_std, heap-free HTTP/1.1 server runs them on bare-metal devices such as microcontrollers. The Rust-CUDA backend runs supported kernels on GPUs for batch workloads, with CPU fallback. Lean proofs cover the extracted kernel logic; GPU behavior is checked separately with differential tests. See the embedded design and the GPU report.
Can I test an existing app without using h5i-app?
Yes. The browser, HTTP, recon, and security regression tools work with web applications in any stack. You do not need to migrate to the Rust framework.
Does a proof cover my entire application?
A proof establishes a stated property of the verified logic under explicit assumptions. Routes, authentication adapters, dependencies, and deployments still need testing and review.

Get Started with h5i

Web Framework Crate

cargo add h5i-app
Get Started

Development CLI

curl -fsSL https://h5i.dev/install.sh | sh -s -- --websec --recon --test
Install CLI
h5i · demo film+
h5i.dev/demo ⤢