ruxlang 0.5.1

Rux: a pure-Rust, web-flavored UI language that renders natively on the GPU. Run, check and format .rux files.
ruxlang-0.5.1 is not a library.

Rux

A pure-Rust, web-flavored UI language that renders natively on the GPU, with no browser and no webview.

You write a single .rux file with familiar <template> / <style> / <script> sections and literal CSS. Rux lays it out with a real flexbox and grid engine, paints it in a native window, and reloads live as you edit.

cargo install ruxlang     # installs a `rux` command

rux run app.rux

<template>
  <screen class="app">
    <text class="count">{{ n }}</text>
    <button class="btn" @tap="n = n + 1">
      <text>Add one</text>
    </button>
  </screen>
</template>

<style>
  .app { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 32px; }
  .count { color: #a6e3a1; font-size: 48px; font-weight: 700; }
  .btn { padding: 12px 20px; background: #313244; border-radius: 8px; cursor: pointer; }
</style>

<script>
  let n = signal(0);
</script>

The toolchain

Neither of these needs a window or a GPU, so both work in CI:

rux check .                   # path:line:col: severity: message

rux check --deny-warnings .   # warnings fail too

rux check --format json .     # for an editor

rux fmt .                     # format in place

rux fmt --check .             # verify only, exits non-zero

What this is

The bet is one specific combination: the web's authoring ergonomics (literal CSS, a handful of HTML-like elements) but pure Rust, GPU-native, with no JavaScript and no new DSL. The guiding rule is that layout never appears in markup: there is no <Column>, <Padding> or <Center>, because those are display: flex, padding and justify-content on a <view>.

Rux is 0.x and experimental. If you need to ship an app this quarter, use Flutter, React Native or Slint. Rux exists to find out whether that corner is a nicer place to build.

Licence

Dual licensed under Apache-2.0 or MIT, at your option.