A compiled programming language whose memory is managed in regions the compiler infers: no garbage collector, no borrow checker, and no lifetime annotations in ordinary code.
Twelve short steps, each a program you can change and run โ right here in the browser.
The REPLโType a line, see its value; definitions stay for the next one.
InstallโOne command on macOS, Linux and Windows; nothing else to set up.
The languageโThe tutorial and the specification of the language, also as PDF.
Scaly compiles through LLVM to native code, checks that functions are pure, and runs a for loop in parallel when its body allows it โ with no parallel syntax at all. The compiler is written in Scaly and builds itself; so are its language server and the tool around it.
function is pure; a procedure may change what it marks mutable and do I/O. The compiler checks both.for whose body is provably independent runs through an adaptive parallel driver on every core; the same region model carries a program to a GPU or a cluster.run, build, test and packages from git โ no manifest, no lock file, no registry.The tour and the REPL run the real compiler, built for WebAssembly, in your browser tab: nothing is sent to a server, and nothing needs to be installed. The first visit loads about 7 MB; a program compiles and runs in a few hundred milliseconds.
Start the tour ยท open the REPL
macOS and Linux
Windows (PowerShell)
The installer puts three ready-made programs under ~/.scaly โ no sudo, no LLVM to install: scaly (the tool), scalyc (the compiler) and scalyls (the language server). It needs a C compiler for linking (clang; on Windows the Build Tools for Visual Studio, which it offers to install). Ready-made programs exist for macOS 26 on Apple silicon, macOS 15 on Intel, Ubuntu 26.04 on x86_64 and arm64, and Windows 10/11 on x86_64 and arm64; elsewhere the installer builds them from source. Details and other systems.
printf 'print("Hello, World!")\n' > hello.scaly
scaly run hello.scaly # compiled and run in process
scaly build hello.scaly -o hello # a native program
scaly new myapp # a project with a test
scaly # the REPL
define Shape union
(
Rect: (w: f64, h: f64)
Triangle: (base: f64, height: f64)
)
function area(s: Shape) returns f64
choose s
when r: Rect: r.w * r.h
when t: Triangle: t.base * t.height / 2.0
function total(shapes: Vector[Shape]) returns f64
{
var sum 0.0
for s in shapes ; a reduction: runs on every core
sum := sum + area(s)
sum
}
var shapes Vector[Shape](3)
shapes.put(0, Shape.Rect((w: 2.5, h: 4.0)))
shapes.put(1, Shape.Triangle((base: 3.0, height: 1.5)))
shapes.put(2, Shape.Rect((w: 0.5, h: 0.5)))
print "total area: `total(shapes)`" ; total area: 12.5
No semicolons, no return for the last value, and no annotations about where memory lives. Paste it into any step of the tour and run it.
The standard packages include an HTTP/1.1 and HTTP/2 server; this one answers on port 8080 on every core:
package http 0.2.0
use http.Request.Request
use http.Response.Response
use http.Router.Router
procedure hello(req: ref[Request], mutable res: ref[Response])
res.send_text("Hello, World!")
procedure greet(req: ref[Request], mutable res: ref[Response])
{
let name req.param("name")
let text "Hello, `name`!"
res.send_text(text.as_slice())
}
var app Router.create(Page.allocate_page())
app.get("/", &hello)
app.get("/hello/{name}", &greet)
serve(app, 8080)
scaly build server.scaly --release -o server && ./server
Each request is handled in a region of its own, freed when the handler returns. Beside the standard library: http, https (TLS 1.3), h3 (HTTP/3), tls, json, compress, and clients for PostgreSQL, Redis, SQLite and SQL Server. More on the HTTP stack's page.
| The tour | The language in twelve programs you run in the browser. |
| The tutorial | From a first program to packages and production builds. |
| The specification | The language end to end; its examples are executed by the test suite. As PDF. |
| VS Code | An extension on the language server: diagnostics as you type, hover, go to definition, references, rename, completion. Source-level debugging through DWARF with lldb. |
| The source | The compiler, the standard library and the packages, MIT licensed. |
A checkout builds the toolchain from the committed seed, the compiler as LLVM IR. It needs LLVM 21 with its headers (Homebrew's llvm@21, Ubuntu's llvm-21-dev lld-21 clang) and a C compiler:
git clone https://github.com/rschleitzer/Scaly && cd Scaly tools/build-from-seed.sh # -> scalyc/build/scalyc, scaly, scalyls tools/install.sh # put it on your PATH
Bug reports and questions are welcome as issues. Scaly is developed by one person; for a change larger than a fix, please open an issue first. A security problem goes privately, as SECURITY.md says. Scaly is MIT licensed.