Use cases
What you can build with Tern
Tern is a compiled, statically typed language that reads like Python. One toolchain builds servers, command-line tools, WebAssembly modules and mobile libraries, and the same code runs on all of them.
curl -fsSL https://ternlang.dev/install.sh | sh
tern new myapp && cd myappPick what you’re building
What’s the same everywhere
- One small binary. No VM, no interpreter, no garbage collector to tune. A program compiles through C to native code, and a Linux build can be fully static.
- Checked before it runs. Every type is checked at compile time, and so are data races in
parallelcode. - Fast where it counts. Ahead of or tied with Rust on all 10 of our compute benchmarks, and ahead of Go on all 10.
- Fast to rebuild. An optimized rebuild of a web service after a one-line edit takes 0.67 s.
Questions
What is Tern used for?
Web servers and JSON APIs, command-line tools, data processing, WebAssembly modules for the browser and Node, and native libraries for iOS and Android apps. We build ternTS, StackGrep and SkimmerDB in it.
Is Tern ready for production?
It is an early release. We run our own products on it, but the language will still change and the package index is small.
Which platforms does Tern run on?
macOS and Linux on arm64 and x86_64. From those, it also builds WebAssembly, iOS and Android.
More about Tern
Tern (ternlang) is an early release: the language will change, and so will these numbers. Benchmarks run on an Apple M4 Pro; the full tables, losses included, are on the home page.