Home

Awesome

Embedded scripting languages

The following is a list of reasonably mature or actively developed open source embedded scripting languages to use in your application. Stretching the definition of a scripting language, it also includes Datalog implementations. Items with a strong copyleft license (like the GNU GPL) that will apply to the rest of your code are emphasized as a warning.

To sort and filter the list interactively, visit the webpage. To contribute, go to the GitHub project.

Contents

List

LanguageProject name/linkImplementated inGCLicenseNotes
AdaHACAdaNone (stack only)MITHAC implements a subset of the Ada language. Thus, it can share sources with the embedding application.
AngelScriptAngelScriptC++Ref. counting + cycle-detecting tracing GCZlibA statically typed curly brace language resembling C++ itself.
AnkoAnkoGoGo's GCMITScriptable interpreter with syntax similar to Go.
ArkScriptArkScriptC++None (resource release is destruction + optional manual MM)MPL-2.0A small functional Lisp-like programming language. Separate bytecode compiler and VM.
AspAspCRef. counting inside a static memory areaMITPython-like. Targets embedded systems. Allows blocking calls in scripts without blocking the application. Runs compiled bytecode. Not related to Microsoft's Active Server Pages.
AwkLibmawkCRef. countingGPL-2.0Implements Awk. A fork of mawk 1.3 restructured for embedding.
Awk, Basic, PascalLibfawkCRef. countingBSD-3-ClauseA multi-language VM. Includes compilers for three languages: Fawk (Awk dialect), Fbas (Basic dialect), and Fpas (Pascal dialect).
BasicMY-BASICCRef. counting + cycle-detecting tracing GCMITA Basic dialect with prototype-based OOP.
BerryBerryCTracingMITLightweight dynamically-typed embedded scripting language designed for lower-performance devices with limited memory.
BoronBoronCTracingLGPL-3.0-or-laterAn embeddable scripting language similar to Rebol.
CPicoCCNone (manual MM)BSD-3-ClauseStatically typed. Interprets a subset of C.
CtccCNoneLGPL-2.0-onlyA small C compiler that can be used as a library for a C JIT. libtcc header. Embedding example.
C#, other CLR languagesMonoCTracingMIT and otherImplements the CLR.
ChaiScriptChaiScriptC++Ref. countingBSD-3-ClauseA header-only C++14 interpreter library.
ClojuresciClojurehost VM's GCEPL-1.0An interpreter for a subset of Clojure for Clojure and ClojureScript.
Common Expression Language (CEL)cel-goGoGo's GCApache-2.0A non-Turing-complete expression language.
Common Expression Language (CEL)cel-pythonPythonPython's GCApache-2.0A non-Turing-complete expression language.
Common Expression Language (CEL)cel-rustRustNoneMITA non-Turing-complete expression language.
Common LispClaspCommon Lisp, C++MPS GC (Boehm-Weiser also supported)LGPL-2.0-or-laterFull Common Lisp implementation well integrated with C++, using LLVM for the code generation, to integrate closely with C++ applications or libraries.
Common LispEmbeddable Common LispCommon Lisp, CBoehm-Weiser GCLGPL-2.0-or-laterFull Common Lisp implementation, available as a shared library libecl.so embeddable in any C, C++ or other application.
daScriptdaScriptC++None (region-based + manual MM?)BSD-3-ClauseA statically-typed performance-oriented scripting language.
DatalogAbcDatalogJavaJVM's GCBSD-3-ClauseImplements Datalog.
DatalogCascalogClojureJVM's GCApache-2.0Implements Datalog.
DatalogDatalog (c-cube)OCamlOCaml's GCBSD-2-ClauseImplements Datalog.
DatalogDatalog (fogfish)ErlangNone (no collection inside interpreter state)Apache-2.0Implements Datalog.
DatalogDatalog (MITRE Corporation)CTracing (Lua's GC)LGPL-2.0-or-laterImplements Datalog. It is implemented on top of Lua 5.3 and can be extended with Lua functions.
DhallDhallHaskellHaskell's GCBSD-3-ClauseA statically-typed functional configuration language. Not Turing-complete. Untrusted code: can't access the file system, can fetch Dhall libraries over HTTP(S) from static URLs (but libraries aren't allowed to access your data), can use up memory and CPU time for a DoS attack. Has a work-in-progress Clojure and Ruby implementation.
DWScriptDWScriptObject Pascal (Delphi 2009 or later)Ref. counting + cycle-detecting tracing GCMPL-1.1, GPL-3.0 (JavaScript code generator)Description. A statically typed Delphi/Free Pascal-like language. Can compile to JavaScript.
DyonDyonRustNone (Rust-style lifetimes)Apache-2.0 or MITHas optional, optimistic (succeed-by-default) static type checking.
ExprExprGoGo's GCMITCompiles and evaluates statically-typed expressions.
FalconFalconC++TracingGPL-2.0 or customThe GC is pluggable.
fefeCTracingMITUses a fixed-size memory region. No malloc.
ForthAtlastCNone (manual MM)Public domainA dialect of Forth originally developed at Autodesk.
ForthFTHCTracingBSD-2-ClauseA dialect of Forth with objects, hashes, regular expressions, and other extensions.
ForthpForthCNone (manual MM)Public domainA dialect of Forth.
GameMonkey ScriptGameMonkey ScriptC++TracingMITComes with C bindings. Similar to Lua, multithreaded.
GenteeGenteeGoGo's GCMITStatically typed.
gluongluonRustTracingMITStatically typed. Inspired by Lua, Haskell, and OCaml. Each executing gluon thread gets a separate heap.
GoYaegiGoGo's GCApache-2.0An embedded complete Go interpreter, on top of the Go runtime.
GravityGravityCTracingMITA class-based concurrent scripting language with a Swift-like syntax.
GroovyGroovyJavaJVM's GCApache-2.0A scripting language for the JVM. A large subset of Java is valid Groovy. Integrating Groovy into applications.
HaxeHashLinkCTracing (lazy sweep)MITA bytecode interpreter and a baseline JIT compiler (x86/x86_64 only) for Haxe.
Haxe, othersNekoCBoehmMITThe NekoVM is a target for several compilers, including Haxe.
InterpreterInterpreterC++NoneMITA small interpreter in one header and one source code file with optional extensions (arithmetic operations, containers, filesystem, and others).
IoIoCTracingBSD-3-ClauseA prototype-based OO language.
JanetJanetCTracingMITA functional and imperative language with a Lisp syntax.
JavaBeanShellJavaJVM's GCApache-2.0An small, embeddable Java source code interpreter. Understands Java code with certain extensions like method closures.
JavaScriptDuktapeCRef. counting + cycle-detecting tracing GCMITImplements JavaScript E5/E5.1.
JavaScriptEspruinoCTracingMPL-2.0Implements a subset of JavaScript ES5 in a way suitable for embedded hardware with 8+ KiB RAM.
JavaScriptGojaGoGo's GCMITImplements ECMAScript 5.1. Better standard compliance and performance than otto.
JavaScriptGraalJSC++, C, JavaJVM's GCUPL-1.0Implements ECMAScript 2022 for GraalVM (HotSpot JVM) using Truffle.
JavaScriptJerryScriptCTracingApache-2.0A full ECMAScript 5.1 interpreter written in C99 and optimized for low memory consumption. Uses CMake.
JavaScriptjsishCRef. countingMITA JavaScript ES 5.2+ interpreter. Internally structured after Tcl with an extensive C API. Features include subinterpreters, introspection, SQLite bindings, and a web framework with WebSocket support. The code is valid C and C++.
JavaScriptMuJSCTracingISCImplements JavaScript (ES5). Has a similar C interface to Lua.
JavaScriptnjsCNone (no collection performed)BSD-2-ClauseImplements a subset of ES5.1 with some ES6 extensions.
JavaScriptottoGoGo's GCMITImplements ES5 with some limitations.
JavaScriptQuickJSCRef. counting + cycle-detecting tracing GCMITA small embedded JavaScript interpreter that implements almost all of ES2019 and much of ES2020.
JinxJinxC++17Ref. countingMITDesigned for use in realtime applications such as video games.
JsonnetJsonnetC++TracingApache-2.0A functional configuration language that extends JSON. Untrusted code: can't access the file system or network, can use up memory and CPU time for a DoS attack. Has bindings for C, C++, Go, Python, and other languages, as well as a separate native Go implementation.
KetosKetosRustNone (no heap allocation)?Apache-2.0A functional Lisp.
LILLILC, Object Pascal (separate implementations)None (no reference support)ZlibA Tcl-like language incompatible with mainline Tcl.
LilyLilyCRef. counting + tracing GCMITA language focusing on expressiveness and safety.
ljsljsCTracingMITLua 5.3, Lua 5.1, and LuaJIT with a C/C++/Java/JavaScript syntax. Can convert Lua source code to ljs.
LuaGo-LuaGoGo's GCMITImplements a subset of Lua 5.2.
LuaGopherLuaGoGo's GCMITImplements Lua 5.1 with the added support for Go's channels. Lacks the debug hooks and several functions from the C version.
LuaLuaCTracingMITThe reference implementation of what is likely the world's most popular embedded scripting language. Allows you to precompile scripts to bytecode. Versions 5.1-5.3, which are the ones used today, are not fully compatible with each other.
LuaLuaJJavaJVM's GCMITA Lua 5.2 spec-compliant interpreter written in Java for JME and JSE. Complies Lua directly to JVM bytecode.
LuaLuaJITCTracingMITFully compatible with Lua 5.1. Has a built-in C FFI library. Performance comparison.
LuaLua-MLOCamlOCaml's GCBSD-2-ClauseEmbeddable Lua 2.5 reimplementation that integrates with OCaml type and module system. It's possible to extend or even replace the standard library with your own modules.
LuaLuauCTracingMITRoblox fork of Lua 5.1 as a scripting language for games to support a gradual type system as well as limiting the set of standard libraries exposed to the users and implements extra sandboxing features to be able to run unprivileged code. Whenever possible, Luau aims to be backwards-compatible with Lua 5.1 and at the same time to incorporate features from later revisions of Lua.
LualuerlErlangTracingApache-2.0An implementation of Lua 5.2 in pure Erlang with some features like goto absent.
LuaMoonSharpC#CLR's GCBSD-3-Clause and otherCLR Based Lua implementation that is 99% compatible with Lua 5.2
LuaRaviCTracingMIT“Ravi is a dialect of Lua with limited optional static typing and features a JIT compiler powered by MIR as well as support for AOT compilation to native code.”
MoiraiMoiraiKotlinJVM's GCMITA scripting language that calculates the worst-case execution time (WCET) before executing each script. Optimized for multi-tenant microservices and serverless applications.
MondMondC#CLR's GCMITA dynamically typed scripting language with generators, async, remote debugging, and a binding API.
NeverNeverCTracingMITA statically typed functional programming language.
NickelNickelRustRef. countingMITA configuration language with gradual typing and contracts. Python bindings.
PascalPascal ScriptObject PascalNone (manual MM)modified zlib/libpng-License with mandatory attributionStatically typed. Implements "most of Object Pascal". Can't define new classes.
PawnPawnCNone (no heap allocation)Apache-2.0 with a clause to explicitly permit static linkingA curly-brace language with a small-footprint VM. Represents data as 4/8-byte "cells". Compiles to CPU-specific bytecode. More.
PerlPerlCRef. countingArtistic-2.0 or GPL-3.0Embedding Perl in Another Application
PHPephpErlangNone (no collection inside interpreter state)LGPL-2.1-or-laterImplements a subset of PHP 5.5.
PHPPH7CRef. countingSymisc Public License or proprietaryImplements a subset of PHP 5.3 with some changes like native UTF-8 support.
PlutoPlutoC++TracingMITA superset of Lua 5.4 (outside of incompatibilies caused by new syntax). Adds syntax like !=, break, and string interpolation; expands the standard library; somewhat improves performance.
pocketlangpocketlangCTracingMITA small language syntactically similar to Ruby. Embedding examples. Performance comparison.
PrologErlogErlangNone ()Apache-2.0Interprets a subset of standard Prolog.
PrologGologGoGo's GCMITImplements a subset of standard Prolog.
PythonCircuitPythonCTracingMITA fork of MicroPython, designed for API uniformity across many microcontrollers.
PythongpythonGoGo's GCBSD-3-ClauseImplements a subset of Python 3.4.
PythonGraalPyC, JavaJVM's GCUPL-1.0Implements Python 3 for GraalVM (HotSpot JVM) using Truffle.
PythonJythonJavaJVM's GCPSFL (BSD-like)An implementation of Python 2 for the JVM.
PythonMicroPythonCTracingMITImplements Python 3.4 syntax and some of the core datatypes.
PythonPikaPythonCRef. countingMITImplements a variant of Python 3. The degree of compatibility with Python seems to be undocumented. Runs in as little as 4 KiB of RAM. Targets microcontrollers and Linux.
PythonpocketpyC++TracingMITImplements a subset of Python 3 (with some differences) in a single C++17 header file.
PythonPythonCRef. counting + cycle-detecting tracing GCPSFL (BSD-like)"Embedding Python in Another Application".
QuakeCgmqcc/qcvmC++None (no dynamic memory allocation)MITA QuakeC compiler and VM.
QuirrelQuirrelC++Ref. countingMITA fork of Squirrel with new features.
RebolRebolCTracingApache-2.0Relative Expression Based Object Language
RedRedRebol, Red, Red/SystemTracingBSD-3-Clause, BSL-1.0A descendant of Rebol. Embeddable via libRed. Features a cross-platform native GUI system. Intended to have low memory usage.
RexxNetRexxJavaJVM's GCICU (BSD-like)
RexxooRexxC++TracingCPLImplements Rexx extended with objects.
RhaiRhaiRustNone (Rust-style lifetimes)MIT or Apache-2.0An embedded scripting language for Rust inspired by ChaiScript.
RingRingCTracingMITAn embeddable applications programming language with a large standard library and GIL-less multithreading.
RubyJRubyJavaJVM's GCChoice of EPL, GPL, and LGPLAn implementation of Ruby on the JVM.
RubymrubyCTracingMITA lightweight implementation of Ruby. Has a compile-time package manager.
Rubymruby/cCRef. countingBSD-3-ClauseAn even smaller implementation of Ruby for microcontrollers with limited memory.
RubyRubyCTracingChoice of BSD-2-Clause, Ruby license, GPL-2.0An embeddable object-oriented scripting language. Running Ruby in C.
RubyTruffleRubyC, JavaJVM's GCUPL-1.0Implements Ruby for GraalVM (HotSpot JVM) using Truffle.
RuneRuneRustRef. countingMIT or Apache-2.0An embeddable dynamic programming language. Asynchronous-first and const-evaluation.
SchemeAnimulaCTracingCompiler: GPL-3.0-or-later, VM: LGPL-3.0-or-laterAn optimizing compiler and VM for embedded systems. R7RS.
SchemeChibi SchemeCTracingBSD-3-ClauseImplements R7RS small.
SchemeCHICKEN SchemeCTracingBSD-3-ClauseImplements R5RS (with some changes). R7RS support is a work in progress. Examples of embedding CHICKEN.
SchemeGNU GuileCBoehmLGPL-3.0-or-later"Guile mostly implements R6RS."
SchemeKawaJavaJVM's GCMITR7RS. Supports the javax.script API. Evaluating Scheme expressions from Java.
Schemes7CTracingBSD-3-ClauseImplements a subset of R5RS/R7RS. Descended from TinyScheme.
SchemeSteelRustRef. counting + tracing GCApache-2.0 or MITAims for eventual R5RS and R7RS compliance. Has extensions inspired by Racket.
SchemeTinySchemeCTracing?BSD-3-ClauseImplements a subset of R5RS.
SGScriptSGScriptCRef. counting + tracing CGMITFeatures include a built-in data serialization format, coroutines, class-based OOP, sandboxed evaluation, a built-in debugger and profiler.
ShineShineCTracingMITA language based on Lua with additional safety and expressiveness features implemented as a fork of LuaJIT.
simpleevalsimpleevalPythonPython's GCMITEvaluates expressions in a subset of Python.
SnekSnekCTracingGPL-3.0-or-laterA Python-inspired language. Targets "processors too small to run MicroPython".
SquiLuSquiLuC++Ref. countingMIT, some extensions LGPL or GPLA fork of Squirrel. Changes the syntax to accept a subset of JavaScript and C/C++. Implements Lua's features like string pattern matching and global table manipulation functions. Adds extensions for database access (SQLite3, MySQL, PostgreSQL), sockets, and other features.
SquirrelSquirrelC++Ref. countingMITA language inspired by Lua and JavaScript/Python. Has a Lua-like C++ API. Differentiates itself from Lua with the use of reference counting in place of Lua's tracing GC, a curly-brace syntax, built-in class-based OOP, and zero-indexed arrays.
StarlarkStarlark (Go)GoGo's GCBSD-3-ClauseA small dialect of Python for configuration. Not Turing-complete. Untrusted code: can't access the file system and network, can use up memory and CPU to perform a DoS attack. Spec. Python bindings.
StarlarkStarlark (Java)JavaJVM's GCApache-2.0Starlark for the JVM. The original implementation.
StarlarkStarlark (Rust)Rust?Apache-2.0Starlark in Rust. Python bindings.
TclJim TclCTracingBSD-2-ClauseLargely compatible with Tcl 8.5 with its own additions.
TclJTclJavaRef. countingVarious BSD-likeTcl 8.4 with some 8.5 features for the JVM.
TclMoltRustRef. countingBSD-3-ClauseA minimal Tcl implementation for Rust applications and libraries.
TclPicolCNone (no reference support)BSD-2-ClauseA header-only library interpreter for a limited dialect of Tcl.
TclTclCRef. countingTcl license (BSD-like)An embeddable general-purpose scripting language with a rich C API. Has a cross-platform GUI toolkit called Tk. How to embed Tcl in C applications.
ToyToyCRef. countingZlibHas an optional type system. Embedding Toy.
UmkaUmkaCRef. countingBSD-2-ClauseStatically typed.
WirefilterWirefilterRustNone (no dynamic memory allocation)MITAn expression language for Wireshark-like filters.
WrenWrenCTracingMITA small class-based performance-oriented scripting language. Performance comparison.
ZetScriptZetScriptC++Ref. countingMITComes with an API for C++ interop.
zygomyszygomysGoGo's GCBSD-2-ClauseAn embedded Lisp for Go. Inspired by Clojure, but more oriented towards imperative programming. Has an infix syntax layer that looks like a subset of Go.

See also

Contributing

Your contributions are welcome! See CONTRIBUTING.

License

CC0

Disclosure

The curator of this document maintains Picol and has contributed to Jim Tcl.