内容简介:The following is a list of reasonably mature open source embedded scripting languages to use in your application. Stretching the definition of a scripting language, it also includesYour contributions are welcome! Please submit a pull request or create an i
Embedded scripting languages
The following is a list of reasonably mature open source embedded scripting languages to use in your application. Stretching the definition of a scripting language, it also includes Datalog implementations.
Project name/link | Implementation language | GC | License | Notes |
---|---|---|---|---|
AbcDatalog | Java | JVM's GC | 3-clause BSD | Implements Datalog. |
AngelScript | C++ | Ref. counting + cycle-detecting tracing GC | zlib | A statically typed curly brace language resembling C++ itself. |
Anko | Go | Go's GC | MIT | Scriptable interpreter with syntax similar to Go. |
ArkScript | C++ | None (resource release is destruction + optional manual MM) | MPL 2.0 | A small functional Lisp-like programming language. Separate bytecode compiler and VM. |
Atlast | C | None (manual MM) | Public domain | A dialect of Forth originally developed at Autodesk. |
BeanShell | Java | JVM's GC | Apache License 2.0 | An small, embeddable Java source code interpreter. Understands Java code with certain extensions like method closures. |
Boron | C | Tracing | LGPL 3+ | An embeddable scripting language similar to Rebol. |
Cascalog | Clojure | JVM's GC | Apache License 2.0 | Implements Datalog. |
ChaiScript | C++ | Ref. counting | 3-clause BSD | A header-only C++14 interpreter library. |
Chibi Scheme | C | Tracing | 3-clause BSD | Implements R7RS small. |
CHICKEN Scheme | C | Tracing | 3-clause BSD | Implements R5RS (with some changes ). R7RS support is a work in progress. Examples of embedding CHICKEN . |
Clasp | Common Lisp, C++ | MPS GC (Boehm-Weiser also supported) | LGPL 2+ | Full Common Lisp implementation well integrated with C++, using LLVM for the code generation, to integrate closely with C++ applications or libraries. |
Datalog (c-cube) | OCaml | OCaml's GC | 2-clause BSD | Implements Datalog. |
Datalog (fogfish) | Erlang | None (no collection inside interpreter state) | Apache License 2.0 | Implements Datalog. |
Datalog (MITRE Corporation) | C | Tracing (Lua's GC) | LGPL 2+ | Implements Datalog. It is implemented on top of Lua 5.3 and can be extended with Lua functions. |
Dhall | Haskell | Haskell's GC | 3-clause BSD | A 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. |
Duktape | C | Ref. counting + cycle-detecting tracing GC | MIT | Implements JavaScript E5/E5.1. |
DWScript | Object Pascal (Delphi 2009 or later) | Ref. counting + cycle-detecting tracing GC | MPL 1.1, GPL 3 (JavaScript code generator) | Description . A statically typed Delphi/Free Pascal-like language. Can compile to JavaScript. |
Dyon | Rust | None (Rust-style lifetimes ) | Apache License 2.0 or MIT | Has optional, optimistic (succeed-by-default) static type checking. |
Embeddable Common Lisp | Common Lisp, C | Boehm-Weiser GC | LGPL 2+ | Full Common Lisp implementation, available as a shared library libecl.so embeddable in any C, C++ or other application. |
ephp | Erlang | None (no collection inside interpreter state) | LGPL 2.1 | Implements a subset of PHP 5.5. |
Erlog | Erlang | None () | Apache License 2.0 | Interprets a subset of standard Prolog. |
Espruino | C | Tracing | MPL 2.0 | Implements a subset of JavaScript ES5 in a way suitable for embedded hardware with 8+ KiB RAM. |
Expr | Go | Go's GC | MIT | Compiles and evaluates statically-typed expressions. |
Flabbergast | Java | JVM's GC | MIT | An object-oriented configuration language. |
FTH | C | Tracing | 2-clause BSD | A dialect of Forth with objects, hashes, regular expressions, and other extensions. |
GameMonkey Script | C++ | Tracing | MIT | Comes with C bindings. Similar to Lua, multithreaded. |
gluon | Rust | Tracing | MIT | Statically typed. Inspired by Lua, Haskell, and OCaml. Each executing gluon thread gets a separate heap. |
Golog | Go | Go's GC | MIT | Implements a subset of standard Prolog. |
Go-Lua | Go | Go's GC | MIT | Implements a subset of Lua 5.2. |
GopherLua | Go | Go's GC | MIT | Implements Lua 5.1 with the added support for Go's channels. Lacks the debug hooks and several functions from the C version. |
Gravity | C | Tracing | MIT | A class-based concurrent scripting language with a Swift-like syntax. |
Groovy | Java | JVM's GC | Apache License 2.0 | A scripting language for the JVM. A large subset of Java is valid Groovy. Integrating Groovy into applications . |
GNU Guile | C | Boehm | LGPL 3+ | "Guile mostly implements R6RS." |
HashLink | C | Tracing (lazy sweep) | MIT | A bytecode interpreter and a baseline JIT compiler (x86/x86_64 only) for Haxe . |
Io | C | Tracing | 3-clause BSD | A prototype-based OO language. |
Janet | C | Tracing | MIT | A functional and imperative language with a Lisp syntax. |
JerryScript | C | Tracing | Apache License 2.0 | A full ECMAScript 5.1 interpreter written in C99 and optimized for low memory consumption. Uses CMake. |
Jim Tcl | C | Tracing | 2-clause BSD | Largely compatible with Tcl 8.5 with its own additions. |
JRuby | Java | JVM's GC | Choice of EPL, GPL, and LGPL | An implementation of Ruby on the JVM. |
jsish | C | Ref. counting | MIT | A 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++. |
Jsonnet | C++ | Tracing | Apache License 2.0 | A 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. |
JTcl | Java | Ref. counting | Various BSD-like | Tcl 8.4 with some 8.5 features for the JVM. |
Jython | Java | JVM's GC | PSFL (BSD-like) | An implementation of Python on the JVM. |
Kawa | Java | JVM's GC | MIT | R7RS. Supports the javax.script API. Evaluating Scheme expressions from Java . |
Ketos | Rust | None (no heap allocation)? | Apache License 2.0 | A functional Lisp. |
LIL | C, Object Pascal (separate implementations) | None (no reference support) | zlib | A Tcl-like language incompatible with mainline Tcl. |
Lily | C | Ref. counting + GC | MIT | A language focusing on expressiveness and safety. |
ljs | C | Tracing | MIT | Lua 5.3, Lua 5.1, and LuaJIT with a C/C++/Java/JavaScript syntax. Can convert Lua source code to ljs. |
Lua | C | Tracing | MIT | The reference implementation of what is likely the world's most popular embedded scripting language. Fast for an interpreter. 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. |
LuaJ | Java | JVM's GC | MIT | A Lua 5.2 spec-compliant interpreter written in Java for JME and JSE. Complies Lua directly to JVM bytecode. |
LuaJIT | C | Tracing | MIT | Fully compatible with Lua 5.1. Has a built-in C FFI library. Very fast. |
luerl | Erlang | Tracing | Apache License 2.0 | An implementation of Lua 5.2 in pure Erlang with some features like goto absent. |
MicroPython | C | Tracing | MIT | Implements the Python 3.4 syntax and some of the core datatypes. |
Molt | Rust | Ref. counting | 3-clause BSD | A minimal Tcl implementation for Rust applications and libraries. |
Mond | C# | CLR's GC | MIT | A dynamically typed scripting language with generators, async, remote debugging, and a binding API. |
Mono | C | Tracing | MIT and other | Implements the CLR . |
mruby | C | Tracing | MIT | A lightweight implementation of Ruby. Has a compile-time package manager. |
MuJS | C | Tracing | ISC | Implements JavaScript (ES5). Has a similar C interface to Lua. |
MY-BASIC | C | Ref. counting + cycle-detecting tracing GC | MIT | A Basic dialect with prototype-based OOP. |
Neko | C | Boehm | MIT | The NekoVM is a target for several compilers, including Haxe . |
NetRexx | Java | JVM's GC | ICU (BSD-like) | Implements Rexx. |
Never | C | Tracing | MIT | A statically typed functional programming language. |
njs | C | None (no collection performed) | 2-clause BSD | Implements a subset of ES5.1 with some ES6 extensions. |
ooRexx | C++ | Tracing | CPL | Implements Rexx extended with objects. |
otto | Go | Go's GC | MIT | Implements ES5 with some limitations . |
Pascal Script | Object Pascal | None (manual MM) | Custom non-copyleft | Statically typed. Implements "most of Object Pascal". Can't define new classes. |
Pawn | C | None (no heap allocation) | Apache License 2.0 with a clause to explicitly permit static linking | A curly-brace language with a small-footprint VM. Represents data as 4/8-byte "cells". Compiles to CPU-specific bytecode. More . |
pForth | C | None (manual MM) | Public domain | A dialect of Forth. |
PicoC | C | None (manual MM) | 3-clause BSD | Statically typed. Interprets a subset of C. |
Python | C | Ref. counting + cycle-detecting tracing GC | PSFL (BSD-like) | Embedding Python in Another Application . |
gmqcc/qcvm | C++ | None (no dynamic memory allocation) | MIT | A QuakeC compiler and VM. |
QuickJS | C | Ref. counting + cycle-detecting tracing GC | MIT | A small embedded JavaScript interpreter that implements almost all of ES2019 and much of ES2020. |
Rhai | Rust | ? | MIT or Apache License 2.0 | An embedded scripting language for Rust inspired by ChaiScript. |
Ring | C | Tracing | MIT | An embeddable applications programming language with a large standard library and GIL-less multithreading. |
Ruby | C | Tracing | Choice of 2-clause BSD, Ruby license, GPL 2 | An embeddable object-oriented scripting language. Running Ruby in C . |
s7 | C | Tracing | 3-clause BSD | Implements a subset of R5RS/R7RS. Descended from TinyScheme. |
sci | Clojure | host VM's GC | EPL | An interpreter for a subset of Clojure for Clojure and ClojureScript. |
SGScript | C | Ref. counting + tracing CG | MIT | Features include a built-in data serialization format, coroutines, class-based OOP, sandboxed evaluation, a built-in debugger and profiler. |
Shine | C | Tracing | MIT | A language based on Lua with additional safety and expressiveness features implemented as a fork of LuaJIT. |
SquiLu | C++ | Ref. counting | MIT, some extensions LGPL or GPL | A 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. |
Squirrel | C++ | Ref. counting | MIT | A 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. |
Starlark (Go) | Go | Go's GC | 3-clause BSD | A 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 . |
Starlark (Java) | Java | JVM's GC | Apache License 2.0 | Starlark for the JVM. The original implementation. |
Starlark (Rust) | Rust | ? | Apache License 2.0 | Starlark in Rust. |
Tcl | C | Ref. counting | Tcl 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 . |
TinyScheme | C | Tracing? | 3-clause BSD | Implements a subset of R5RS. |
Wirefilter | Rust | None (no dynamic memory allocation) | An expression language for Wireshark-like filters. | |
Wren | C | Tracing | MIT | A small class-based performance-oriented scripting language. |
zygomys | Go | Go's GC | 2-clause BSD | An 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
- Game scripting languages benchmarked .
- miniKanren logic programming language implementations.
- sol — C++ bindings for Lua.
Contributing
Your contributions are welcome! Please submit a pull request or create an issue to add a new language to the list. I am looking for language implementations that are either actively maintained or largely "done". The VM and the standard library, if any, must have a free ( libre ), non-copyleft or limited-scope copyleft license (e.g., the GNU LGPL or the MPL, but not the GNU GPL). If the main bytecode compiler is a separate program, it must have a license that doesn't automatically apply to its output. Optional add-ons may have any license: from strong copyleft to proprietary. A Datalog implementation must be able to parse Datalog source code; it must not be just an EDSL.
License
以上所述就是小编给大家介绍的《embedded-scripting-languages》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Python高级编程(第二版)
[波兰] Michał Jaworski、[法] Tarek Ziadé / 张亮、阿信 / 人民邮电出版社 / 2017-9-19 / 89.00元
Python作为一种高级程序设计语言,凭借其简洁、易读及可扩展性日渐成为程序设计领域备受推崇的语言之一。 本书基于Python 3.5版本进行讲解,通过13章的内容,深度揭示了Python编程的高级技巧。本书从Python语言及其社区的现状开始介绍,对Python语法、命名规则、Python包的编写、部署代码、扩展程序开发、管理代码、文档编写、测试开发、代码优化、并发编程、设计模式等重要话题......一起来看看 《Python高级编程(第二版)》 这本书的介绍吧!