Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. tengo

tengo

MITGov3.0.0

A fast, embeddable scripting language for Go applications, compiled to bytecode and executed on a stack-based VM.

Visit WebsiteGitHubGitHub
3.8k stars327 forks0 contributors

What is tengo?

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.

Target Audience

Go developers who need to add scripting, rules engines, or dynamic configuration to their applications without relying on external language runtimes or cgo.

Value Proposition

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.

Overview

A fast script language for Go

Use Cases

Best For

  • Embedding a scripting language within Go applications to allow user-defined logic or plugins.
  • Implementing a rules engine where business rules need to be dynamically evaluated or updated.
  • Building state machines or data pipelines that require flexible, scriptable transitions or transformations.
  • Creating configuration systems that support complex, dynamic expressions beyond static files.
  • Developing educational tools or REPLs for teaching programming concepts with a lightweight, embeddable language.
  • Extending Go programs with custom logic in scenarios where performance and security are critical, such as in server-side applications.

Not Ideal For

  • Projects requiring extensive third-party libraries or modules common in languages like Python or JavaScript.
  • Applications where the absolute lowest latency is critical and VM overhead is unacceptable.
  • Teams already standardized on another scripting language and seeking minimal disruption to existing workflows.
  • Use cases needing advanced language features like built-in concurrency, metaprogramming, or complex type systems.

Pros & Cons

Pros

Native Go Implementation

The compiler and runtime are written entirely in Go with no cgo or external dependencies, ensuring seamless integration and easy deployment within Go ecosystems.

Fast Bytecode Execution

Benchmarks show Tengo outperforms similar embedded languages like go-lua and goja in Fibonacci tests, thanks to its stack-based VM and bytecode compilation.

Secure Embedding Design

Designed specifically for secure execution within Go applications, with controlled interoperability features that allow safe running of untrusted scripts.

Simple and Expressive Syntax

Features dynamic typing with coercion, higher-order functions, and closures, making scripts readable and powerful for tasks like rules engines or data pipelines.

Cons

Limited Standard Library

The built-in functions and modules are minimal compared to mature languages, so complex tasks like network operations often require custom Go bindings.

Small Community and Ecosystem

As a niche language, it lacks extensive documentation, third-party libraries, and community support, which can slow down development and troubleshooting.

Performance Overhead vs Native Go

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.

Frequently Asked Questions

Quick Stats

Stars3,799
Forks327
Contributors0
Open Issues72
Last commit11 days ago
CreatedSince 2019

Tags

#programming-language#compiler#rules-engine#repl#golang#vm#scripting-language#data-pipeline#dynamic-typing#go#script#closures#extensible

Built With

G
Go

Links & Resources

Website

Included in

Go169.1k
Auto-fetched 1 day ago

Related Projects

FrankenPHPFrankenPHP

🧟 The modern PHP app server

Stars11,003
Forks446
Last commit1 day ago
exprexpr

Expression language and expression evaluation for Go

Stars7,818
Forks494
Last commit12 days ago
gopher-luagopher-lua

GopherLua: VM and compiler for Lua in Go

Stars6,882
Forks696
Last commit23 days ago
gojagoja

ECMAScript/JavaScript engine in pure Go

Stars6,833
Forks444
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub