Skip to content

Modules#2408

Draft
DockedFerret800 wants to merge 55 commits intostephenberry:mainfrom
DockedFerret800:modules
Draft

Modules#2408
DockedFerret800 wants to merge 55 commits intostephenberry:mainfrom
DockedFerret800:modules

Conversation

@DockedFerret800
Copy link
Copy Markdown
Contributor

@DockedFerret800 DockedFerret800 commented Mar 29, 2026

This pull request converts the library to a native modules version.

This is the first, very early version. There is still some work to do, particularly to fix build errors and achieve 100% coverage. I will continue with this tomorrows.

Furthermore, because I started this about a month ago, some files are in older state than they are in the main branch now. There were also changes that had to be made as a result of the modules conversion, for example std types are now used instead of C-types. I will try to list all of the changes once the work is finished.

Currently, it is not possible to compile the project with any compiler, as there are still bugs that I will be working on resolving over the next few days. However, it is possible to compile some targets. I think the JSON tests are stable.

There are a few compiler errors that I found in MSVC during the conversion that make most targets uncompilable, altough some do compile, e.g. json_test. I also found MSVC to have the best support for import std. I used Clang-22 on Ubuntu WSL as my second compiler. It's also currently not possible to compile the full project because of certain bugs; however, some targets compile, including json_test. I think it's a bit more difficult with import std on Clang than it is with MSVC, I'll have a more detailed look soon.

There is still a lot to do, at least to get it compiling. I'm opening this draft pr so that you can see progress.

What is left to do:

  • Fix compilation bugs.
  • Achieve full coverage.
  • Decide how to handle includes. More research required.
  • Ensure CI workflows are working.
  • Update documentation.

#1586

@packit-as-a-service
Copy link
Copy Markdown

- C7760: export declaration is not allowed on an explicit specialization, an explicit instantiation, a partial specialization or an export
- Resolve errors in relfect.ixx
@packit-as-a-service
Copy link
Copy Markdown

@packit-as-a-service
Copy link
Copy Markdown

@packit-as-a-service
Copy link
Copy Markdown

@packit-as-a-service
Copy link
Copy Markdown

@packit-as-a-service
Copy link
Copy Markdown

@packit-as-a-service
Copy link
Copy Markdown

@packit-as-a-service
Copy link
Copy Markdown

@packit-as-a-service
Copy link
Copy Markdown

@packit-as-a-service
Copy link
Copy Markdown

@packit-as-a-service
Copy link
Copy Markdown

@packit-as-a-service
Copy link
Copy Markdown

@DockedFerret800
Copy link
Copy Markdown
Contributor Author

DockedFerret800 commented Apr 22, 2026

Full build was achieved with Clang-22 on Ubuntu WSL. MSVC is currently blocked due to compiler errors. The good thing is that the Insider channel has switched to weekly releases, so fixes should drop soon. There is still work left to do, but this is a good milestone.

@packit-as-a-service
Copy link
Copy Markdown

@packit-as-a-service
Copy link
Copy Markdown

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

Successfully merging this pull request may close these issues.

3 participants