Elegant
Install Ljós
Install the Ljós toolchain, run the repository checks and add the ljos crate to a Rust project.
This page shows you how to set up the Ljós development environment, verify that the command-line tool and test suites work on your machine, and depend on the ljos crate from a Rust project.
What you need
Ljós is written in Rust (2024 edition) and uses mise to manage tools and repository tasks.
Nothing else needs to be installed to run QML applications, check files with ljos check, format QML with ljos fmt, or run tst_*.qml tests with ljos test: Ljós reads QML against its own type descriptions. Measuring an app against Qt needs a local qml6 (Qt 6.11 or newer); see Bringing existing QML.
Set up the toolchain from the repository
From a checkout of the ljos-ui repository, install the pinned tools with mise and run the verification tasks:
Shell
Copy
mise install
mise run check
mise run test
mise run features
Here is what each task does:
mise install installs the Rust toolchain and tools declared for the workspace.
mise run check runs the formatter check, clippy and parse_check.
mise run test runs the Rust unit and integration tests across the workspace crates.
mise run features runs the Gherkin behaviour scenarios headlessly on a software adapter (no GPU is required) and prints an ok/FAILED summary.
Once built, check that the ljos command is available:
Shell
Copy
ljos --help
Text
Copy
Ljós — the QML toolchain

Usage: ljos <COMMAND>

Commands:
  mcp      Serve the authoring MCP server on stdio
  i18n     Translation catalogues
  check    Compile QML projects and report what the compiler says; with `--stats`, how many expressions run in the tier-1 binding VM
  run      Open a window on a QML file; with `--watch`, apply every save to the running application
  render   Draw a project to a PNG without a window, after letting a stated time pass
  test     Run `TestCase`s of `tst_*.qml` files on a virtual clock and print results as Qt's runner does; exit status is number of failed tests
  fmt      Lay QML files out the one way the formatter knows (`-` for stdin/stdout)
  shaders  Compile GLSL 440 shaders of `ShaderEffect`s to `.ljsh` files beside them, for an application that compiles none at run time
  bench    Measure QML apps on Ljós and on Qt inside a memory/CPU limit
  observe  Open a window on a running application, like Erlang's observer
  attach   Serve a running application's inspector on stdio for an MCP client that starts servers as programs
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help
Use the ljos crate in a Rust project
If you are building a pure QML application, you only need the ljos command-line tool. If you want to register native Rust types with #[derive(QmlObject)] and #[qml_impl], add the ljos crate to your Cargo.toml:
TOML
Copy
[package]
name = "my-app"
version = "0.1.0"
edition = "2024"

[dependencies]
ljos = { path = "../../crates/ljos" }
In your Rust code, import ljos::prelude::*, create an engine with ljos::engine(), and register your module with engine.register_module(ljos::module!(...)).
Editor and agent setup
The ljos-ui repository includes a .mcp.json configuration file at its root. Coding agents that read .mcp.json can start ljos mcp automatically with no extra configuration. To wire an MCP client manually to your own project directory, run:
Shell
Copy
ljos mcp --project .
See also
Install Ljós
Install the Ljós toolchain, run the repository checks and add the ljos crate to a Rust project.
This page shows you how to set up the Ljós development environment, verify that the command-line tool and test suites work on your machine, and depend on the ljos crate from a Rust project.
What you need
Ljós is written in Rust (2024 edition) and uses mise to manage tools and repository tasks.
Nothing else needs to be installed to run QML applications, check files with ljos check, format QML with ljos fmt, or run tst_*.qml tests with ljos test: Ljós reads QML against its own type descriptions. Measuring an app against Qt needs a local qml6 (Qt 6.11 or newer); see Bringing existing QML.
Set up the toolchain from the repository
From a checkout of the ljos-ui repository, install the pinned tools with mise and run the verification tasks:
Shell
Copy
mise install
mise run check
mise run test
mise run features
Here is what each task does:
mise install installs the Rust toolchain and tools declared for the workspace.
mise run check runs the formatter check, clippy and parse_check.
mise run test runs the Rust unit and integration tests across the workspace crates.
mise run features runs the Gherkin behaviour scenarios headlessly on a software adapter (no GPU is required) and prints an ok/FAILED summary.
Once built, check that the ljos command is available:
Shell
Copy
ljos --help
Text
Copy
Ljós — the QML toolchain

Usage: ljos <COMMAND>

Commands:
  mcp      Serve the authoring MCP server on stdio
  i18n     Translation catalogues
  check    Compile QML projects and report what the compiler says; with `--stats`, how many expressions run in the tier-1 binding VM
  run      Open a window on a QML file; with `--watch`, apply every save to the running application
  render   Draw a project to a PNG without a window, after letting a stated time pass
  test     Run `TestCase`s of `tst_*.qml` files on a virtual clock and print results as Qt's runner does; exit status is number of failed tests
  fmt      Lay QML files out the one way the formatter knows (`-` for stdin/stdout)
  shaders  Compile GLSL 440 shaders of `ShaderEffect`s to `.ljsh` files beside them, for an application that compiles none at run time
  bench    Measure QML apps on Ljós and on Qt inside a memory/CPU limit
  observe  Open a window on a running application, like Erlang's observer
  attach   Serve a running application's inspector on stdio for an MCP client that starts servers as programs
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help
Show all 20 lines
Use the ljos crate in a Rust project
If you are building a pure QML application, you only need the ljos command-line tool. If you want to register native Rust types with #[derive(QmlObject)] and #[qml_impl], add the ljos crate to your Cargo.toml:
TOML
Copy
[package]
name = "my-app"
version = "0.1.0"
edition = "2024"

[dependencies]
ljos = { path = "../../crates/ljos" }
In your Rust code, import ljos::prelude::*, create an engine with ljos::engine(), and register your module with engine.register_module(ljos::module!(...)).
Editor and agent setup
The ljos-ui repository includes a .mcp.json configuration file at its root. Coding agents that read .mcp.json can start ljos mcp automatically with no extra configuration. To wire an MCP client manually to your own project directory, run:
Shell
Copy
ljos mcp --project .
See also