Get started

Chelis 0.19.1 runs on Linux x86_64 and macOS arm64 and compiles programs to native code.

  1. Install

    chelisup is the Chelis toolchain manager: it downloads compilers, keeps several versions side by side, and makes chelis run the right one. Each release ships chelisup.sh, a short script that detects your platform and installs chelisup into ~/.chelis/bin. The commands below fetch that script, install chelisup, then install the compiler.

    Linux x86_64

    Archive chelis-v0.19.1-linux-x86_64-static.tar.gz

    The static build needs no system libraries, so it starts on any distribution. A build for glibc 2.31 is also attached to each release.

    macOS arm64

    Archive chelis-v0.19.1-darwin-arm64.tar.gz

    # Get the installer script from the latest release
    $ gh release download -R Chelis-Lang/chelis -p chelisup.sh
    # Install chelisup into ~/.chelis/bin
    $ sh chelisup.sh
    # Put ~/.chelis/bin on your PATH (add this line to ~/.zshrc or ~/.bashrc)
    $ export PATH="$HOME/.chelis/bin:$PATH"
    # Install the compiler and confirm it runs
    $ chelisup install 0.19.1
    $ chelis --version

    The first install becomes the default version outside any project. chelisup list-installed shows what is installed, and chelisup default <version> changes the default. The release archives above hold the same compiler if you would rather unpack one yourself.

  2. Set up a project

    In a project with a reef.toml, chelis reef setup installs the compiler version it pins (through chelisup), installs dependencies when reef.lock exists, and prints a health summary.

    $ chelis reef setup

    Inside the project, chelis runs the version reef.toml pins.

  3. Run a first check

    Save this as portfolio.ch and check it.

    portfolio.ch

    def portfolio_return(w: tensor[3, f64], r: tensor[3, f64]) -> tensor[f64] = {
      weighted = mul(w, r)
      weighted |> sum(0)
    }
    $ chelis check portfolio.ch

    Passed: score 1, 0 errors, exit status 0.

    Change r to tensor[3, 1, f64] and check again to see the compiler stop at mul(w, r).

  4. Build

    chelis build compiles a program to native code.

    $ chelis build portfolio.ch --output out/