CLS is distributed as source and built with Cargo. A single workspace build compiles all four crates —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/elfrask/cls/llms.txt
Use this file to discover all available pages before exploring further.
cls-core, cls-runtime, nodos/clx, and nodos/clxr — and produces two binaries: clx, the full development CLI, and clxr, the lightweight packaged-app runtime. There are no external system dependencies for the core runtime; the fs and http node modules use Rust’s standard library directly.
Requirements
Before building, make sure you have the following available in yourPATH:
- Rust stable, edition 2021 — version 1.70 or higher is recommended. Install or update via rustup.
cargo— ships with Rust; confirm withcargo --version.rustc— confirm withrustc --version.
An optional C compiler and
make are only needed if you intend to use the platform build scripts. They are not required to compile the CLS workspace itself.Build Steps
Build the workspace
Compile all crates in one command. Use the debug build for development or the release build for production use:Cargo resolves the workspace members defined in
Cargo.toml — cls-core, cls-runtime, nodos/clx, and nodos/clxr — and builds them in dependency order.Where Binaries Land
After a successful build the compiled executables are in the Cargo output directory:| Build type | clx location | clxr location |
|---|---|---|
| Debug | target/debug/clx | target/debug/clxr |
| Release | target/release/clx | target/release/clxr |
.exe suffix: target/debug/clx.exe and target/debug/clxr.exe.
Add the appropriate directory to your PATH so you can invoke clx and clxr from any directory.
Platform Scripts
Thescripts/ directory contains thin wrapper scripts for both Unix and Windows. Use them to invoke the binaries without modifying your PATH, or as a starting point for CI pipelines:
| Script | Platform | Purpose |
|---|---|---|
scripts/clx.sh | Unix / macOS | Run clx |
scripts/clxr.sh | Unix / macOS | Run clxr |
scripts/clx.cmd | Windows | Run clx |
scripts/clxr.cmd | Windows | Run clxr |
scripts/clx-build.sh | Unix / macOS | Build clx crate |
scripts/clxr-build.sh | Unix / macOS | Build clxr crate |
scripts/clx-build.cmd | Windows | Build clx crate |
scripts/clxr-build.cmd | Windows | Build clxr crate |
Building Individual Crates
If you only need one binary — for instance, to shipclxr alone in a production container — build the specific crate with -p:
File Extensions Reference
| Extension | Description |
|---|---|
.clsx | CLS source code |
.clsapp | Packaged application — zip bundle produced by clx build |
.clslib | Compiled library — zip format, planned for the WASM backend |
.clbin | Compiled WASM binary — future WASM codegen output |
cls.json | Project manifest — entry point, compiler settings, sandbox policy, dependencies |
.clsi | Type interface file — exported declarations for type maps and editor autocompletion |