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

wanted: websocketpp #3045

Closed
1 task
pvarcholik opened this issue Oct 29, 2024 · 4 comments · Fixed by #3050
Closed
1 task

wanted: websocketpp #3045

pvarcholik opened this issue Oct 29, 2024 · 4 comments · Fixed by #3050
Labels
module wanted Users want a certain module to be available in the BCR, contributions are welcome!

Comments

@pvarcholik
Copy link

pvarcholik commented Oct 29, 2024

Module location

https://github.com/zaphoyd/websocketpp

Link to bzlmod issue in the module's repository

No response

Any other context to provide?

WebSocket++ is a C++11 header-only library that supports various transport layers included Boost.Asio and stand-alone Asio. This needs to compile under C++11, but it appears that the bazel build is pulling the stand-alone Asio library and it contains C++17 features. If possible, I'd like a bazel module that allows the use of Boost::Asio instead of the stand-alone library.

Fund our work

  • Sponsor our community's open source work by donating a feature bounty
@pvarcholik pvarcholik added the module wanted Users want a certain module to be available in the BCR, contributions are welcome! label Oct 29, 2024
@hofbi
Copy link
Contributor

hofbi commented Oct 29, 2024

Websocket in general is already available at https://registry.bazel.build/modules/websocketpp. However, it depends on https://registry.bazel.build/modules/asio/1.28.2 which uses some C++17 features. According to the readme, we could replace standalone asio with boost.asio.

Question to the maintainers (@meteorcloudy since you approved the PRs). Should we create a completely new module such as websocket-boost or just a new version such as 0.8.2.boost?

@meteorcloudy
Copy link
Member

Sorry I don't have much insight into this specific library, I was approving as a general BCR maintainer. /cc @BYVoid @lalten who actually contributed the PRs.

@lalten
Copy link
Contributor

lalten commented Oct 29, 2024

The reason I touched asio was to bring mvukov/rules_ros2#238 forward. rules_ros2 needs asio in Workspace and I adapted the Bzlmod version to be compatible so the repo can use the same implementation for both modes.

I've seen @keith use some neat tricks for Bzlmod curl to switch the TLS backend:

+ deps = select({
+ ":use_mbedtls_setting": ["@mbedtls"],
+ "//conditions:default": [],
+ }),

Possibly you could do something similar for WebSocket++ to switch between Boost Asio and Standalone Asio.

Cc also @wep21 who has contributed the most recent incarnation of Boost Bzlmods

@hofbi
Copy link
Contributor

hofbi commented Oct 29, 2024

I came up with this first draft

meteorcloudy pushed a commit that referenced this issue Oct 30, 2024
Closes #3045

---

Please note that with `boost.asio`, only Bazel 7.x is supported. With
Bazel 6, I ran into [this
error](https://buildkite.com/bazel/bcr-presubmit/builds/8436#0192dd4c-016a-4d23-8724-30cdc578f223):
`Error computing the main repository mapping: in module dependency chain
<root> -> websocketpp@0.8.2.bcr.2 -> boost.asio@1.83.0 ->
boringssl@0.20240913.0 -> googletest@1.15.2: error executing
MODULE.bazel file for googletest@1.15.2`. [The googletest
version](https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/googletest/1.15.2/presubmit.yml)
only supports Bazel 7.x in CI, so I do the same.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module wanted Users want a certain module to be available in the BCR, contributions are welcome!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants