-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
From your first
.serefile to your first native executable.
Welcome to Sere.
If you've already read Home, you know the basic idea:
Python-like syntax. Static types. Native code. Low-level control.
This page gets you from zero to a working Sere program.
By the end of this guide, you'll know how to:
π οΈ Set up the Sere toolchain
π Create a Sere project
βοΈ Write your first
.sereprogramπ¨ Compile Sere source
βΆοΈ Run a Sere programπ§ Use variables and types
π§© Define functions
π¦ Work with collections
ποΈ Define structs
π§ͺ Analyze your code
βοΈ Understand what happens during compilation
Sere is currently developed around a native LLVM-based toolchain.
The compiler development environment currently targets:
Dependency | Version -- | -- CMake | 3.28+ Ninja | 1.11+ Visual Studio Build Tools | 2022 LLVM | 22.1.8For the complete CLI reference, see Compiler CLI.
Once you've moved beyond a single file, use the project tooling.
Create a project:
sere init myappEnter it:
cd myappBuild it:
sere buildRun it:
sere runClean generated files:
sere cleanThis gives larger Sere applications a consistent project workflow instead of requiring every project to invent its own build process.
You've now seen the basic shape of Sere.
From here, pick your path.
If you're here to write Sere:
If you're ready to make something:
If you're here to work on the compiler:
Try building this yourself:
struct Person:
name: str
age: i32
def introduce(person: Person) -> void:
print(f"Hello, I'm {person.name} and I'm {person.age} years old.")
def main() -> i32:
person = Person("Ada", 36)
introduce(person)
return 0
Compile it.
Run it.
Then start changing it.
Add another field.
Add another function.
Create a list of people.
Experiment.
That's where Sere starts becoming more than syntax.
You've got the basics.
Now it's time to learn how Sere actually works.
Or, if compiler internals are more your thing:
β Architecture
Welcome to Sere.
Now go build something.