The official website for the Rux programming language, built with Nuxt 4, Nuxt Content 3, and Nuxt UI 4.
This application contains three main areas:
- Documentation and blog — more than 550 Markdown pages, prerendered as a fully static site.
- Package registry — a client-side interface under
/packages. - Playground — a browser-based Rux editor and runner under
/play.
The registry and playground communicate with the separate Rust rux-lang/Server service at https://api.rux-lang.dev. This repository contains only the website; its sole Nitro server route generates the blog RSS feed during the static build.
- Node.js 24 (see
.nvmrc) - npm
npm ci
npm run devThe development server runs at http://localhost:3000. Documentation, blog, and marketing pages work without any other service.
Registry pages expect the Rux server at http://localhost:8080 by default. The playground additionally requires the server's playground broker and sandbox. See the rux-lang/Server documentation for its local setup.
.
├── app/
│ ├── assets/ # global CSS
│ ├── components/ # site, content, registry, and playground UI
│ ├── composables/ # shared API, authentication, and navigation state
│ ├── layouts/ # default, documentation, and registry layouts
│ ├── pages/ # marketing, blog, registry, and playground routes
│ ├── plugins/ # client initialization
│ ├── types/ # application types
│ └── utils/ # parsing, normalization, and domain utilities
├── content/
│ ├── docs/ # five documentation books under /docs
│ ├── blog/ # blog posts
│ └── partials/ # Markdown fragments embedded in Vue pages
├── grammars/ # Rux TextMate grammar used by Shiki and CodeMirror
├── public/ # static assets, fonts, headers, and redirects
├── scripts/ # build helpers and generated-site verification
├── server/ # prerendered blog RSS route and feed serializer
├── test/ # Vitest and build-quality tests
├── data/ # CLI contract and benchmark results (one JSON file per machine)
├── content.config.ts # Nuxt Content collections and schema
└── nuxt.config.ts # Nuxt, Nitro, sitemap, icon, and runtime config
Nuxt Content maps routable Markdown under content/ to URLs based on its path. Documentation navigation is derived from the filesystem—there is no sidebar file to edit. Numeric prefixes control ordering and are removed from URLs, while .navigation.yml files provide directory titles.
Images belong in public/images/ and are referenced from /images/....
Run commands from the repository root:
| Command | Action |
|---|---|
npm run dev |
Start the development server at localhost:3000 |
npm run build |
Create a Nuxt server build |
npm run generate |
Generate the static site in .output/public/ |
npm run generate:hosting |
Generate the production site and add the live registry sitemap |
npm run preview |
Preview a production build |
npm run lint |
Lint Vue and TypeScript source |
npm run typecheck |
Run Nuxt type checking |
npm test |
Run the Vitest suite |
npm run format:check |
Check repository formatting with Prettier |
npm run verify |
Verify routes, links, metadata, and rendering in a generated site |
npm run test:quality |
Run Lighthouse checks against a previously generated site |
npm run test:hosting-build |
Exercise the production hosting build |
npm run verify checks .output/public, so run a static build first:
npm run generate
npm run verifyThe verification gates derive their expectations from the repository:
| Gate | Checks |
|---|---|
verify:routes |
Every Markdown page was generated and ordering prefixes did not leak |
verify:links |
Internal links, assets, and page anchors resolve |
verify:meta |
Canonical URLs, titles, and social metadata are complete |
verify:render |
Syntax highlighting, prose components, fonts, and themes render |
CI runs linting, type checking, unit tests, static generation, generated-site verification, and supply-chain checks.
Only main is deployed. On every push to main (or a manual run), .github/workflows/deploy.yml runs npm run generate:hosting with NITRO_PRESET=cloudflare-pages-static, verifies the result, and uploads dist to Cloudflare Pages with wrangler pages deploy. Cloudflare itself builds nothing, and dev and pull requests are only checked by CI.
The deploy needs a Direct Upload Pages project and three repository settings:
| Setting | Kind | Value |
|---|---|---|
CLOUDFLARE_API_TOKEN |
Secret | API token with the Account › Cloudflare Pages › Edit role |
CLOUDFLARE_ACCOUNT_ID |
Secret | The Cloudflare account ID |
CLOUDFLARE_PAGES_PROJECT |
Variable | The Pages project name |
The output directory is dist, not the .output/public a local build produces: the cloudflare-pages-static preset writes the site there. Locally Nuxt symlinks dist to .output/public, so either path works on a developer machine.
Production builds use NUXT_PUBLIC_API_BASE_URL, RUX_SITEMAP_API_BASE_URL, and RUX_SITE_ORIGIN to point the client and generated sitemap at the deployed services. The registry sitemap is best-effort: if the API is unreachable, the build logs a warning and publishes a sitemap of content routes alone rather than failing.
Pull requests must target dev; CI rejects pull requests opened against main.
To add documentation, create a Markdown file under content/docs/. Routes and navigation are generated from the content tree, so no route or sidebar registry needs updating.
/benchmarks shows the two benchmarks of rux-lang/Benchmarks for every machine that ran them: the program benchmark (dotnet run --project Runner -c Release -- all) and the compile benchmark (… -- compile). To publish results, run both on each computer, gather their Results/<date>-<os> and Results/<date>-compile-<os> folders in one Results folder, and import it:
npm run import:benchmarks -- ../Benchmarks/ResultsThe importer reads which benchmark a folder holds from its results.json, and which computer ran it from the CPU and operating system listed in data/benchmarks/machines.json. It writes data/benchmarks/apps/<machine>.json and data/benchmarks/compile/<machine>.json, keeping the newest run of each, and touches only files that change. A computer that is not in machines.json yet is imported once on its own, with its id, label and place in the machine tabs:
npm run import:benchmarks -- ../Benchmarks/Results/20261015-204916-linux ../Benchmarks/Results/20261015-214928-compile-linux --machine i5-8250u --label "Laptop · Core i5-8250U" --order 3A new machine needs no code change, and a machine that has run only one of the two benchmarks shows the other as not run yet.
Licensed under the MIT License.