Skip to content
Plumlang

Programming language

A small, fast, memory-safe programming language.

Static types, objects, modules, tasks and an HTTP server, compiled to bytecode and run by one plum binary with no dependencies.

Pre-alpha, built in the open · roadmap · An Elixpo production

seed math

root GREETING = "Hello"

tree Planet {
    name: str
    radius_km: float

    branch area() -> float => 4.0 * math.PI * self.radius_km ** 2
}

plant planets = [Planet("Mercury", 2439.7), Planet("Earth", 6371.0)]

for p in planets {
    drop("{GREETING}, {p.name}! Surface: {p.area():.0} km²")
}
Hello, Mercury! Surface: 74796748 km²
Hello, Earth! Surface: 510064472 km²

01 · Why Plumlang

Easy to write, fast to run, safe by design.

Three promises, and the evidence for each.

Easy to write

No semicolons, no main, no brackets around conditions; logic reads as words.

plant basket = ["plum", "pear", "fig"]

for fruit in basket {
    if fruit != "pear" and not fruit.starts_with("x") {
        drop("I like {fruit}s")
    }
}
I like plums
I like figs

Fast to run

Bytecode on a small virtual machine, with no garbage-collector pauses.

20-million-step loop, against Python 3.14
2.6× faster
net.http requests a second, one server process
126,832

Linux x86_64, GCC 15.2 -O2. Benchmarks and method

Safe by design

Types are checked before anything runs, values that may be missing say so, and every error points at the fix.

branch find_age(name: str) -> int? {
    plant ages = {"ada": 36, "grace": 45}
    return ages.get(name)
}

plant age = find_age("bob")
drop(age + 1)
maybe-none.plum:7:6: error[E0408]: '+' can't use int?, which may be none; give a default with '??' or check it with 'if plant' first
7 | drop(age + 1)
  |      ^~~~~~~
1 error

02 · Install

One command, one binary.

The installer puts plum on your PATH after checking the download against the release's checksums.

Linux and macOS

curl -fsSL https://github.com/plumlang/plumlang/releases/latest/download/install.sh | sh

Windows

irm https://github.com/plumlang/plumlang/releases/latest/download/install.ps1 | iex

From source, with a C11 compiler

git clone https://github.com/plumlang/plumlang
cd plumlang && make

Every build is listed with its checksum on GitHub Releases. Homebrew and winget: coming soon.

04 · Build

Servers and command-line tools.

Files, JSON, sockets and HTTP are in the standard library; each connection gets its own task, with no async.

An HTTP server

seed net.http

plant app = http.server()

app.get("/hello/:name", (req) => http.text("Hello, {req.params["name"]}!"))
app.get("/add", (req) => {
    plant a = int(req.query.get("a") ?? "0")
    plant b = int(req.query.get("b") ?? "0")
    return http.json({"a": a, "b": b, "sum": a + b})
})

app.listen(8080)
$ plum run server.plum &
$ curl localhost:8080/hello/you
Hello, you!
$ curl "localhost:8080/add?a=2&b=40"
{"a":2,"b":40,"sum":42}

A command-line tool

# count.plum: lines and words in each file named on the command line
seed fs
seed os

plant files = os.args()
if len(files) == 0 {
    drop("usage: plum run count.plum FILE...")
    exit(2)
}

for path in files {
    try {
        plant text = fs.read(path)
        drop("{path}: {len(text.lines())} lines, {len(text.split())} words")
    } catch e: IOError {
        drop("{path}: {e.message}")
    }
}
$ plum run count.plum notes.txt missing.txt
notes.txt: 2 lines, 4 words
missing.txt: read("missing.txt"): No such file or directory

06 · Contribute

Built in the open.

Created by Ayushman Bhattacharya, Subhro Koley and Rohan Hudati. Issues, ideas and pull requests are welcome; the roadmap lists what comes next.

Source-available under the Plumlang Commercial License 1.0: free for personal, educational, research and other non-commercial use. Programs you write are yours.