lppHomeLanguageDesignProgressRoadmapChangelogDeploy

lpp (lowlevelplusplus)

A small, memory-safe systems language and web framework for Linux, built so that software stops wasting memory and CPU.

$ lpp examples/web.lpp
listening on http://127.0.0.1:8001

$ curl localhost:8001/hello/world
Hello, world!

The example web app is a 17 KB binary. With four workers the whole server uses 80 KB of memory (PSS, measured with make bench).

Quick start

make            # build the compiler (needs cargo)
make test       # 54 checks: examples, traps, rejected programs, HTTP edge cases
make bench      # record size, memory and throughput baselines
make web        # serve examples/web.lpp on :8001
make install    # optional: lpp -> ~/.local/bin, std -> ~/.local/share/lpp

CLI

CommandWhat it does
lpp app.lpp / lpp run app.lppcompile and run
lpp build app.lpp [-o out]write a static binary
lpp check app.lpptype-check every function, write nothing
lpp versionprint the version

A web app

use io;
use http;

fn handle(conn: int, method: str, path: str) -> int {
    if str_eq(path, "/") { return http_respond(conn, 200, "text/plain", "Hello!\n"); }
    return http_respond(conn, 404, "text/plain", "not found\n");
}

fn main() -> int { return http_serve(8001); }

Layout

compiler/   the lpp compiler and CLI (Rust, no dependencies)
std/        standard library: sys (trusted), io, net, http
examples/   exit, hello, bounds (safety demo), web
tests/      run.sh: run/, reject/, web.sh
bench/      bench.py and recorded results
site/       lpp.olibuijr.com: server.lpp and the docs builder
docs/       language reference, design and roadmap

Docs and progress: https://lpp.olibuijr.com. See docs/language.md, docs/design.md and docs/roadmap.md, docs/progress.md and docs/deploy.md.

Status: 0.2.0. HTTP only for now; HTTPS (TLS 1.3 written in lpp) is on the roadmap.