RUST BACKEND ENGINE · ACTIVE DEVELOPMENT

Authority should be part of the backend program.

RBE links REL source through RELC into an immutable Runtime Image, then executes routes, modules, managed services and server policy with deliberately different capability boundaries.

REL · RELC · Runtime Image · Service Fabric · Container/WASM · quickDB · Video Manager · Cloud Node

RBE / EXECUTION LINK

LINKED

*.route

HTTP authority

*.module

In-process application logic

*.service

Managed process authority

server.server

Whole-server policy

↓ RELC validates · links · resolves policy

IMMUTABLE RUNTIME IMAGE

HTTP
MODULES
SERVICES
CONTAINER

WHY RBE EXISTS

A runtime contract, not just another web framework.

REL keeps the programming model coherent while RELC and the Rust host decide what each source role may actually control. That makes authority visible before code reaches the live runtime.

01 / GRAMMAR

One REL language.

Functions, classes, async control flow and normal application logic stay familiar across source roles instead of becoming four unrelated configuration languages.

02 / AUTHORITY

Different capabilities.

A Route does not silently inherit Service, ENV, quickDB or Video Manager authority. Imports are validated against the source role that requested them.

03 / ACTIVATION

Link before serving.

Policy, Runtime ENV, source identities, module/service interfaces and executable snapshots are resolved into an immutable Runtime Image before activation.

SOURCE AUTHORITY

Same language. Deliberately different jobs.

The source extension is part of the security and runtime model. RELC uses it to decide what can be imported, how the program is linked, and which execution boundary owns it.

*.route

HTTP entrypoint

Receives the bounded request snapshot and builds HTTP responses. It cannot directly import Service interfaces, shared Runtime ENV, quickDB or Video Manager.

Docs →

*.module

Application logic

Runs in-process for reusable logic, typed Runtime ENV, controlled Service calls and module-scoped privileged facilities such as Video Manager.

Docs →

*.service

Managed process

Runs through Service Mother with its own lifecycle, process memory, restart policy, resource boundary and Service-only capabilities such as quickDB.

Docs →

server.server

Server composition

Owns listener policy, status, Runtime ENV defaults/FORCE values, middleware planning, limits and embedded source composition.

Docs →

REAL REL EXAMPLES

See the boundary in code.

This is the normal application shape: an HTTP Route stays thin, a Module owns reusable application logic, and the Module calls a managed Service through the authenticated Service Fabric.

api/users/[uid].route

1. Receive HTTP

The Route owns request/response authority and delegates reusable work to a Module.

text
:import[module&users]

class Route {
	async get(req) {
		return users.findById(req.params.uid);
	}
}

users.module

2. Bridge application logic

Module REL is allowed to import the Service interface and keeps the Route free of process authority.

text
:import[service:directory as directory]

export async function findById(uid) {
	return directory.find(uid);
}

directory.service

3. Execute as a managed Service

Service REL runs behind Service Mother with lifecycle, isolation, memory and restart policy owned by RBE.

text
:service[
	name = directory,
	mode = hybrid,
	restart = on-failure,
	memoryLimitMb = 256
]

export async function find(uid) {
	return { id: uid, source: "directory" };
}

Route → Module → Service is intentional. Route REL cannot directly import service:*; RELC rejects that authority shortcut instead of letting it quietly become ambient access.

SERVER-WIDE POLICY

Infrastructure policy is source too.

server.server owns listener policy, server status, typed Runtime ENV defaults, middleware ordering and limits. RELC resolves that policy before Runtime Image activation.

Read server.server docs →

server.server

Policy linked before activation

A compact example using syntax implemented by the current Server REL parser.

text
server Main {
	status online;

	listener {
		host "0.0.0.0";
		port 7044;
	}

	env {
		APP_NAME "Kastrick API";
		REGION local;
	}

	middleware {
		correlationId;
		json { limit 2mb; strict true; }
		compression { algorithms [br, gzip]; threshold 1kb; }
		errorHandler;
	}
}

username-index.service

Service-local quickDB

Bloom-family filters are accelerators owned by a Service process. A synchronized negative answer can skip the authoritative database lookup; a positive answer cannot become truth.

text
:import[quickDB]

class Usernames {
	const <= set => "bloom";
	const <= capacity => 100000000;
	const <= falsePositiveRate => 0.001;

	function available(name) {
		return Usernames.missing(name);
	}
}

export function usernameAvailable(name) {
	return Usernames.available(name);
}

FAIL-CLOSED ACCELERATION

Fast negatives without inventing database facts.

quickDB begins unready, must be populated and sealed, and belongs only to Service REL. missing(value) may prove absence after synchronization; mightHave(value) still requires the source-of-truth database.

Read quickDB docs →

RUNTIME SYSTEMS

The language sits on top of real runtime ownership.

RBE is not only a syntax layer. The Rust host owns immutable activation, managed processes, container boundaries, media jobs, recovery and Cloud Node storage behavior underneath REL.

LINKED CORE

Runtime Image

The immutable activation unit containing resolved ServerPolicy, Runtime ENV, source metadata and executable program snapshots.

Open docs →

PROCESS FABRIC

Service Runtime

Service Mother owns worker activation, authenticated call routing, health, restart policy, resource limits and process lifetime.

Open docs →

ACCELERATOR

quickDB

Service-only Bloom-family membership indexes for cheap definitely-missing checks without replacing authoritative storage.

Open docs →

MEDIA

Video Manager

Module-scoped media orchestration that keeps raw FFmpeg arguments, process execution and filesystem authority outside ordinary REL code.

Open docs →

STORAGE / RECOVERY

Cloud Node

RBE's storage, backup, provider-history, sync and recovery layer for local peers and configured cloud providers.

Open docs →

CURRENT BOUNDARY

Document the runtime that exists, not the one we wish existed.

IMPLEMENTED / ACTIVE

REL role parsing and capability validation · Runtime Image linking · filesystem Route discovery · typed Runtime ENV for authorized roles · managed Service processes · Service Fabric calls · quickDB · Video Manager authority · server status gating.

STILL EVOLVING

Native Route WASM dispatch beyond the current static subset · instances > 1 / Service load balancing · complete MiddlewarePlan control over every native HTTP layer · complete hot-reload orchestration · persistent signed source-less Runtime Image deployment.

KEEP READING

The live docs are the source of truth.

Kastrick renders the canonical RBE doc/ tree directly from main, so implementation notes, constraints and subsystem contracts can stay close to the source instead of drifting into marketing copy.