Fastest start
Run the published image.
docker run --rm -p 8080:8080 ghcr.io/greenways-ai/hoplite:latestcurl -i http://127.0.0.1:8080/helloThe image already contains Hoplite and the starter application.
Nginx + Hara · one application server
Hoplite packages Hara routes, worker-local execution, service lifecycle, and provider-neutral transport into one refined server. Choose a target below and bring a real endpoint online.
01 · First application
One endpoint, one published runtime, and no source checkout. Switch targets to get the exact path from install to first response.
(ns app
(:require [hoplite.core :as h]))
(defn hello [_]
{:status 200
:headers {"content-type" "text/plain"
"x-hoplite" "true"}
:body "Hello from Hoplite\n"})
(def app
(h/app
{:name "hello"
:resources
[["/hello" {:get {:handler #'hello}}]]}))Fastest start
docker run --rm -p 8080:8080 ghcr.io/greenways-ai/hoplite:latestcurl -i http://127.0.0.1:8080/helloThe image already contains Hoplite and the starter application.
macOS or Linux
brew install greenways-ai/tap/hoplite
curl -fsSL https://raw.githubusercontent.com/greenways-ai/hoplite/main/scripts/new-app.sh | sh -s -- hello
cd hello && hoplite serve foreground --mode prod .curl -i http://127.0.0.1:8080/helloHomebrew installs Hoplite; the starter script writes the two application files.
Published binary
curl -fsSL https://raw.githubusercontent.com/greenways-ai/hoplite/main/scripts/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
curl -fsSL https://raw.githubusercontent.com/greenways-ai/hoplite/main/scripts/new-app.sh | sh -s -- hello
cd hello && hoplite serve foreground --mode prod .curl -i http://127.0.0.1:8080/helloThe installer selects the current release binary for the host architecture.
Cloud service
fly launch --image ghcr.io/greenways-ai/hoplite:latest --internal-port 8080 --ha=false --vm-memory 512 --generate-name --nowfly apps openFly pulls the OCI image directly; it does not build Hoplite from source.
/hellox-hoplite: trueHello from Hoplite02 · Equivalent-payload benchmark
Both targets use the same Nginx release and response contract. The benchmark validates status, content type, the stable x-hoplite header, and the exact 19-byte body before it accepts any measurements.
Hello from Hoplite\nRequests / second
p50 latency
p99 latency
Peak memory under load
| Target | Round | Order | Requests/s | p50 | p99 | Peak memory |
|---|---|---|---|---|---|---|
| Hoplite | 1 | 1 | 43,575 | 2.71 ms | 9.74 ms | 86.9 MiB |
| Hoplite | 2 | 2 | 43,338 | 2.72 ms | 9.56 ms | 88.6 MiB |
| Hoplite | 3 | 1 | 43,436 | 2.72 ms | 9.57 ms | 91.2 MiB |
| Plain Nginx | 1 | 2 | 48,477 | 2.41 ms | 8.92 ms | 7.3 MiB |
| Plain Nginx | 2 | 1 | 48,446 | 2.42 ms | 8.68 ms | 9.9 MiB |
| Plain Nginx | 3 | 2 | 48,260 | 2.43 ms | 8.70 ms | 11.9 MiB |
a5ee72d0The previous all-in-one measurement has been retired. Until a validatedhoplite-server run completes, this page deliberately displays placeholders rather than carrying the old executable and memory values forward.
Reproduce the comparison
The orchestrator pins Hara, builds the slim server and comparison images, alternates HTTP target order, and rejects mismatched response contracts.
git -C ../hara checkout "$(cat packaging/hara-revision)"
HARA_ROOT=../hara bash packaging/scripts/run-benchmarks.sh benchmark-output03 · Deployment footprint
These are minimal deployment samples returning the same validated 19-byte response. They compare process and image shapes, not feature-equivalent web frameworks.
Measured on GitHub Actions 1000014881 with 4 logical CPUs. Idle memory is the median of 12 samples per component.
Logical Docker image sizes are summed for multi-service stacks; shared registry layers may deduplicate in practice.
Minimal deployment-envelope samples returning one fixed response. The JDK and Python targets are standard-library servers, not framework benchmarks. The Lua target uses Debian ngx_http_lua, not a full OpenResty distribution.
The useful question is where each minimal serving envelope places its proxy, runtime, application artifact, processes, and resident memory—not whether every application in a language has one fixed size.
05 · Documentation
Each section starts with a concrete operation, then explains the runtime or operational reason behind it. Use the example to enter; use the reference to be exact.
Install the published runtime, generate a two-file application, and serve it.
brew install greenways-ai/tap/hoplite
hoplite serve build --mode prod .
hoplite-server .This is the shortest supported path from an empty machine to a real endpoint. It uses the packaged server rather than asking users to compile Hoplite or assemble a proxy stack.
See how resources, operations and handler Vars become a worker-local router.
["/hello"
{:get {:name "hello"
:handler #'hello}}]The route stores a Var instead of calling the function while configuration is read. Hoplite can validate the resource tree, then resolve and compile the handler once when each Nginx worker starts.
Build the parts that make an application useful: async work, application policy, OpenAPI, diagnostics and production operation.
(defn delayed [_]
(await (Host/call "nginx" "sleep" [25]))
{:status 200 :body "resumed"})When the handler awaits a host capability, the worker can resume other requests. Synchronous handlers stay on the direct path and do not pay for promise state they never use.
Look up the exact commands, project keys and public forms used by the current release.
hoplite serve check .
hoplite serve build --mode prod .
hoplite verify .
hoplite inspect .The reference is where examples become exact contracts. These commands validate the project, build the source-free production plan, verify its immutable bytes and inspect generated output without executing application source.
05 · Current release
Hoplite 0.2.0 ships for Apple Silicon, Intel macOS, ARM64 Linux, and x86-64 Linux, with Homebrew and GHCR distribution. Interfaces remain intentionally pre-1.0 while the bytecode bootstrap and hosting contracts settle.