I'd like to write a portable library that can be easily used from several differ...

@Lynx@ohai.social

I'd like to write a portable library that can be easily used from several different languages. The classic go-to for this would be C.

I'd like to use a language with a bit more safety than C, but retain the ability to use the resulting library from other languages, which means it'd have to create a library with the C calling convention.

Any suggestions for achieving this? My initial thought is Zig, but I'm not sure how to proceed.

#programming #portability #c #zig