Public betaRust-first frameworkCargo-native

Rust-first websites with readable .ax files.

Axonyx is a web framework experiment for content-first sites, docs, and future CMS flows: Cargo-native tooling, Foundry UI, static output, and much less JavaScript by default.

Beta status: create-axonyx 0.1.53 and cargo-axonyx 0.1.84 are on crates.io. The current loop includes Pages V2 starter templates, Tokio as the default server, package use directives, route contracts, Melt checks, OpenAPI export, helper response metadata, signed-session auth contract metadata, state artifact serving, named state reads, backend root globals, env contracts, action validation diagnostics, SQLite reads/writes, db.query escape hatches, typed route-local query data bindings, Scope namespace imports, data-aware routes, safer action invalidation semantics, action-driven data refresh fragments with redirect fallback safety, React-friendly ASX className aliases, Actions V2 mutation call syntax, clearer CLI help/version output, and the planned WASM client runtime bridge.

packages live

Install from crates.io

cargo install create-axonyx
cargo install cargo-axonyx
cargo install axonyx-aegis --force
create-axonyx my-site --yes --template site
cargo ax api --openapi --out public/openapi.json
cargo ax db check --url data/demo-posts.sqlite
cargo ax db pull --url data/demo-posts.sqlite
cargo ax run dev
cargo ax run start --host 0.0.0.0 --port $PORT
cargo ax test

Loading package versions from Axonyx state...

Browse the stack

Every layer has a job.

Axonyx is not one giant black box. It is a small set of framework layers that fit together: author pages, validate contracts, render through Rust, style with Foundry, and test the result before deploy.

Architecture

One framework loop, multiple frontends.

Cargo-native

Axonyx now ships public crates for the scaffold CLI, Cargo helper, runtime, compiler core, macros, and Foundry UI package.

Install Axonyx

.ax authoring

Pages are authored in JSX-like `.ax` files, routed through `app/**/page.ax`, and checked by `cargo ax check` before build.

The syntax is intentionally familiar for frontend developers while staying explicit enough for humans and AI agents to reason about.

Foundry UI

`axonyx-ui` is consumed as a Cargo package. CSS and component behavior are served through `/_ax/pkg/axonyx-ui/...`.

Public beta loop

The native stack is connected.

Scaffold

`create-axonyx` creates a registry-based app with `axonyx-runtime` and `axonyx-ui` from crates.io.

The site template starts from real `.ax` routes, a Foundry layout, backend drafts, and public assets.

Validate

`cargo ax check` catches `.ax` authoring errors, typed member mistakes, import issues, and route conflicts before the browser loop.

`cargo ax doctor --deny-warnings` verifies runtime, UI package CSS/JS, app shape, and source diagnostics.

`cargo ax melt --check` collects the project graph and fails before build if source diagnostics appear.

`cargo ax actions` prints route-local action contracts, including typed, optional, and defaulted form inputs.

`cargo ax actions --schema` gives the first machine-readable contract for forms, route actions, and future CMS tooling.

`cargo ax test` delegates to Aegis fast QA when `aegis.toml` exists, giving the first Cargo-native pre-deploy test loop.

`cargo ax db check` validates configured data access and `cargo ax db pull` writes a local schema snapshot for the compiler and docs loop.

API contracts

Backend routes can declare response contracts such as `route GET "/api/posts" -> Post[]`.

`cargo ax api --schema` prints Axonyx-native request and response contracts. `cargo ax api --openapi` exports OpenAPI 3.1 JSON with `components.schemas`.

cargo ax check
cargo ax api --schema
cargo ax api --openapi --out public/openapi.json
Read API contracts

Ship

`cargo ax build --clean` writes static route HTML, public assets, package CSS, and content manifests into `dist/`.

`cargo ax run start` now uses Tokio by default for hosted deploys, while `--transport std` remains available as a fallback.

This native site is the proving ground for the same stack.

Runtime

Built for sites first, apps next.

Static output

`cargo ax build --clean` writes route HTML and public assets into `dist/` for deployment experiments.

React Adapter

Teams can use the React adapter today at react.axonyx.dev while this native Axonyx site becomes the long-term framework documentation.

Beta Scope

Use it for experiments

Axonyx is ready for early framework sites, docs, landing pages, and architecture feedback. The current public beta includes Cargo packages, typed `.ax` checks, content collections, static build, Tokio start server, data-aware routes, and dev server flow.

Docs

Start small, inspect everything.

Try Axonyx

Copy/paste beta flow

  1. Install the scaffold CLIcargo install create-axonyx
  2. Install the Cargo helpercargo install cargo-axonyx
  3. Install fast QAcargo install axonyx-aegis --force
  4. Create and run a sitecreate-axonyx my-site --yes --template sitecd my-sitecargo ax run devcargo ax test

Axonyx Page Shape

Example

import { PageHeader } from "@axonyx/ui/foundry/PageHeader.ax"

page Home() {
  const shellClass = "docs-shell"

  return ASX {
    <Container max="xl">
      <PageHeader className={shellClass} title="Hello Axonyx">
        <Copy tone="lead">Readable .ax pages, rendered by Axonyx.</Copy>
      </PageHeader>
    </Container>
  }
}