// the find
mattn/anko
Scriptable interpreter written in golang
Anko is a Go-syntax scripting language you can embed in a Go application, letting users write scripts that call into your Go functions and types. It's aimed at developers who want to add user-facing scripting without shipping a Lua or JavaScript runtime. The syntax is close enough to Go that existing Go developers can pick it up without learning a new language.
The embedding API is genuinely minimal — define a function with `env.Define`, run a string with `vm.Execute`, and you're done. No boilerplate ceremony. The standard library coverage is solid: fmt, net/http, os, regexp, sync, time are all wrapped and available to scripts. The test suite is thorough and organized per-package, so the VM behavior is well-specified even without formal language docs. There's a WASM build included, which means you can run Anko scripts in the browser if you need a playground.
The master branch explicitly warns it isn't stable and the API can break at any time — for a library you're embedding in a production service, that's a real problem. There's no sandboxing: scripts get access to whatever you expose, and the `os.exec` package is right there in the standard bindings, so you have to be careful about what you hand to users. Error messages from script failures are bare and hard to map back to user-friendly line numbers, which matters if scripts are written by end users rather than developers. The project shows signs of stagnation: the `io/ioutil` package (deprecated since Go 1.16) is still wrapped, and several files have `Go17`/`Go110`/`Go112` build-tag variants that suggest the codebase hasn't been cleaned up in years.