Don't install v25.15.5, it's a broken version of titan
The Titan CLI command is now titan.
The previous tit command is still supported as a legacy alias.
titan planet

How Titan Planet Works

A step-by-step walkthrough of Titan’s build pipeline, runtime model, performance characteristics, and native execution flow

Overview

Titan Planet is a JavaScript-first backend framework where application logic is written in JavaScript, while routing, concurrency, and execution are handled by a native Rust server.

You write JavaScript.
Titan builds Rust.
Production runs a single native binary.

Titan does not run a JavaScript server in production.
JavaScript executes only as a controlled logic layer inside Rust.


High-Level Idea

Titan is designed around a strict responsibility split.

JavaScript Responsibility

  • Route declarations
  • Business logic (actions)
  • Validation and transformations

Rust Responsibility

  • HTTP server (Axum)
  • Routing and method matching
  • Concurrency and async I/O
  • Process lifecycle and deployment

JavaScript never owns the request lifecycle.
Rust always does.


Step 1 — Writing Routes

Routes are declared using Titan’s DSL in:

app/app.js
t.post("/login").action("login")
t.post("/ca").action("register")
t.post("/").action("hello")

This file is parsed at build time.
It is not executed per request.

At runtime, JavaScript never performs routing.


Step 2 — Action Authoring

Each action lives in: app/actions/

Example:

app/actions/
export default function login(req) {
  return { ok: true }
}

These files contain pure application logic only.

  • No HTTP server
  • No routing
  • No async orchestration
  • No event loop control

Actions run only after Rust has already resolved the request.

Titan auto manage the async/await using rust tokio


Step 3 — Build-Time Compilation

When you run:

tit build

Titan performs deterministic compile-time steps.

A static routing table is generated for the Rust server.

Routes are mapped to action identifiers.

Each action is bundled into a deterministic .jsbundle file, using esbuild

Axum, runtime code, and the embedded JS engine are compiled into one binary.

No routing logic, module resolution, or imports exist at runtime.


Step 4 — Server Runtime Layout

All production artifacts live inside the server runtime boundary.

hello.jsbundle
login.jsbundle
register.jsbundle
routes.json
action_map.json
Cargo.toml
Cargo.lock

Everything inside server/ belongs to the native execution layer.
JavaScript never reads or modifies these files at runtime.


Step 5 — Runtime Execution Flow

When a request hits production:

  1. HTTP request reaches the native Rust server
  2. Rust matches the route using routes.json
  3. Rust resolves the action using action_map.json
  4. The bundled JS action executes inside the embedded JS engine
  5. The result is returned to the client

Routing, concurrency, and I/O are completed before JavaScript runs.


Performance & Speed (Important)

Does using Boa make Titan slow?

No — and this is by design.

Titan does not use JavaScript as a server runtime.

Boa executes only:

  • Bundled action logic
  • Synchronous business rules
  • JSON transformations

Boa does not execute:

  • HTTP servers
  • Event loops
  • Async schedulers
  • Threads
  • Networking
  • File I/O

All performance-critical work is handled by Rust + Axum + Tokio.

JavaScript is not in the hot path of networking or concurrency.

Why this is fast in practice

  • Routing is static and Rust-owned
  • No JS router
  • No dynamic imports
  • No promise-heavy execution
  • No Node.js runtime overhead
  • No garbage-heavy request lifecycle

JavaScript runs only when business logic is required, and only for a short, bounded duration.


Final Output

After a successful build, Titan produces a single binary: server/target/titan_server

This binary contains:

  • Axum HTTP server
  • Routing metadata
  • Bundled JavaScript logic
  • Embedded JavaScript runtime

No Node.js.
No runtime JS server.
One native binary: titan_server.


One-Sentence Summary

Titan Planet is a JavaScript-first backend framework that compiles routes and actions into static metadata and executes them inside a native Rust server, producing a single high-performance binary for production.

On this page