Introduction

Lux — Lux — reactive, energy-aware programming language compiling to flowG.

This is the official documentation for Lux. The full source code lives in the private -core mirror; the public release surface is at openIE-dev/lux-lang.

What you'll find here

  • Install — get the openie-lux binary on your machine
  • Hello, Lux — first program in 30 seconds
  • Tutorial — a 30-minute hands-on guided tour
  • Reference — every feature, every flag, every API
  • Cookbook — task-oriented recipes
  • Design — why Lux exists and how it fits with the rest of openIE-dev

The openIE-dev ecosystem

Lux is one of five public openIE-dev projects. All five share a common substrate (flowG) and energy-metering layer (substrate-energy):

  • flow-g — the IR + runtime substrate
  • lux-lang — reactive language compiling to flowG
  • jmax — math-native language
  • joule-lang — energy-budgeted compiled language
  • jouledb — energy-metered database

License

Lux binaries are distributed under BSL-1.1. Documentation under CC-BY-4.0. Examples under Apache-2.0.

Install

openie-lux is published to crates.io and to GitHub Releases.

Fastest: cargo binstall

cargo binstall openie-lux

cargo-binstall fetches the prebuilt binary for your platform from GitHub Releases without compiling anything.

If you don't have cargo-binstall yet:

cargo install cargo-binstall

From source: cargo install

cargo install openie-lux

This compiles the source. Slower; useful if your platform isn't in our prebuilt list.

Direct download

curl -fsSL -o openie-lux.tar.gz \
  https://github.com/openIE-dev/lux-lang/releases/latest/download/openie-lux-$(uname -s)-$(uname -m).tar.gz
tar xzf openie-lux.tar.gz
mv openie-lux-*/openie-lux /usr/local/bin/

Verify

openie-lux --version

Hello, Lux

The minimum example. See the source in examples/hello/.

For a richer walkthrough, see the tutorial.

Tutorial

A 30-minute guided tour of Lux from install to a working program.

Tutorial chapters coming with v0.2.0. For now see examples/ for runnable code.

Reference

Complete API, syntax, and runtime reference.

Reference chapters coming with v0.2.0. For embedding APIs see docs.rs/openie-lux.

Cookbook

Task-oriented recipes.

Cookbook recipes coming with v0.2.0.

Why Lux

Lux exists because [reasoning forthcoming with v0.2.0 docs].

Position in the openIE-dev ecosystem

See How it fits.

How Lux fits the openIE ecosystem

Five public projects share a common substrate:

                       lux-lang   jmax    joule-lang
                            \     |     /
                             \    |    /
                              ▼   ▼   ▼
                             flow-g  ←  ← ← jouledb (metered persistence)
                                ▲
                                │
                          substrate-energy
                              (joules)

[Detailed design discussion in v0.2.0 docs.]