Installation
import { Steps, Tabs, TabItem, Aside, FileTree } from ‘@astrojs/starlight/components’;
Sysl today lives inside the trisc monorepo — the same repository as the TRISC assembler, emulator, linker, and the SLIX operating system. In the future the compiler will move to its own repository; for now, everything ships together.
Prerequisites
Section titled “Prerequisites”- sbt 1.9 or newer
- JDK 17+ (any modern OpenJDK works — Temurin is a good default)
- git
- (optional) clang with LLVM 17+ if you want to use the LLVM backend
Getting the source
Section titled “Getting the source”-
Clone the repository.
Terminal window git clone https://github.com/edadma/trisc.gitcd trisc -
Verify the build.
Terminal window sbt compileOn first run, sbt downloads Scala 3, the Scala Native and Scala.js toolchains, and a handful of other dependencies. Grab a coffee.
-
Run the test suite (optional but recommended).
Terminal window sbt test
Running a Sysl program
Section titled “Running a Sysl program”Sysl has three backends, each invoked through sbt:
sbt "syslCliJVM/run run examples/fibonacci.sysl"The interpreter is the fastest way to iterate. It’s also the reference implementation — if the TRISC and LLVM backends disagree with it, the interpreter is right by definition.
# Compile to a TRISC Object File (.tof), link against the runtime, run the emulator.sbt "syslCliJVM/run compile examples/fibonacci.sysl --emit tof -o /tmp/fib.tof"sbt "triscCliJVM/run run /tmp/fib.tof"The TRISC backend produces assembly you can read. Use --emit asm to dump assembly, or
disasm a .tof file to see what the linker did.
sbt "syslCliJVM/run compile examples/fibonacci.sysl --backend llvm --emit ll -o /tmp/fib.ll"clang /tmp/fib.ll -o /tmp/fib/tmp/fibFull native compilation. The generated IR is normal LLVM — it goes through every optimiser pass and produces machine code indistinguishable from hand-written C.
Repository layout
Section titled “Repository layout”Sysl’s sources live under the sysl/ subproject. Neighbour projects are the assembler,
emulator, linker, and the SLIX kernel.
Editor support
Section titled “Editor support”The site ships a TextMate grammar at src/grammars/sysl.tmLanguage.json used for syntax
highlighting here. Drop it into your editor’s language support directory for colours. First-
class LSP is on the roadmap but not shipped yet — for now, the compiler’s error messages are
the best feedback you get.
Next steps
Section titled “Next steps”- Hello, Sysl — your first program on all three backends, with the generated assembly side-by-side.
- Tour of the language — a whirlwind tour of every major feature.
- Systems programming in Sysl — MMIO, bare metal, and the no-allocator mode.