Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →
Top 20 Go Embeddable Scripting Language Projects
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
Gentee script programming language
Gentee - script programming language for automation. It uses VM and compiler written in Go (Golang).
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
robertkrimen/otto
Would be neat to see graph of recent versions with linear scale
I checked, they use switch on opcodes in vm.go. So would expect a recent improvement, but probably only <5%, & I didn't look close enough to see if awk is one of those languages where instruction dispatch matters less (like how APL tends to avoid issues since array ops avoid having dispatch in tight loops, or how Python avoids instruction dispatch overhead when using numpy)
For VMs Go had a problem for large switch statements: it would always use binary search instead of a jump table. This caused gopher-lua & go-lua to both take the route of having an array of functions which they call on to dispatch instead
A couple years ago this was fixed: https://go-review.googlesource.com/c/go/+/357330
I measured a small perf improvement switching gopher-lua to switch: https://github.com/yuin/gopher-lua/pull/479
> It also has a bunch of libraries for embedding scripting languages https://awesome-go.com/embeddable-scripting-languages, with Tengo _probably_ being the quickest https://github.com/d5/tengo
Yes, I noticed those packages recently. The problem is that there is little data about how reliable and maintainable goloader is going to be on the long term.
As I care about performance and security, I don't want a scripting language, but WASM seems to be a very promising possibility. I have made benchmarks with 2~3 WASM engines in Go, and so far I am not completely convinced about the quality and performance of the available APIs. Also, when compiling Golang to WASM, the native compiler is still abysmally bad and does not have full support for imports, so Tinygo is a must-have.
Anyway, modding is still a long term idea at this point, so hopefully the ecosystem will get more mature within a couple of years.
Project mention: Jacobin: Minimal JVM written in Go and capable of running Java 17 classes | news.ycombinator.com | 2023-08-24https://github.com/Shopify/go-lua
Unless you specifically need a JVM either of these will be a much more practical and mature choice for embedded scripting.
Alternatively if you prefer JS then Otto is a good choice:
Starlark in go https://github.com/google/starlark-go is a great way to combine the best of both, the ease of use of Python and the simplicity of go.
I have been building a platform for deploying internal web applications using this approach https://github.com/claceio/clace. Use Starlark to configure the application, the platform itself is built in go.
There's a simple repl implementation in the cel-go repo that you can use https://github.com/google/cel-go/tree/master/repl/main. But not sure about what you actually want to do though. Has a bit of on XY problem feel to be honest.
Project mention: Risor v1.4.0: write scripts for K8s, Vault, and the Go ecosystem | news.ycombinator.com | 2024-02-27GitHub project here:
https://github.com/risor-io/risor
Go Embeddable Scripting Languages related posts
- Go performance from version 1.0 to 1.22
- Goja: ECMAScript/JavaScript engine in pure Go
- Risor v1.4.0: write scripts for K8s, Vault, and the Go ecosystem
- SSR React in Go
- CEL on N resources?
- Python Is Easy. Go Is Simple. Simple = Easy
- A very simple javascript type system in golang
-
A note from our sponsor - InfluxDB
www.influxdata.com | 25 Apr 2024
Index
What are some of the best open-source Embeddable Scripting Language projects in Go? This list will help you:
Project | Stars | |
---|---|---|
1 | otto | 7,837 |
2 | gopher-lua | 6,005 |
3 | goja | 4,931 |
4 | tengo | 3,444 |
5 | go-lua | 2,929 |
6 | starlark-go | 2,196 |
7 | cel-go | 2,036 |
8 | anko | 1,435 |
9 | go-php | 921 |
10 | gval | 696 |
11 | prolog | 533 |
12 | risor | 520 |
13 | gisp | 511 |
14 | Gentee script programming language | 128 |
15 | The uGO Language | 104 |
16 | binder | 69 |
17 | purl | 41 |
18 | ecal | 37 |
19 | ngaro | 26 |
20 | mosalat | 11 |
Sponsored