Install Sere

Portable Pre-release v0.1.0 is on GitHub. Unzip it, run install.ps1 , and compile. Building from source is still how you work on the compiler itself.

Portable zip

pre-0.1.0 — copy to %LOCALAPPDATA%\Programs\Sere, add PATH, set SERE_STDLIB / SERE_LLVM_DIR .

From source

Clone the repo, bootstrap LLVM, configure with CMake, and build. Developer scripts, not end-user steps.

Build from source

Portable pre-release

Unzip Portable Pre-release v0.1.0, then run the script. LLVM is reused from a previous bootstrap or downloaded — it is not stored in git. After install, a new terminal should run sere --version without this repository.

powershell
# after unzipping pre-0.1.0.zip
.\install.ps1
sere --version

Options: -Prefix, -NoPath, -Associate, -Editor, -Msvc, -DownloadLlvm. Uninstall with uninstall.ps1. From a source checkout, .\releases\stage.ps1 refreshes the folder from the current build.

Requirements

The Windows ClangCL presets expect these on the machine before you configure. LLVM is installed to %LOCALAPPDATA%\sere\toolchains\llvm-22.1.8 so it does not live inside OneDrive.

CMake

3.28 or newer. 4.3 is fine.

Ninja

1.11 or newer for the Windows presets.

MSVC

Visual Studio 2022 Build Tools, x64.

LLVM

22.1.8 official clang+llvm Windows MSVC archive.

Build from source

Work from the repository root in PowerShell. Dot-source env.ps1 so MSVC vcvars64 and SERE_LLVM_DIR stay in the current session.

01

Get the repository

powershell
git clone https://github.com/Sere-Language/sere.git
cd sere
02

Bootstrap and build

bootstrap.ps1 fetches the pinned LLVM. Then configure and compile the compiler itself.

powershell
.\scripts\bootstrap.ps1
. .\scripts\env.ps1
cmake --preset windows-clang-cl-relwithdebinfo
cmake --build --preset windows-clang-cl-relwithdebinfo
03

Run the tests

powershell
ctest --preset windows-clang-cl-relwithdebinfo --output-on-failure
04

Put sere on PATH

Session-only first. Add -Persistent when you want it in your user PATH.

powershell
.\bin\sere-path.ps1
.\bin\sere-path.ps1 -Persistent

Inno Setup (later)

The wizard is a later option. It stages the compiler, stdlib, LLVM 22.1.8, runtime, C API headers, optional Qt6, and the editor VSIX.

powershell
.\scripts\bootstrap-innosetup.ps1
sere --build-installer

Writes dist/Sere-<version>-setup.exe. Today, use the portable zip.

First project

sere build compiles src/main.sere.sere run builds and executes bin/<name>.exe . Dot-source activate.ps1 so this terminal stays put.

powershell
.\bin\sere.exe init myapp
cd myapp
. .\scripts\activate.ps1
sere build
sere run
deactivate

activate.ps1

Dot-source it. Running the script without the leading . starts a nested sere shell instead of staying in this terminal.

deactivate

Restores PATH and the prompt. It does not close the window.

Compile a file

Once sere is on PATH it finds the pinned LLVM clang / lld automatically. You only need scripts/env.ps1 when you are building the compiler itself.

powershell
sere examples\hello.sere -o hello.exe
.\hello.exe

sere --emit-llvm examples\hello.sere -o hello.ll
sere --emit-asm examples\hello.sere -o hello.s

Editor

The workspace extension in editors/vscode talks to sere --lsp . You get highlighting, diagnostics, hover, completion, rename, and go-to-definition.

powershell
.\scripts\package-vsix.ps1

That writes editors/vscode/sere-0.2.0.vsix and dist/sere-0.2.0.vsix . In Cursor or VS Code: Extensions → … → Install from VSIX… then reload the window. Set sere.compilerPath if the compiler is not on PATH.

Command reference

The driver is one binary. These are the flags and verbs you will use most.

sere init <app>

Create a new project with src/main.sere.

sere init-lib <name>

Create a kind = "lib" project you can pack.

sere pack

Write dist/<name>.slib from a library project.

sere build

Compile src/main.sere, or pack a lib project.

sere run

Build, then execute the binary.

sere refresh-bin

Copy compiler, runtime, and stdlib into ./bin.

sere --analyze file.sere

Print JSON diagnostics.

sere --lsp

Language server on stdin/stdout.

sere --emit-llvm

Write LLVM IR instead of an executable.

sere --emit-asm

Write native assembly.

sere --build-installer

Package the later Windows setup.exe.

Next

Compiler is up. Read the language, or jump into the stdlib.