Harbor Documentation

Harbor is a simple, experimental programming language designed for building HTTP servers. It's written in Rust and interprets .hb files directly.

What is Harbor?

Harbor provides a small set of focused primitives for creating HTTP servers with minimal syntax. There's no build step, no configuration files, and no dependency management. You write a .hb file and run it.

server 8080 {
    get "/hello" {
        respond "Hello, world!"
    }
}

Design goals

  • Readable, minimal syntax with no boilerplate
  • Server-oriented primitives built into the language
  • Async-first HTTP runtime (powered by Hyper + Tokio)
  • No external dependencies in the runtime

Current status

Harbor is in early development. The current version supports variables, functions, string and number types, a single operator (+), HTTP server blocks with GET routes, and the req object for accessing request data.

Note: Harbor is experimental. The language spec and behavior may change between versions. See the GitHub repository for the latest source.

Quick reference

Feature Syntax
Variable x = 10
Function fn name(a, b) { ... }
Print print("hello")
Server server 8080 { ... }
Route get "/path" { ... }
Respond respond expr