Getting Started
Install the Interpreter
From the repository root:
pip install .
Run Your First Program
Interpreted Mode
Run directly with the raml interpreter:
raml examples/Language/01_basics.rml
Compiled Mode
Compile directly to an executable with ramlc:
# Compile to executable (output defaults to input filename)
ramlc compile examples/Language/01_basics.rml
# Or specify output path
ramlc compile examples/Language/01_basics.rml -o /tmp/my_program
# Run the compiled binary
./01_basics
To only generate C files without building (e.g. for custom gcc flags):
ramlc compile examples/Language/01_basics.rml -o /tmp/c_output --c-only
cd /tmp/c_output
gcc -o my_prog main.c raml_runtime.c -lm -O2
File Basics
- Raml files use the
.rmlextension. - Programs typically start at the
:start:label. - Blocks are defined by indentation (4 spaces is the convention).
- Comments use
//.
Minimal Program
:start:
print "hello from raml"
Try Application Examples
Interpreted
raml examples/Apps/calculator.rml
raml examples/Apps/tictactoe.rml
Compiled
ramlc compile examples/Apps/tictactoe.rml -o /tmp/tictactoe
/tmp/tictactoe
Next Steps
Once the example runs, continue with the Language Guide to explore syntax, types, control flow, and memory features.