Skip to content

Repository files navigation

The Compose Programming Language

println("'Hello, world' from Compose!");

Compose is a functionally flavoured interpreted programming language with Rust-like syntax.

Features:

  • Expression focused: blocks and control flow (if, match, loops) are expressions and produce values.
  • Functions as first-class citizens
  • High quality diagnostics
  • Variables are immutable by default
  • Garbage collection
  • Portable: runs on any platform that supports rust

Compose is being developed as a hobby project and is not intended for production use.

For more thorough documentation about the language, embedding the language in your application, or using the CLI check out the docs.

CLI Quick start

If you want to try out Compose, the easiest way is to use the CLI.

The compose CLI lets you run Compose programs, explore them interactively, and inspect errors.

Installation

Install the latest version from GitHub using Cargo:

cargo install --git https://github.com/Dutch-Raptor/compose.git

After installation, the compose executable will be available on your PATH:

compose --version

Usage

Create a new file called hello.cmps with the following contents:

println("Hello, from Compose!")

and run it:

compose file hello.cmps

This should print Hello, from Compose! to the console.

Run a file

compose file hello.cmps

Start a REPL

compose repl

Load a file in the REPL:

compose repl --from prelude.cmps

Explain an error

compose explain E0003

This gives examples, explanations, and suggested fixes.

Releases

Packages

Used by

Contributors

Languages