A fast, embeddable scripting language for Go applications, compiled to bytecode and executed on a stack-based VM.
Tengo is a small, dynamic scripting language specifically designed for embedding into Go applications. It provides a fast and secure execution environment by compiling to bytecode and running on a stack-based virtual machine written entirely in Go, enabling Go programs to be extended with scripting capabilities.
Go developers who need to add scripting, rules engines, or dynamic configuration to their applications without relying on external language runtimes or cgo.
Developers choose Tengo for its native Go implementation with no external dependencies, offering performance comparable to other embedded languages like Lua, along with secure embedding and a simple, readable syntax with features like higher-order functions and closures.
A fast script language for Go
The compiler and runtime are written entirely in Go with no cgo or external dependencies, ensuring seamless integration and easy deployment within Go ecosystems.
Benchmarks show Tengo outperforms similar embedded languages like go-lua and goja in Fibonacci tests, thanks to its stack-based VM and bytecode compilation.
Designed specifically for secure execution within Go applications, with controlled interoperability features that allow safe running of untrusted scripts.
Features dynamic typing with coercion, higher-order functions, and closures, making scripts readable and powerful for tasks like rules engines or data pipelines.
The built-in functions and modules are minimal compared to mature languages, so complex tasks like network operations often require custom Go bindings.
As a niche language, it lacks extensive documentation, third-party libraries, and community support, which can slow down development and troubleshooting.
While fast for a VM, it introduces execution overhead compared to pure Go code, which may be a concern in latency-sensitive or high-throughput applications.
🧟 The modern PHP app server
Expression language and expression evaluation for Go
GopherLua: VM and compiler for Lua in Go
ECMAScript/JavaScript engine in pure Go
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.