The Steel programming language

A scripting and compiled language written in Rust. Run .steel files directly, or compile them into C, C++, Rust, Go, Python, JavaScript, TypeScript, or Lua.

Example — pick a target language
damage.steel Steel source
// Optional semicolons, optional `let`, inferred types
fn calc_damage(base, mult) {
    if mult <= 0 {
        return base
    }
    return base * mult
}

hit = calc_damage(24, 1.5)
print("Critical hit:", hit)
damage.c steel compile damage.steel c

What it does

Keeps multi-file projects separate

Running steel compile mygame c on a folder outputs separate source and header files (map.h, map.c, main.c) instead of merging them. Add --bundle if you want everything in one file.

Readable output

When variable and function types can be figured out ahead of time, Steel outputs plain C and Rust types directly. Dynamic helpers are only included when a file actually needs them.

Optional `let` and short functions

You can write x = 10 without let, or use let and const when you want to be explicit. Single-expression functions work as fn double(x) = x * 2.

Standard library across targets

File I/O (read_file, write_file), string helpers (upper, lower, trim, contains), math, arrays, maps, classes, and try/catch work across all 8 languages.

Included tools

Comes with a REPL, test runner (steel test), file watcher (steel watch), formatter (steel fmt), static checker (steel check), benchmark command, and Markdown doc generator.

Windows installer and VS Code extension

Includes steel-setup.exe to install Steel and add it to PATH, plus a VS Code extension with syntax highlighting, inline error squiggles, hover types, and Go-to-Definition.

Supported targets

Target Flag Multi-file output Native binary
C (C11) c .h headers + .c modules + steel_rt.h --bin --release (gcc / clang)
C++ (C++20) cpp .hpp headers + .cpp modules + steel_rt.hpp --bin --release (g++ / clang++)
Rust rust / rs mod files + steel_rt.rs + main.rs --bin --release (rustc)
Go go Shared package main .go files --bin (go build)
Python 3 python / py Separate .py modules with from ... import * Interpreted via Python 3
JavaScript js CommonJS modules with require and module.exports Runs on Node.js
TypeScript ts Typed .ts modules with exports Compiles with tsc
Lua lua Lua modules returning exported tables Runs on Lua / LuaJIT

Quick start

Install using steel-setup.exe on Windows or build from source with Cargo.

Terminal
# Create a new Steel project
steel init my-game

# Run directly in the built-in interpreter
steel run my-game

# Compile to separate C11 files in my-game_c/
steel compile my-game c

# Or combine everything into one single C file
steel compile my-game c --bundle

# Compile to Rust and build an optimized native executable
steel compile my-game rust --bin --release