No JVM at compile time
One native binary. Library macros run in the compiler’s own interpreter.
A native Scala 3 compiler, written in Rust
Teq interprets or compiles Scala 3 to JVM or JavaScript.
Including unmodified libraries from the ecosystem.
Pre-release · 0.1.9Check compatibility
One native binary. Library macros run in the compiler’s own interpreter.
Use unmodified published libraries, with conformance checked against scalac.
ES modules, granular recompilation with feedback in milliseconds, and lean compiled bundles.
Wall-clock time of a full build on an Apple M4 Max.
A two-line Scala @main program
100–300× faster
Synthetic · 64k lines · JavaScript target
41–49× faster
Synthetic · 51k lines · JVM target
160–180× faster
The realistic benchmark is a 104k-line synthetic application generated to the shape of a production Scala.js code base.
sbt's own compile, test, run and packageBin run over teq's output, with sbt's own reporting, and nothing else in the build changes.
Add the plugin to an sbt 2 or sbt 1 build (the same line under both; the sbt 1 module comes with the plugin’s first release after 1.0.0):
addSbtPlugin("build.teq" % "sbt-teq" % "1.0.1")
Enable scalac replacement:
teqVersion := "0.1.9"
teqCompiler := true
The plugin comes from Maven Central; it fetches teq for your platform from teq’s GitHub release, checked
against the release’s checksums before it runs. Enable it per project, or use TEQ_COMPILER=1 to switch
without editing the build.
Compile, test and run without sbt or Mill running. One lockfile describes the build; the launcher fetches the pinned compiler.
Add the sbt plugin and set teqBuildTool:
teqBuildTool := true
Then run sbt teqExportAll and commit the generated teq.lock, teq and teq.cmd files.
A Mill 1.x build exports the same lockfile through mill-teq, with no edit of the build ("buildTool": true in a
teq.mill.json at its root writes it there with the launchers):
mill --import mvn:build.teq::mill-teq::0.1.0 dev.teq.mill.Teq/teqExportAll
Drive your project without a JVM:
./teq compile api
./teq test
./teq run api -- web
Teq keeps a daemon compiler running so subsequent builds are even faster. The Vite plugin uses the same lockfile for hot swapping in the browser.
Use teq as you write Scala, with navigation, completion and diagnostics powered by the compiler.
Install the teq extension and disable Zed’s other Scala extension. Open
your project folder: the server reads teq.lock, or exports the sbt build on first use, and fetches
the pinned compiler. Without teqBuildTool that export lands in target/teq/teq.lock, adding nothing to
the repository, and runs again after an sbt clean.
Configure its language-server client to start this command in the project folder, communicating over stdin and stdout.
teq lsp
Run Scala directly, with no output file and no JVM, using the same interpreter that runs library macros.
@main def hello(): Unit =
println("hello from teq")
teq interp hello.scala
Download teq, rename the file to teq (teq.exe on Windows), make it executable and put it on your PATH. A
browser download on macOS carries the quarantine attribute, which Gatekeeper enforces on a binary that is not
notarized: xattr -d com.apple.quarantine teq clears it, and a download by curl never carries it.
Review the remaining gaps and intentional differences before adopting teq.
Compatibility and limitationsDeveloped against a production Scala.js application. Conformance tests use scalac 3.8.4 as the reference, including the Scala compiler’s own suites.
Verified to work with:
and more
About the project
The code, tests and documentation are written with AI agents. Humans direct the work and own the design decisions.
Implementation uses Claude Fable 5.1 and Claude Opus 5.5, with GPT 6 Astra reviewers. Each package lands with test expectations generated against scalac, a full gate run, and its compile-time cost measured and recorded. Read the code with that in mind.
Open source
Build from source and run the same suites used to check language conformance, output, runtime speed and compilation budgets.
cargo build --release
./tests/all.sh
./bench/pgo.sh
./bench/budget.sh
all.sh runs every suite. pgo.sh produces a profile-guided release build at
target/pgo/use/release/teq; budget.sh checks its compile times against bench/budgets.txt.
The suites compare output with scalac, use scala-cli to regenerate expectations, and run the Scala 3
compiler tests from $SCALA3.