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, authentication, service management, and deployment 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 Nginx 1.30.4, the same Debian toolchain, the same 19-byte body, the same response header, and the same load generator. The difference is the embedded Hara application path.
Hello from Hoplite\nRequests / second
p50 latency
p99 latency
Peak memory under load
| Target | Round | Requests/s | p50 | p99 | Peak memory |
|---|---|---|---|---|---|
| Hoplite | 1 | 85,523 | 1.37 ms | 5.18 ms | 66.2 MiB |
| Hoplite | 2 | 85,817 | 1.36 ms | 5.58 ms | 70.5 MiB |
| Hoplite | 3 | 85,935 | 1.36 ms | 5.30 ms | 74.2 MiB |
| Plain Nginx | 1 | 96,997 | 1.15 ms | 5.66 ms | 11.1 MiB |
| Plain Nginx | 2 | 96,307 | 1.16 ms | 5.74 ms | 11.1 MiB |
| Plain Nginx | 3 | 96,078 | 1.16 ms | 6.14 ms | 11.2 MiB |
ae994650This is a reproducible release sample, not a universal capacity guarantee. The comparison is useful because the payload, Nginx version, build environment and load are held constant.
Reproduce the comparison
The script rejects the run when the response bodies differ, then records every round along with executable size, image size, idle memory and peak memory.
docker build -f docker/Dockerfile.nginx-baseline -t hoplite-nginx-baseline .
bash scripts/benchmark-http.sh \
ghcr.io/greenways-ai/hoplite:latest \
hoplite-nginx-baseline \
benchmark-output/http-benchmark.json03 · Measured footprint
These are minimal representative deployments returning the same 19-byte response. Java and Python include the same plain Nginx baseline plus their application service; Hoplite and Lua remain one-server deployments.
Measured on Ubuntu 24.04 GitHub-hosted runner 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.
The useful claim is not that every Java or Python application has one fixed size. It is that an external proxy and application runtime occupy separate images and separate resident processes, while Hoplite keeps the application inside the Nginx lifecycle.
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 foreground --mode prod .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, auth, OpenAPI 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 serve status .The reference is where examples become exact contracts. These commands validate the project, build the production plan and inspect the running service without relying on undocumented shell conventions.
05 · Current release
Hoplite 0.1.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.