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

Consider C++20 module support #938

Open
wdhongtw opened this issue Feb 22, 2025 · 0 comments
Open

Consider C++20 module support #938

wdhongtw opened this issue Feb 22, 2025 · 0 comments

Comments

@wdhongtw
Copy link

Should we support the usage of this library as a C++ module? e.g. import OpenCC.

C++ module is a promising way to consume a library during compile time, comparing to header includes.
And there is a trend to support this since last year [1].
It would be good for OpenCC to provide module support.

Here is a working PoC at experiment branch, tested with MSVC and Clang(19.1):
https://github.com/wdhongtw/OpenCC/commits/feat-cxx-module/ .
It works in a ABI-compatible way [2], and just require an additional module file.

I wonder if it's a good timing to begin this discussion?

See also:

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