The TorbScript language: compiler, runtime, standard library and toolchain https://torb.dev
  • Rust 74.7%
  • JavaScript 14.5%
  • C 8.4%
  • Shell 1.7%
  • Python 0.5%
  • Other 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Orion 4815857b2e
Some checks are pending
images / cr.torb.dev/torbscript/registry (push) Has been skipped
images / cr.torb.dev/torbscript/release-sync (push) Has been skipped
images / cr.torb.dev/torbscript/site (push) Has been skipped
ci / commit messages (push) Successful in 8s
ci / what the change touches (push) Successful in 8s
ci / gates (push) Blocked by required conditions
ci / which runners exist (push) Waiting to run
ci / bootstrap (linux-x64) (push) Waiting to run
ci / tier A (linux-x64) (push) Blocked by required conditions
ci / tier B (linux-x64) (push) Blocked by required conditions
ci / tools/release-sync and tools/registry (linux-x64) (push) Blocked by required conditions
ci / bootstrap and conformance (windows-x64) (push) Blocked by required conditions
ci / bootstrap and conformance (linux-arm64) (push) Blocked by required conditions
ci / bootstrap and conformance (macos-arm64) (push) Blocked by required conditions
ci / cross-compiled on linux-x64 (windows-x64) (push) Blocked by required conditions
ci / cross-compiled on linux-x64 (linux-arm64) (push) Blocked by required conditions
ci / cross-compiled on linux-x64 (macos-arm64) (push) Blocked by required conditions
ci / every host emits the same C (push) Blocked by required conditions
ci / the VS Code extension (editors/vscode) (push) Waiting to run
ci / the playground (torb as WebAssembly) (push) Blocked by required conditions
ci / conformance (JavaScript under Node.js) (push) Blocked by required conditions
ci / conformance (PHP 5.6, 7.4 and 8.4) (push) Blocked by required conditions
ci / pack the seed (push) Blocked by required conditions
ci / archives (push) Blocked by required conditions
pdisc / pdisc (push) Successful in 11s
images / cr.torb.dev/torbscript/site:edge (main) (push) Successful in 13m51s
fix(tensor): format the package, declare the Negate extension and correct the panic column
2026-11-14 09:38:26 +00:00
.agents/plugins feat(skills): install the skills as a Claude Code, Codex or APM package 2026-09-29 19:25:14 +02:00
.claude/skills feat(docs): write public Agent Skills into skills/ from templates in docs/skills 2026-09-29 19:25:14 +02:00
.claude-plugin feat(skills): install the skills as a Claude Code, Codex or APM package 2026-09-29 19:25:14 +02:00
.forgejo feat(tensor): elementwise operations with broadcasting 2026-11-14 09:38:26 +00:00
.githooks chore: install pdisc (sidecar metadata for non-site docs, INDEX, CI gate) 2026-10-07 08:12:31 +02:00
.github/workflows ci(portable): install the newest nightly on every tier 1 machine each morning and run it 2026-09-29 16:36:49 +02:00
.vscode feat(vscode): the extension as a store package in editors/vscode, with a walkthrough and tests 2026-09-28 13:19:25 +02:00
benchmarks feat(tensor): elementwise operations with broadcasting 2026-11-14 09:38:26 +00:00
book fix(checker,docs): fix the tier A gates of the bare-case change 2026-11-13 23:11:11 +01:00
brand feat(brand): swap Chivo Mono for Geist Mono, ligatures always off 2026-09-29 07:28:16 +02:00
compiler fix(project): list a non-source file once however many paths share its root 2026-11-14 09:07:52 +00:00
docs fix(tensor): format the package, declare the Negate extension and correct the panic column 2026-11-14 09:38:26 +00:00
editors/vscode feat(vscode): launch a native program 2026-11-13 19:18:52 +00:00
examples docs(framework): worked example through every layer 2026-10-29 21:35:27 +00:00
playground fix(playground): find each license file once, so every file system writes the same editor 2026-10-06 16:27:50 +02:00
runtime fix(php): emit Process.exit and budget php-variants-arrays 2026-11-13 14:22:30 +00:00
skills fix(tensor): format the package, declare the Negate extension and correct the panic column 2026-11-14 09:38:26 +00:00
std fix(tensor): format the package, declare the Negate extension and correct the panic column 2026-11-14 09:38:26 +00:00
tests fix(tensor): format the package, declare the Negate extension and correct the panic column 2026-11-14 09:38:26 +00:00
tools feat(tensor): elementwise operations with broadcasting 2026-11-14 09:38:26 +00:00
.gitattributes chore(forge): highlight .trb files as Rust on git.torb.dev for now 2026-10-26 22:11:13 +00:00
.gitignore fix(debugger): unwrap trait-typed values in the lldb formatters 2026-10-30 07:01:22 +00:00
.pdisc-sidecar.yaml docs(pdisc): drop sidecar entries for the excluded std/tensor pages 2026-11-14 09:38:26 +00:00
.pdisc.yaml chore(pdisc): leave book/ to torb docs check, like docs/ 2026-10-29 15:29:20 +01:00
apm.yml feat(skills): install the skills as a Claude Code, Codex or APM package 2026-09-29 19:25:14 +02:00
CLAUDE.md refactor(cli): remove the torb canon alias and its page 2026-11-13 21:53:04 +00:00
CODE_OF_CONDUCT.md docs: add a security policy and a code of conduct 2026-10-30 06:02:51 +01:00
CONCEPT.md feat(checker): resolve bare contextual cases beside the dotted form 2026-11-13 23:10:59 +01:00
INDEX.md docs(html): restamp NOTICE.md for the tree construction tests 2026-11-12 18:26:52 +00:00
LICENSE chore: keep mbedTLS's own license outside the runtime's MIT-0 2026-09-24 23:36:24 +02:00
project.trb refactor(project): the manifests say nothing the names of the files say, and Build goes 2026-09-28 00:09:59 +02:00
README.md docs: add a security policy and a code of conduct 2026-10-30 06:02:51 +01:00
SECURITY.md docs: align the supported versions in SECURITY.md with RELEASE.md 2026-10-30 06:05:02 +01:00

TorbScript

One language, every layer. A single-language ecosystem.

A functional-first, multi-paradigm scripting language with value semantics. It runs interpreted and compiles to native executables, and it is its own configuration format.

  • CONCEPT.md - the language
  • docs/ARCHITECTURE.md - how it is implemented, and the state of it
  • examples/tour - the language in thirteen files
  • docs/site/agents.md - the Agent Skills that teach an AI agent TorbScript, and the one line that installs them into Claude Code, Codex, OpenClaw, Copilot and others
  • SECURITY.md - how to report a vulnerability, and which versions get security fixes
  • CODE_OF_CONDUCT.md - the Contributor Covenant, and where to report unacceptable behavior
Directory Contains
compiler/ The toolchain, written in TorbScript
std/ The standard library, one package per directory (std/core, std/fs, ...; std/prelude re-exports)
runtime/ The C runtime every compiled binary links against (runtime/README.md)
examples/ Tour and example projects
skills/ The Agent Skills of the language, written from docs/ by torb docs skill (docs/site/agents.md)
tests/ The conformance suite and the language smoke programs (tests/conformance/README.md)
brand/ The logo, the icons and the design tokens (brand/README.md, docs/design/BRAND.md)
playground/ The playground of torb.dev/play: torb built as WebAssembly, and the page's script (docs/tooling/the-playground.md)

Building

The compiler is written in TorbScript and compiles itself, so a checkout needs two things: a C compiler ($TORB_CC, or clang, gcc, cc in that order) and a seed - a torb that already exists. The seed is not in git, because it is a build artifact of an earlier commit rather than a fact about this one.

seed/torb[.exe]     a binary for this platform: a release download, or one built by a `torb` you already have
seed/program.c      the portable seed: the compiler as one C file, which builds anywhere a C compiler does

Put one of the two in place and build:

sh tools/bootstrap.sh          # seed -> build/bootstrap/torb -> build/release/torb

Two steps and not one: the seed compiles the current sources, that binary compiles them again, and the two program.c are compared byte for byte. build/release/torb is the compiler that comes out.

A release publishes both artifacts, so a checkout downloads the binary for its platform, or program.c for a platform that has none. Between releases the seed is whatever torb was built last:

torb build ./compiler --output ./seed/torb           # a binary seed for this platform
torb build ./compiler --emit-c --output ./seed/torb  # seed/program.c, the portable one

Once build/release/torb is there:

sh tools/gates.sh a            # the gates of every round (compiler/CONTRIBUTING.md)
sh runtime/build.sh            # the C runtime and its own tests