Build Everything Easily — a small, friendly scripting language with a built-in native (LLVM) JIT.
Install · Quick start · Language tour · Packages · Bindings · Docs · Examples
fn greet(name) {
return "Hello, " + name + "!"
}
print(greet("world")) # Hello, world!
BeeLang is a dynamically-typed language designed to be easy to read and quick to pick up — familiar C-style syntax, first-class functions and closures, classes, a real module system, threads, and a batteries-included standard library. BeeLang runs on a compact C++17 runtime that transparently compiles hot numeric functions to native code with a built-in LLVM JIT, so tight loops run at near-native speed.
- Clean, familiar syntax —
let,fn,if/while/for,class, and both#and//comments. - String interpolation & slicing —
f"{name} has {n}",xs[1:3],s[-5:]. - An interactive REPL — run
beewith no arguments, orbee -e '<code>'for a one-liner. - First-class functions & closures — pass functions around, capture state, build counters and callbacks.
- Classes & single inheritance — constructors, methods,
this,super, and customstr()for printing. - Module system —
import,from … import, aliases, and a siblinglib/search path. - A package manager —
hive install <package>fetches a package intohive_modules/, whereimportfinds it. See the Hive guide. - Native modules & automatic bindings — call C/C++ from BeeLang, and generate the glue from a header with
beegen. See the bindings guide. - Error handling —
try/catch/finallywiththrowof any value. - Real stack traces — every error names the file, line and function it came from, all the way back to
<main>. - Threads with a GIL — safe shared state and real overlap for I/O-bound work.
- Rich standard library — strings, lists, dicts, math, files, time, random, env, and process execution — no imports needed.
- Native LLVM JIT — numeric-heavy functions are compiled to native code and run at near-native speed, transparently.
- First-class editor support — a VS Code extension with highlighting, completions, hovers, and snippets.
| Platform | Package | How |
|---|---|---|
| Windows | bee-0.3.1-amd64.exe |
Run the installer. It adds bee and hive to your PATH and gives .be / .bee files a bee icon so you can double-click to run them. |
| Debian / Ubuntu | bee-0.3.1-amd64.deb |
Double-click (opens your software centre) or sudo apt install ./bee-0.3.1-amd64.deb. Installs bee and hive. |
Grab the latest packages from the Releases page.
Requires a C++17 compiler, make, and LLVM (17/18) for the JIT:
sudo apt install llvm-18-dev # the JIT dependency (Debian/Ubuntu)
make # builds ./bee (with the native JIT), ./hive and ./beegen
make test # end-to-end tests for hive and module resolution
sudo cp bee hive beegen /usr/local/bin # (optional) put them on your PATHThe packaging scripts in packaging/ reproduce the release
artifacts: packaging/build-deb.sh builds the .deb,
and packaging/windows/ holds the Inno Setup script and a
guide for building the Windows installer.
Save this as hello.bee:
let names = ["Ada", "Alan", "Grace"]
for name in names {
print("Hello, " + name + "!")
}
Run it:
bee hello.beeHello, Ada!
Hello, Alan!
Hello, Grace!
A source file uses the .be or .bee extension. Statements may end with an
optional semicolon; newlines are not significant.
bee --version # bee 0.3.1
bee --help # usage and options
bee # an interactive REPL
bee -e 'print(1 + 1)' # run one linehive, BeeLang's package manager, ships with bee:
hive init # start a project (writes hive.json)
hive install greet # fetch a package into ./hive_modules
hive install greet@^1.2.0 # ... a particular version
hive install ./greet-1.2.0.pkg # ... or a local .pkg package
hive list # what's installedThen import it by name:
import greet
print(greet.hello("BeeLang"))
Dependencies resolve transitively, every download is checked against its
SHA-256, and hive.lock pins exact versions so a repeat install — or an
--offline one — gets the same bytes. Publishing is hive pack plus a static
file on any web server.
beegen reads a C++ header and writes the bindings for you — a native module
plus a BeeLang wrapper:
beegen shapes.hpp --module shapes # parses the header with libclang
./build.sh # compiles shapes_native.soimport shapes
from shapes import Rect
print(shapes.greet("BeeLang"))
let r = new Rect(3, 4)
print(r.area()) # calls the real C++
r.free()
C++ classes become BeeLang classes, enums become dicts, and anything that can't
be mapped is reported rather than silently dropped. Native modules load with
import, so binding a library never means rebuilding the interpreter.
|
Closures |
Classes & inheritance |
|
Modules |
Error handling |
Threads — overlap blocking work; the GIL keeps shared state safe:
fn download(url) { return exec("curl -s " + url).output }
let a = spawn(download, "http://example.com/a")
let b = spawn(download, "http://example.com/b")
print(join(a), join(b)) # both downloads ran concurrently
See the full Language Reference for everything: values, operators, control flow, the standard library, type methods, and more.
BeeLang ships with a built-in LLVM ORCv2 JIT. Functions that stay within a numeric subset are compiled to native code operating on unboxed doubles; the rest of your program runs on the runtime, with identical results. The JIT is enabled by default — just make sure LLVM (17/18) is installed before you build:
sudo apt install llvm-18-dev # Debian/Ubuntu — the JIT dependency
make # "Building with LLVM JIT via ..."
bee examples/13_benchmark.bee| Benchmark | Without JIT | With JIT |
|---|---|---|
fib(32) |
~11 s | ~0.014 s |
If LLVM isn't found at build time,
makefalls back to a JIT-less binary that behaves identically, just slower — handy for minimal environments.
A VS Code extension provides
syntax highlighting, completions (keywords, built-ins, .-methods, and file
symbols), hovers, and snippets — plus a bee icon for .be / .bee files. It
lives in its own repository and is versioned independently; see its
README to install.
BeeLang/
├── src/ # the C++17 interpreter (lexer, parser, resolver, VM, JIT)
├── examples/ # sample .bee programs
├── lib/ # standard-library modules search path
├── packaging/ # .deb builder + Windows (Inno Setup) installer
└── docs/LANGUAGE.md # full language reference
Issues and pull requests are welcome. To hack on the interpreter:
make # build
make run FILE=examples/01_hello.bee
make cleanBeeLang is plain C++17. The built-in native JIT uses LLVM (17/18) — install it
to build the default JIT-enabled bee; without it the build still works, just
without native compilation. Sources live in src/.
Released under the MIT License. © 2026 Atanu Debnath.