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.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.From a checkout of the
ljos-ui repository, install the pinned tools with mise and run the verification tasks: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: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:In your Rust code, import
ljos::prelude::*, create an engine with ljos::engine(), and register your module with engine.register_module(ljos::module!(...)).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: