Skip to main content

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 is distributed as source and built with Cargo. A single workspace build compiles all four crates — 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 your PATH:
  • Rust stable, edition 2021 — version 1.70 or higher is recommended. Install or update via rustup.
  • cargo — ships with Rust; confirm with cargo --version.
  • rustc — confirm with rustc --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

1

Clone the repository

Fetch the source from GitHub and enter the project directory:
git clone https://github.com/elfrask/cls
cd cls
2

Build the workspace

Compile all crates in one command. Use the debug build for development or the release build for production use:
cargo build --workspace
Cargo resolves the workspace members defined in Cargo.tomlcls-core, cls-runtime, nodos/clx, and nodos/clxr — and builds them in dependency order.
3

Verify the binaries

Confirm both tools built correctly by checking the version and help output:
clx --version
clx -h
clx -h should print the full list of available subcommands: new, run, check, build, maptype, ast, repl, add, remove, install, and lsp.

Where Binaries Land

After a successful build the compiled executables are in the Cargo output directory:
Build typeclx locationclxr location
Debugtarget/debug/clxtarget/debug/clxr
Releasetarget/release/clxtarget/release/clxr
On Windows the executables carry a .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

The scripts/ 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:
ScriptPlatformPurpose
scripts/clx.shUnix / macOSRun clx
scripts/clxr.shUnix / macOSRun clxr
scripts/clx.cmdWindowsRun clx
scripts/clxr.cmdWindowsRun clxr
scripts/clx-build.shUnix / macOSBuild clx crate
scripts/clxr-build.shUnix / macOSBuild clxr crate
scripts/clx-build.cmdWindowsBuild clx crate
scripts/clxr-build.cmdWindowsBuild clxr crate

Building Individual Crates

If you only need one binary — for instance, to ship clxr alone in a production container — build the specific crate with -p:
cargo build -p clx    # Development CLI only
cargo build -p clxr   # Runtime executor only
Building clx alone is useful during active language development when you’re iterating on CLI subcommands. Building clxr alone is the right choice when packaging a minimal deployment image that only needs to execute pre-built .clsapp bundles.

File Extensions Reference

ExtensionDescription
.clsxCLS source code
.clsappPackaged application — zip bundle produced by clx build
.clslibCompiled library — zip format, planned for the WASM backend
.clbinCompiled WASM binary — future WASM codegen output
cls.jsonProject manifest — entry point, compiler settings, sandbox policy, dependencies
.clsiType interface file — exported declarations for type maps and editor autocompletion

Build docs developers (and LLMs) love