Casa is a statically typed, stack-based programming language for Linux.
"Hello, world!\n" print
- Linux on x86-64
- GNU assembler (
as) and a C compiler driver (cc)- For example, on Ubuntu, install the
binutilsandbuild-essentialpackages.
- For example, on Ubuntu, install the
Clone the repository and download the compiler and formatter:
git clone https://github.com/frendsick/casa.git
cd casa
./install.shYou can also run the installer directly:
curl -sSL https://raw.githubusercontent.com/frendsick/casa/main/install.sh | shCompile and run the hello-world example:
./casac examples/hello_world.casa -rCompile without running:
./casac examples/fibonacci.casa -o fib
./fibCommon compiler options:
| Option | Purpose |
|---|---|
-o, --output |
Set the output binary name |
-L, --library-path |
Add a module search directory |
-l, --link-library |
Link a native library |
-r, --run |
Run the program after compilation |
--keep-asm |
Keep the generated assembly file |
-v, --version |
Print the compiler version |
--verbose |
Print compiler progress |
Start with the Casa guide.
Use the topic references when you need exact behavior:
| Topic | Reference |
|---|---|
| Values and types | Types and Literals |
| Stack evaluation and operators | Operators |
| Bindings, functions, and lambdas | Functions and Lambdas |
| Branches, loops, and matching | Control Flow |
| Structs and methods | Structs and Methods |
| Enums and patterns | Enums |
| Generics and traits | Traits |
| Imports | Modules |
| Compiler operations | Built-in Intrinsics |
Library references:
| Topic | Reference |
|---|---|
| Optional values and errors | Optional Values and Errors |
| Collections and iterators | Collections |
| Text, characters, and output | Text and Characters |
| Files, directories, environment, and processes | Operating-System APIs |
| Logging, timing, arguments, JSON, and parsing | Specialist Libraries |
| Parser building blocks | Parser Library |
Tooling:
See the curated examples for runnable programs ordered from introductory to advanced.
Casa is self-hosted. Build the compiler with an existing casac:
./casac casa.casa -o casac -L lib