Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-compilation CI for multi-platform testing of tlsuv #204

Open
plajjan opened this issue Feb 11, 2024 · 0 comments
Open

Cross-compilation CI for multi-platform testing of tlsuv #204

plajjan opened this issue Feb 11, 2024 · 0 comments

Comments

@plajjan
Copy link
Contributor

plajjan commented Feb 11, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant