Skip to main content
Forst is a programming language that brings TypeScript’s type safety and developer experience to Go.

Motivation

Our primary goal is to help you move away from TypeScript on the backend:
  • Generate instantly re-usable TypeScript types from backend endpoints – enabling full-stack development without build steps.
  • Strong static typing with aggressive inference and smart narrowing – so you move fast while staying safe.
  • Data types that automatically validate deeply nested input data – to keep untrusted user input out of your application logic.
Constraints on the type replace scattered validation checks at the boundary:
Forst is actively developed. Some features (Result types, Go import loading, sidecar) are experimental. See the roadmap for current status.

How it fits your stack

Forst compiles .ft sources to Go, and optionally emits TypeScript types for clients: Run forst generate when clients need TypeScript types from the same source.

Start here

Why Forst?

Design priorities and what Forst omits.

Quickstart

Install, write your first .ft file, run it.

Language overview

Aligned with Go, structural typing, explicit control flow.

Validated shapes

Types as schemas with built-in constraints.

Mix with Go packages

Import Go packages. Mix .ft with .go.

Examples and packages

For client type generation, see Generate client types.