>This package uses the novel (at least, novel to me) method of embedding a small C program (Trealla Prolog) through WASM/WASI and exposing it as a regular Go library
Could you please expand this with more details?
Could you please expand this with more details?
You can see the relevant code here: https://github.com/guregu/trealla-go/blob/333645147df083dd26... that builds up the command line arguments for tpl (the Trealla binary, shoved into the repo as tpl.wasm). The rest of the package is mostly shuffling data around.