Skip to content

Getting Started

This page assumes you’ve already installed Tulpar — if not, head to Installation for the one-line installer.

You can play with Tulpar directly in this page. Edit the snippet below and hit Run — no installation required:

Your First Program

Save the program to a file named hello.tpr, then run it from any terminal — tulpar is on your PATH after installation:

Terminal window
tulpar hello.tpr

The default tulpar <file> invocation AOT-compiles via LLVM and runs the resulting native binary. For instant startup at the cost of a small runtime overhead, use the bytecode VM instead:

Terminal window
tulpar --vm hello.tpr

To produce a standalone native executable you can ship without the Tulpar toolchain:

Terminal window
tulpar build hello.tpr # → ./hello (or hello.exe on Windows)

Tulpar also has a Read-Eval-Print Loop. Run the binary with no arguments to start it:

Terminal window
tulpar --repl

Type expressions or statements and see results immediately. Use Ctrl+D (Linux/macOS) or Ctrl+Z (Windows) to exit.