Tooling

The rux command and the editor support: what each command does, and how to set them up.

One binary, rux, does everything: creates a project, runs it, checks it, formats it. There is no separate build tool, no package manager, and nothing to configure before the first window opens.

cargo install ruxlang

That puts a rux command on your PATH. It takes a few minutes, because it builds a GPU renderer and a text shaper from source. Nothing else is needed: no Node, no npm, no browser, no system GUI toolkit.

The commands

rux newCreate a project
rux runOpen a window
rux checkReport what is wrong, without opening one
rux fmtRe-indent, and format the CSS
rux vocabPrint what the runtime understands, for editors

Bare rux prints the usage, the way cargo and git do.

Editors

VS Code has an extension: syntax coloring, completions drawn from the runtime's own vocabulary, tag auto-closing, formatting and diagnostics.

Exit codes

Every command uses the same three, so a shell script or a CI job can act on them without special cases.

CodeMeaning
0Clean
1Problems found
2The request itself was wrong: no such path, an unknown flag

More in this section:

  • rux new: Create a project: the entry point, a component, and the two directories the runtime already looks in.
  • rux run: Open a window on a document, find the workspace entry point, and hot-reload as you type.
  • rux check: Report what is wrong with a file or a tree, without opening a window. The same loader the runtime uses.
  • rux fmt: Re-indent templates and scripts, format the CSS, and rewrite nothing else.
  • rux vocab: Print the elements, attributes, directives and honored CSS the runtime understands, as JSON, for editors.
  • Editor setup: The VS Code extension: syntax coloring, completions from the runtime's own vocabulary, tag auto-closing, formatting and diagnostics.