Skip to content

spectrelang/spectre

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,912 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spectre

License Status Stars

This repository contains the compiler for the Spectre Programming Language.

Spectre is a statically typed, design-by-contract language aiming to offer low-level control in combination with explicit correctness. The compiler is written entirely in Spectre itself.

Resources:

Installation

Prerequisite: cmake

Run the following in the terminal:

curl https://spectrelang.org/get.sh | sh

Then run to confirm installation:

spectre -v

The compiler is tested under MacOS aarch64 and Linux x86_64, a Windows implementation exists, though is currently not as maintained.

An example program:

val stdio = use("std/stdio")

pub fn main() void = {
    val xs = ["hello", "world", "this", "is", "a", "test"]
    for x in xs {
        trust stdio.print("{s}\n", {x})
    }
}

License

GPL-3.0-only - (C) Navid M - 2026

Sponsor this project

  •  

Packages

 
 
 

Contributors