Get started¶
What is Candela, and why?¶
Warning
Candela is experimental and under active development (this documentation too). Little is set in stone.
Candela is a fast, statically-typed interpreted language that combines Rust-like syntax with Python's ease of use.
It aims to be a much faster alternative to Python that sits closer to low-level languages while staying approachable. You should like Candela whether you are a seasoned Rust developer or you have barely touched Python and are new to programming.
Candela's main selling points are:
- About 10x faster than Python and competitive with LuaJIT (-joff) in our benchmarks
- Statically typed, with full type inference and zero annotations
- FFI support: call C and dynamic libraries directly from Candela with a native, easy syntax
- Embeddable in other programs through a C ABI and a Rust host API
The goal of this documentation / tutorial is to show Candela's syntax and how it works by example more than by theory.
Installation¶
On macOS / Linux¶
Candela provides a macOS / Linux installer, which you can use to download and install Candela by running the following command in your terminal:
curl -fsSL https://raw.githubusercontent.com/lumen-fx/candela/main/install.sh | sh
This will install the latest Candela version in Library/Candela on macOS, and in /usr/local/lib/candela/ on Linux.
On Windows¶
Candela doesn't provide a Windows installer yet. You must manually download it from the latest release on GitHub.
Usage¶
Once installed, you can use the candela command like any other:
- To run the REPL, run:
candela - To run a
.cdlfile 1, run:candela file.cdl - To display Candela's current version, run:
candela -vorcandela --version - To display the available commands, run:
candela -horcandela --help
Benchmarks¶
-
Candela files have the
.cdlfile extension. ↩
