CLS is a modern programming language designed for modular, safe, cross-platform development. It ships with a complete toolchain: theDocumentation 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.
clx development CLI for building, type-checking, and running scripts, and clxr, the lightweight runtime for executing packaged .clsapp applications. CLS features static type inference, generic types, async/await coroutines, a JSX-like markup syntax called CMX, and a sandboxed virtual filesystem — all from a single Rust-powered interpreter.
Installation
Build CLS from source with Cargo and get the clx and clxr binaries ready.
Quickstart
Create your first CLS project, write a Hello World, and run it in minutes.
Language Guide
Explore CLS syntax, the type system, functions, classes, and modules.
CLI Reference
Full reference for every clx and clxr command and flag.
Standard Library
Built-in intrinsics plus math, json, async, fs, and http modules.
Embedding CLS
Integrate cls-core and cls-runtime into your own Rust application.
What makes CLS different
Static Type Checker
Run
clx check to catch type errors before execution. Supports generics, union types, literal types, and null safety — all without a compilation step.Async / Await
First-class coroutine support with
async function and await. Compose concurrent tasks with async.all() and async.race().CMX Markup
A native JSX-like syntax for describing component trees and structured data directly in CLS source — no external template engine needed.
Virtual Filesystem
Access files through protocol URIs (
app://, user://, tmp://, res://) for portable, sandboxed I/O across desktop and packaged environments.LSP Server
clx lsp starts a Language Server Protocol server for real-time diagnostics, completions, hover docs, and go-to-definition in any LSP-compatible editor.Embeddable Runtime
The
cls-core and cls-runtime Rust crates can be embedded in any Rust application to add CLS as a scripting language with a custom module resolver.Get started in three steps
Build from source
Clone the repository and compile the toolchain with Cargo:The
clx and clxr binaries appear in target/release/.Create a project
Use This creates
clx new to scaffold a new CLS project:cls.json and src/main.clsx with a starter main function.CLS requires Rust (edition 2021, version 1.70+) and Cargo. No other system dependencies are needed for the core runtime.