Open abergmeier opened 7 years ago
rules_ll
upstream supports the std
module from libc++, and Clang 17 will ship the std
module as an experimental preview. Most issues have been fixed, and I'd consider modules as pretty much fully usable.
A few issues remain which I could imagine to be fairly hard blockers for rules_cc
:
.cppm
files and they have to be built locally. If you depend on a modularized external dependency, you can't import a prebuilt BMI of that dependency. You have to build the entire dependency from source yourself. Not an issue if you do that anyways, but many users would probably prefer including some headers and linking a prebuild archive over building the entire dependency from source.We'll probably need distros to actually ship Clang 17 with the std
module .cppm
files to get a better feeling on what's good and bad for build-system UX with modules. The implementation in rules_ll
certainly has some subtleties regarding inter-module visibility that I've reworked several times now and might have to rework several times more.
Then again C++23 is basically Rust already. Seems like that's also where all the Bazel engineering power is being redirected to. I wouldn't find it too surprising if the recommendation for the future is to just not write new C++ and use rules_rust
with crubit
for legacy-compatibility instead :smile:
That’s a shame. I was hoping to use Bazel for a large project we are migrating. C++20 modules are more important to me than Bazels many advantages, and rules_ll is a non-starter because I need to support macOS and Windows.
Maybe next year things will be better.
Do we have any update on this?
I'm also quite interested in contributing this featuer. Is there any guidance on this for me to do so?
I would help with such an effort too.
See #4005 (comment)
It sounds like that is basically saying nothing is done and some one wanting good support should start from scratch.
Note also that post was referring to clang modules and not c++20 modules; this issue got hijacked from clang module support to c++ 20 at some point in the history of this issue.
Dear all, the support for C++20 Modules is here. PR: https://github.com/bazelbuild/bazel/pull/19940 design doc: https://github.com/bazelbuild/proposals/pull/354 discussion: https://github.com/bazelbuild/bazel/discussions/19939 a demo built with C++20 Modules (about 10 kloc): https://github.com/PikachuHyA/async_simple extra tests: https://github.com/PikachuHyA/bazel_cxx20_module_test the new bazel is built by GitHub Action, see https://github.com/PikachuHyA/bazel/actions/runs/6638058320 you can download the prebuilt version and play with your code. Feedback is very welcome. please note, only Clang is supported now. and Clang 17 or higher is required.
This issue is track it on https://arewemodulesyet.org/tools/
Description of the problem / feature request / question:
Starting to look into C++ Modules. While it will earliest officially arrive in 2020, would be good to have support for that soonish. Heard there is some Module support inside of Google. Can/Will that be opensourced?