Skip to content
uosPublic

About

A minimal and extensible configuration language for humans working with robots.

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Repository files navigation

Ratslang logo

Ratslang

A compact configuration language for physical systems, with typed units, readable defaults, and Rust integration.

sensor {
  distance = 25cm
  timeout = 500ms
}
backend = CPU

Ratslang supports namespaces, includes, references, arrays, ranges, and physical quantities. Comments can describe settings and declare constraints. Ratslang also provides serde integration, source-preserving edits, a configuration CLI, and an LSP.

Getting started

[dependencies]
ratslang = "0.5.0"
let config = ratslang::compile_code("sensor.distance = 25cm\n")?;
let distance = config.vars.resolve("sensor.distance")?;

See getting started for serde configuration and defaults. The core compiler requires Rust 1.85.1 or newer. The LSP requires Rust 1.95 or newer.

Documentation

Guide Covers
Language Values, assignments, arrays, ranges, and references
Units Time, length, mass, angle, frequency, velocity, and acceleration
Schemas Enums, bounds, required settings, and deprecations
Serde Derived Rust config types and typed uom quantities
Editing Preserve comments, includes, and original source
Compiler Resolved values, macros, and provenance
API reference Published Rust APIs

Documentation source · Website · Build the documentation

Editor support

The LSP uses local or HTTPS defaults for completion, hover docs, diagnostics, definitions, and fixes. See the editor guide.

Install the server

cargo install ratslang-lsp --locked

Ensure ~/.cargo/bin is on the editor's PATH.

Helix

Follow the Helix setup for LSP and tree-sitter.

Neovim

Follow the Neovim 0.11+ setup for the native client.

VS Code

Follow the VS Code setup to install the extension.

Command-line tools

cargo install ratslang-cli --locked

Use check, fmt, explain, generate, minimize, and migrate to inspect and edit configuration. See the CLI guide.

License

MIT OR Apache-2.0. See LICENSE-MIT and LICENSE-APACHE.

About

A minimal and extensible configuration language for humans working with robots.

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Contributors

Languages