Choosing scripting extension - need advice

This page summarizes the projects mentioned and recommended in the original post on /r/golang

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.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • starlark-go

    Starlark in Go: the Starlark configuration language, implemented in Go

  • If you want Python syntax, https://github.com/google/starlark-go is nice. It is the configuration language interpreter for Bazel, so it is well maintained and stable But that also means features, move slowly and some things that you would find in the standard library for CPython need to be grabbed from a different community maintained repo. It's also, in my opinion, a little less smooth moving back and forth between the scripting language and your code. Code. That said, both are great choices in my opinion. Some people like Lua. I'm sure I would like it if I wanted to spend time on it, but I'm already pretty comfortable with the other choices so I haven't.

  • expr

    Discontinued Expression language and expression evaluation for Go [Moved to: https://github.com/expr-lang/expr] (by antonmedv)

  • We use https://github.com/antonmedv/expr at some other place for similar case, but there rules are bit simpler and this library seem to suit ideally for such simple "one line" conditions.

  • 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.

    InfluxDB logo
  • otto

    A JavaScript interpreter in Go (golang)

  • Googling suggests https://github.com/robertkrimen/otto which allows scripting in javascript for golang projects. This would be definitely enough, but in some way it may be a bit overkill - and scripts supporter shall need some knowledge of javascript which is not always straightforward :)

  • goja

    ECMAScript/JavaScript engine in pure Go

  • For JS in Go use goja, which offers excellent integration with Go. Also I maintain an extension that adds Common-JS compatibility to it.

  • kutil

    Go Utilities

  • For JS in Go use goja, which offers excellent integration with Go. Also I maintain an extension that adds Common-JS compatibility to it.

  • flamenco

  • If you're curious how I set it up, check out blender/flamenco on Gitlab. The Goja/JS stuff is in internal/manager/job_compilers.

  • prudence

    An opinionated lightweight web framework built for scale

  • If you're interested, I have another project in which I use TypeScript (tsc) to compile to JavaScript/Common-JS that is compatible with goja. It works really well.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • embedded-scripting-languages

    A list of embedded scripting languages

  • or perhaps use one of this list (depending on who's writing the configuration): https://github.com/dbohdan/embedded-scripting-languages

  • wasmer-go

    🐹🕸️ WebAssembly runtime for Go

  • If performance is your main concern, there's Wasmer-go, but if you'd rather avoid CGO dependencies, there's wazero.

  • wazero

    wazero: the zero dependency WebAssembly runtime for Go developers

  • If performance is your main concern, there's Wasmer-go, but if you'd rather avoid CGO dependencies, there's wazero.

  • starlight

    a go wrapper for google's starlark embedded python language (by sourcegraph)

  • Pretty surprised no one has suggested starlark - Very nice ergonomics on both the scripting side and the interpreter. Worth a look! Especially nice when combined with starlight

  • yaegi

    Yaegi is Another Elegant Go Interpreter

  • You could also embed a Go interpreter, and have your scripts or expressions in Go. See for example https://github.com/traefik/yaegi. Disclaimer: I'm the author of this project.

  • grule-rule-engine

    Rule engine implementation in Golang

  • You should take a look at Grule https://github.com/hyperjumptech/grule-rule-engine

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • SSR React in Go

    9 projects | dev.to | 20 Jan 2024
  • Plugo - A plugin library for Go.

    5 projects | /r/golang | 9 Dec 2022
  • Using Javascript plugins in Go

    2 projects | /r/golang | 3 Mar 2021
  • Show HN: I built a website to share files and messages without any server

    13 projects | news.ycombinator.com | 5 May 2024
  • Goja: ECMAScript/JavaScript engine in pure Go

    1 project | news.ycombinator.com | 7 Apr 2024