Packages

Community packages live in the std-contrib catalog. A package is just a URL: it is fetched over HTTPS and inlined at compile time — no package manager, no install step, no lockfile. Every package is plain Lumen, statically typed, and tested.

Using a package

Import a package's export straight from its URL and build as usual.

import greet from "https://lumen-lang.org/package/std-contrib/hello/hello.ts";

console.log(greet("world"));   // Hello, world!

lumen-lang.org/package/std-contrib/<name>/<file>.ts redirects to the package's repository; the raw GitHub URL works too.

Catalog

PackageWhat it does
hello Minimal greet function; the canonical URL-import example.
greeter Two-file package; demonstrates recursive URL-relative imports.
args Command-line flag and option parsing — hasFlag, optionValue, positional arguments.
mathx Integer math helpers — gcd, lcm, ipow, isPrime, clampInt.
geo 2D point helpers — distanceSq, manhattan.
quickjs Embed a JavaScript sandbox via FFI; set, eval, and read values across the boundary.

quickjs links a native library through the C FFI, so it is built locally (copy its files and link the engine) rather than fetched purely by URL. Its page documents the build.

Contributing

One package per directory, statically typed, tested, current-language features only, with an entry in the catalog. See CONTRIBUTING in the std-contrib repository.