Embeddable Scripting Languages

24 projects

Embedding a scripting language lets users or operators change behavior without recompiling your Go program: rules engines, plugins, configuration logic, game scripts and user-defined filters. Options range from small expression evaluators that cannot loop, through sandboxed configuration languages, to full JavaScript and Lua interpreters. Most entries are written in pure Go, so they need no cgo.

expr evaluates expressions with optional static type checking and is a common choice for business rules, and Google's cel-go implements the Common Expression Language used in Kubernetes and elsewhere. gval is another customizable expression language. dop251/goja is an ECMAScript 5.1+ engine in pure Go with some newer features, used by tools such as k6. yuin/gopher-lua implements Lua 5.1, Shopify's go-lua ports Lua 5.2, and golua binds the C Lua API. google/starlark-go implements Starlark, the Python-like language from Bazel with deterministic, hermetic evaluation. tengo is a bytecode-compiled scripting language designed for Go. FrankenPHP is a PHP application server that embeds PHP in Go.

Prefer the most limited option that works. For filters and rules, expr or CEL are safe because they are not Turing complete. For configuration with functions, Starlark is deterministic and sandboxed. Choose goja or gopher-lua when users need general-purpose scripting, and always set execution limits so a script cannot hang your service.

FrankenPHPby dunglas

PHP embedded in Go, with a net/http handler.

github.com/dunglas/frankenphpGo 1.27+ 8 dependenciesv1.13.4updated today

11.5k

exprby antonmedv

Expression evaluation engine for Go: fast, non-Turing complete, dynamic typing, static typing.

github.com/expr-lang/exprGo 1.18+ No dependencies v1.17.8updated 3mo ago

8.1k

gojaby dop251

ECMAScript 5.1(+) implementation in Go.

github.com/dop251/gojaGo 1.26+ 7 dependenciesupdated today

7.2k

gopher-luaby yuin

Lua 5.1 VM and compiler written in Go.

github.com/yuin/gopher-luaGo 1.23+ 1 dependencyv1.1.2updated 7mo ago

7k

tengoby d5

Bytecode compiled script language for Go.

github.com/d5/tengo/v2Go 1.13+ No dependencies v3.0.0updated today

3.8k

go-luaby Shopify

Port of the Lua 5.2 VM to pure Go.

github.com/Shopify/go-luaGo 1.22+ No dependencies updated 26d ago

3.5k

starlark-goby google

Go implementation of Starlark: Python-like language with deterministic evaluation and hermetic execution.

go.starlark.netGo 1.25+ 5 dependenciesupdated 12d ago

2.8k

metacall

Cross-platform Polyglot Runtime which supports NodeJS, JavaScript, TypeScript, Python, Ruby, C#, WebAssembly, Java, Cobol and more.

v0.9.24updated 1d ago

1.8k

Wa/凹语言by wa-lang

The Wa Programming Language embedded in Go.

wa-lang.org/waGo 1.17+ No dependencies v1.8.0updated 6mo ago

1.8k

ankoby mattn

Scriptable interpreter written in Go.

github.com/mattn/ankoGo 1.13+ No dependencies updated 3mo ago

1.6k

go-phpby deuill

PHP bindings for Go.

0.11.0updated 1y ago

940

gvalby PaesslerAG

A highly customizable expression language written in Go.

github.com/PaesslerAG/gvalGo 1.15+ 2 dependenciesv1.2.3updated 1mo ago

818

prologby ichiban

Embeddable Prolog.

github.com/ichiban/prologGo 1.19+ 2 dependenciesv1.2.2updated 13d ago

738

goluaby aarzilli

Go bindings for Lua C API.

github.com/aarzilli/goluaGo 1.15+ No dependencies updated 23d ago

702

gispby jcla1

Simple LISP in Go.

updated 9y ago

532

gentee

Embeddable scripting programming language.

github.com/gentee/genteeGo 1.25+ 2 dependenciesv1.22.0updated 2mo ago

146

binderby alexeyco

Go to Lua binding library, based on gopher-lua.

updated 4d ago

80

starletby 1set

Go wrapper for starlark-go that simplifies script execution, offers data conversion, and useful Starlark libraries and extensions.

github.com/1set/starletGo 1.19+ 9 dependenciesv0.2.4updated 1mo ago

51

ecalby krotik

A simple embeddable scripting language which supports concurrent event processing.

github.com/krotik/ecalGo 1.12+ 1 dependencyv1.6.1updated 5y ago

46

purlby ian-kent

Perl 5.18.2 embedded in Go.

updated 11y ago

41

ngaroby db47h

Embeddable Ngaro VM implementation enabling scripting in Retro.

updated 8y ago

30

go-luaby speedata

Lua 5.4 VM implemented in pure Go.

github.com/speedata/go-luaGo 1.22+ No dependencies updated 5mo ago

9

cel-goby google

Fast, portable, non-Turing complete expression evaluation with gradual typing.

github.com/google/cel-goGo 1.23+ 2 dependenciesupdated 1mo ago

5

goal

An embeddable scripting array language.

codeberg.org

Esc

Type to search every entry. ↑↓ to move, Enter to open.