Feature creep request: Lua scripting
I don't have anything concrete in mind but tshark supports lua scripting, and it could be neat if termshark had it (if it exposed enough functionality to be useful). I don't know if wireshark supports lua for any frontend stuff.
As some precedent, the micro text editor is also written in Go, and has a (somewhat limited) integrated Lua interpreter that can be used as an example. I've done a little scripting with the micro editor: https://github.com/deliciouslytyped/micro-selfexec .
The thing is, the last time I looked I couldn't find an actively maintained Lua Go implementation. The one micro uses is https://github.com/yuin/gopher-lua/ .
See https://github.com/zyedidia/micro/search?q=commenter%3Adeliciouslytyped&type=issues for several issues I had with scripting micro. Namely, relatively low exposure of internal methods, and inability to load external shared objects (the latter being a gopher-lua limitation).
From a small bit of searching:
- inactive, micro uses it https://github.com/yuin/gopher-lua/
- don't know https://github.com/aarzilli/golua
- (5.3!) don't know https://github.com/milochristiansen/lua
- somewhat active? https://github.com/Shopify/go-lua (via https://libredd.it/r/golang/comments/73x4iw/lua_53_vm_and_compiler_written_in_go/)
- (5.3!) inactive and archived: https://github.com/Azure/golua ("no more lua" https://github.com/helm/helm/issues/5084#issuecomment-686549278) ( https://lobste.rs/s/jhgtvp/microsoft_released_implementation_lua_5#c_aaxl04 , https://news.ycombinator.com/item?id=18469672)
What to choose is entirely non-obvious to me, and I find none of the existing repos particularly motivating. Thus my gut feeling is "don't do this". :P At least not like this.
Source: gcla/termshark