Skip to content

Introduction to Flame

Flame is a type-safe, simpler programming and scripting language built to work alongside Rust, not replace it.

Powered by the Blaze compiler, Flame combines the developer velocity, expressive syntax, and ergonomics of high-level scripting languages with the deterministic memory safety, ownership concepts, and native execution of the Rust ecosystem.


Maintaining a large, monolithic Rust codebase is notoriously demanding. While Rust is unmatched for low-level systems programming, writing high-level application logic, glue code, rapid prototypes, dynamic configurations, or scripting in low-level Rust often introduces significant friction:

  • Steep compile times and frequent linking overhead.
  • Borrow checker battles for straightforward, high-level business tasks.
  • Heavy boilerplate for simple data manipulation and glue workflows.

Flame was created to solve this challenge:

Keep your core performance algorithms, hardware drivers, and low-level primitives in Rust. Use Flame for simpler application layers, rapid prototyping, and scripting where you need simplicity and developer velocity.

Flame adopts a Rust-inspired object model and type system:

  • Familiar OOP: Defines types using struct and methods using impl, with explicit &self receivers.
  • Borrowing & References: Employs compile-time ownership, borrowing, and reference checks inspired by Rust, avoiding the latency spikes of a garbage collector (GC).
  • Super Embeddable: Embed Flame scripts or complete packages directly into Rust host applications, game engines, and microservices using the flamebinder crate.
  • Batteries-Included Standard Library: Provides rich, out-of-the-box standard library modules (std.fs, std.net.http, std.json, std.thread) so you can build real-world applications without hunting down dozens of external crates.

To prevent misconceptions, here is how Flame is designed:

What Flame Is What Flame Isn’t
A simpler, type-safe language built to work alongside Rust Not a Rust replacement (not meant for kernel-level or micro-optimized low-level systems)
Connected via a typed Smart ABI plugin system (.fmi) Not claiming unqualified “zero-cost” interop (FFI is statically linked and typed, but FFI boundaries exist)
Memory-safe via ownership, borrows, and references Not a garbage-collected language (no GC runtime, no stop-the-world pauses)
Constructs application-specific native runtimes Not a universal bytecode VM or monolithic interpreter (like Node.js, Python, or the JVM)
Uses Rust, Cargo, and LLVM as its native build pipeline Not a source-to-source Rust transpiler
Super embeddable into Rust applications via flamebinder Not an isolated language silo (designed for seamless multi-language cooperation)
Rich standard library for real-world tasks Not an MVP without real-world libraries (includes HTTP, JSON, FS, threads, and async)

Built Alongside Rust

Complement Rust codebases. Keep complex systems in Rust, and use Flame for rapid application code, glue logic, and scripting.

Smart ABI Plugin System

Directly call native Rust crates and plugins using .fmi interface contracts. The Smart ABI system allows Flame to consume native Rust types and functions using structured interface metadata.

Deterministic Memory Safety

Provides compile-time ownership, borrowing, and reference checks without the latency spikes or memory overhead of a garbage collector.

Super Embeddable

Embed Flame scripts or entire packages directly into Rust host applications, game engines, and tools using the flamebinder crate.


Instead of bundling a large, one-size-fits-all runtime engine, Flame builds an application-specific native runtime tailored to your project’s exact dependency graph:

Flame source
↓
Blaze
↓
Dependency analysis
↓
┌─────────────────────────┐
│ Application-specific │
│ native runtime │
│ │
│ only required pieces │
└─────────────────────────┘
↓
Rust / Cargo
↓
LLVM
↓
Native binary

Flame analyzes your application’s imports, resolves the required .fmi interface contracts, extracts only the necessary native subsystems, and builds the specialized executable using Rust, Cargo, and LLVM.


Flame’s syntax feels immediately familiar to Rust programmers, while offering the swift expressiveness of a modern scripting language:

import std.fs
import std.net.http
import native.uuid
// 1. Rust-style Struct and Impl definitions
struct ServiceConfig {
host: String,
port: Int,
debug: Bool
}
impl ServiceConfig {
// Static constructor
fn new(host: String, port: Int) -> ServiceConfig {
return ServiceConfig {
host: host,
port: port,
debug: false
}
}
// Method receiver with borrowed self
fn address(&self) -> String {
return $"{self.host}:{self.port}"
}
}
// 2. Direct Top-Level Execution (no main boilerplate required)
let config = ServiceConfig.new("127.0.0.1", 8080)
println($"Starting service on http://{config.address()}")
// 3. Smart ABI: Call Rust crate directly
let request_id = uuid.new_v4()
println($"Request ID: {request_id}")
// 4. Lightweight formula literals (maps / records)
let payload = formula {
id: request_id,
status: 200,
endpoints: ["/api/v1", "/health"]
}
println(payload.toString())