Zig standard library already uses linux and windows API and it is the best place to look for best practices.
Windows declaration examples:
They use extern "kernel32"
that means link with kernel32.dll
and callconv(WINAPI)
that means use the windows API calling convention.
In std.os.windows you will find examples of how to call these functions by converting between UTF-16 and UTF-8.
Linux calls are at std.os.linux.
These functions are direct system calls to the linux kernel, C standard library is not required. For example: