Mixing Go and Lua
The speedata Publisher is built on top of LuaTeX, a TeX variant that has an integrated Lua (5.x) implementation. Lua is a language specifically designed for integration in a host software. Most of the code of the speedata Publisher is written in Lua, but there are some (non-typesetting) parts where Lua is not much fun to write:
- Unicode handling
- regular expressions
- XML parsing
- Resource (URL, file) access
All of these “modules” are written in Go and compiled into a library that is loaded during runtime (dll, shared object). Now the big question is: how to access the library?