A language for APIs and microservices
Do more with less.
Orbit is a statically typed language for APIs and microservices. It compiles fast and needs little to run, so it stays fast even under load.
Download 0.1.0-rc.2
PrereleasePublished
This is a release candidate, not a stable release. It is the newest build the project publishes, and it is what the version below reports.
There is no macOS build for this release. There was one in 0.1.0-rc.1 and it is not carried forward yet. There is no arm64 build for any release. Both are wanted and both are behind, and this page will offer them the day they exist.
No package manager install yet, and no checksum is published with the release. Verify the file size above against what your download reports before you run it.
route GET "/health" {
val uptime = system.uptime()
return ok 200 "{\"status\":\"UP\",\"version\":\"0.1.0-rc.2\",\"uptime_seconds\":" + uptime + "}"
}
route GET "/metrics" {
val total = system.http_requests_total()
val latency = system.latency_avg_us()
val workers = system.active_workers()
return ok 200 "{\"metrics\":{\"http_requests_total\":" + total + ",\"latency_avg_us\":" + latency + ",\"active_workers\":" + workers + "}}"
}Three decisions
Orbit is a small project on one machine. These are the choices that shape it.
The compiler is written in Orbit
It builds itself and reaches a fixed point you can verify. A committed C file is the trust root, so you need a C compiler and Python.
How the bootstrap worksOrbit compiles to C
Your platform's C compiler produces the executable. A service ships as one file, with no runtime to install beside it.
The pipelineDependencies stay small
Starting a server should not pull a framework tree in. Comfort that needs giant dependencies is not elegance.
Read the sourceWhat I can tell you, and what I can't
The measurement exists. The clean number does not yet.
The numbers I have come from a machine shared with other people's work. Component gains are real and isolated. The end-to-end difference sits inside the run-to-run noise, so a figure on this page would be decoration.
That is the honest state, not a stall. The method is written down and the gates run on every change. I will publish the numbers when they are clean, including the bad runs.
What 0.1 can't do
This list sits next to the documentation, not inside it. Each entry says what happens and how to work around it.
- No multipart uploads
- The file helper compiles and saves nothing. The file server tutorial uploads raw bodies and says so.
- No database migrations
- Tables are created on startup, never altered. Adding a field later leaves the existing table alone.
- No p50 or p99
- The runtime reports a mean in microseconds, not a distribution. What isn't measured isn't exposed.
- One host per cluster
- The cluster command starts copies on this machine. There's no shared state, no proxying, and no failover.
The full list, with workarounds, is inknown limitations.
Run it in five minutes
You need a C compiler, Python 3.10 or newer, and git. That is the whole toolchain. Clone, build the compiler, and run one of the examples.
git clone https://github.com/joacokhzyx/orbit-lang.git
cd orbit-lang
python scripts/build_selfhost.py --out orbit
./orbit build examples/health_service.orb -o health_service
./health_service 8080
curl http://127.0.0.1:8080/health