4 ms·
Go can do this easily - you just do `go build -buildmode=c-shared` and put a magic //export FuncName comment before any function. This produces a C ABI .so (Lin
by mappu 6y ago
Go can do this easily - you just do `go build -buildmode=c-shared` and put a magic //export FuncName comment before any function. This produces a C ABI .so (Linux) / .dll (Windows).
Although the resulting library is a little bit heavy (1-2MB) because it bundles the Go runtime and GC, and initializes it on first load.
- Zababa 6y agoThanks, that's something I didn't know about.