Install & run
Langoost is in active development. Today you build it from source with the Go toolchain; prebuilt binaries are planned for a later release.
Prerequisites
- Go 1.21 or newer
Build from source
$ git clone <langoost-repo>
$ cd langoost
$ go build -o langoost .
This produces a single langoost binary in the current directory.
During development you can skip the build step and run directly with
go run . run script.goost.
Your first script
Create hello.goost:
let name: string = "world"
print("Hello, " + name + "!")
Run it:
$ ./langoost run hello.goost
Hello, world!
Projects & building
For anything beyond a single script, use a project — a directory with a
src/ folder whose src/main.goost is the entry point. langoost build
compiles it into a self-contained build/ directory:
myapp/
├── src/
│ └── main.goost ← entry point
└── build/ ← created by `langoost build`
├── myapp ← standalone native binary (pure-Go)
├── run.sh ← loads .env, then runs the binary
└── .env ← default config (created once, never overwritten)
$ ./langoost build ./myapp
$ ./myapp/build/run.sh
Deployment is a copy: ship the build/ directory to a server and run
run.sh — no Go toolchain and no Langoost install required. To make a one-off
binary from a single file instead, use langoost compile. See the
CLI reference for cross-compilation and flags.
The REPL
Start an interactive session to experiment line by line:
$ ./langoost repl
> let x = 21
> print(x * 2)
42
Press Ctrl+D to exit.
Server mode
Langoost can run as a persistent execution server — the model it’s designed for. The process stays warm and serves requests with no cold start. It binds loopback by default:
$ ./langoost server
It exposes an HTTP API (POST /execute, GET /health, DELETE /cache); see the
execution server guide for the endpoints and auth.
To build an HTTP API directly from a script instead, see the
HTTP server guide.
Inspect the bytecode
Curious what the compiler produces? Disassemble any script:
$ ./langoost disasm hello.goost
Next: take the language tour.