Go

Cross-Platform Go Libraries: Options, Pitfalls, and Conclusions

After months of struggling with this problem — and spending today running yet another round of experiments — I finally came to a conclusion: there’s no clean way to build Go libraries that can be reliably consumed from other languages across all major platforms (Windows, Linux, macOS, Android, and iOS).

Long story short: I came to the conclusion that you should never create C wrappers for your Go libraries or distribute them as C-compatible libraries. It creates more headaches than it solves.