Getting Started with Sarlin
Create a project, check it, compile it to a native executable, and run it.
1. Install the compiler
Sarlin ships as a prebuilt binary. The compiler is developed in a private repository, so there is nothing to check out and nothing to build: you download the release for your platform from GitHub Releases and put it on your PATH. Released binaries are dual licensed under MIT OR Apache-2.0.
One other tool is needed:
clang15 or newer, which the compiler calls to turn its LLVM output into a native executable. Programs will not build without it.
Version 0.1.0
2026-09-06Download the matching .sha256 file from the release page and verify the archive before extracting it:
sha256sum --check sarlin-linux-x86_64.tar.gz.sha256For the Linux x86_64 release, unpack the downloaded archive:
tar -xzf sarlin-linux-x86_64.tar.gzThen move the sarlin binary somewhere on your PATH and confirm it runs:
sudo mv sarlin /usr/local/bin/sarlin
sarlin --versionsarlin 0.1.02. Create a project
sarlin new "My Project"created Sarlin project: my_projectThe project name is turned into a lower case folder name, so "My Project" becomes my_project. You get this layout:
my_project/
sarlin.project
.gitignore
source/
main.sar
output/sarlin.project marks the project root and describes it:
name: My Project
entry: source/main.sar
language: 1name and entry are required. The entry must name one of the .sar files under source/. The optional language setting is a whole-number compatibility version; 0.1.0 supports language version 1 and rejects projects asking for a newer one. Blank lines and lines beginning with # are ignored.
Every .sar file under source/ is part of the project, including files in subfolders. Compiled executables go to output/, which the generated .gitignore excludes.
3. The program
source/main.sar starts as this:
func main() {
print("Hello from Sarlin")
}funcdeclares a function.mainis the program entry point.- Braces explicitly define the block.
printoutputs text.- Statements do not need semicolons.
4. Check your code
Running sarlin against a project checks it without compiling anything:
sarlin my_projectchecked 0 define(s), 0 class(es), and 1 top-level function(s)Errors are reported as file:line:column: error: message. This is the fast loop to stay in while writing code, since it skips the native build entirely.
5. Build and run
Adding build compiles the project to a native executable through LLVM and clang:
sarlin build my_projectbuilt native executable: my_project/output/my_projectThen run it directly. There is no separate run command:
./my_project/output/my_projectHello from Sarlin6. Where to go next
- Language reference, for syntax and semantics.
- Download, for the status of published builds.
- Get involved, to report a bug, request a feature or support development.