I think it would be nice with a CI workflow for this repo that would cross-compile for different platforms to ensure compatibility. I've recently opened #202 and #203 to fix issues around macos & ios support. I think that could have been avoided with more extensive testing.
I spent some time contributing to the Boehm GC repo (https://github.com/ivmai/bdwgc) of which cross-compilation was one part. We ported the CMake config to the Zig build system and then used zig's excellent cross-compilation support to run cross-compilation test jobs for multiple platform. Quite cool IMHO. We're also using zig as part of the Acton programming language (where tlsuv is also used). As part of that, I wrote a basic build.zig (https://github.com/actonlang/tlsuv/blob/zig-build-rebase20240211/build.zig), it is not fully fledged but builds the basic parts that are used in Acton. It can be used to do this kind of cross-compilation. I'm saying not fully fledged because I was really only interested in the TLS bits of tlsuv and not in a HTTP client with the dependency of llhttp and in turn node.js that I think it depends on, so the build.zig takes certain shortcuts.
If you agree this is a good idea, the plan forward could be something like
put basic build.zig in place
add github actions job to do cross-compile using build.zig for a number of platforms
expand build.zig to reach feature parity with CMake
I think it would be nice with a CI workflow for this repo that would cross-compile for different platforms to ensure compatibility. I've recently opened #202 and #203 to fix issues around macos & ios support. I think that could have been avoided with more extensive testing.
I spent some time contributing to the Boehm GC repo (https://github.com/ivmai/bdwgc) of which cross-compilation was one part. We ported the CMake config to the Zig build system and then used zig's excellent cross-compilation support to run cross-compilation test jobs for multiple platform. Quite cool IMHO. We're also using zig as part of the Acton programming language (where tlsuv is also used). As part of that, I wrote a basic build.zig (https://github.com/actonlang/tlsuv/blob/zig-build-rebase20240211/build.zig), it is not fully fledged but builds the basic parts that are used in Acton. It can be used to do this kind of cross-compilation. I'm saying not fully fledged because I was really only interested in the TLS bits of tlsuv and not in a HTTP client with the dependency of llhttp and in turn node.js that I think it depends on, so the build.zig takes certain shortcuts.
If you agree this is a good idea, the plan forward could be something like