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

enable efficient multi translation unit compilation #421

Open
lukevalenty opened this issue Nov 12, 2023 · 0 comments
Open

enable efficient multi translation unit compilation #421

lukevalenty opened this issue Nov 12, 2023 · 0 comments
Assignees
Labels
breaking API breaking change enhancement New feature or request

Comments

@lukevalenty
Copy link
Contributor

CIB is currently designed for single translation-unit compilation. This can result in very long compilation and re-compilation times. It would be very helpful to enable the option for multi translation unit compilation.

This can be done by decoupling service extension declarations from definitions. The resulting API will look something like this:

  1. CIB component declarations go into header files.
    • Component declarations represent how a component interfaces with the rest of the system. It exports services it provides and extends services as needed.
    • Instead of providing callables or the equivalent to extensions, a string tag-type is used to name each extension. Tag dispatch is used for extensions to call their implementation (which can be located in a different translation unit). LTO is recommended, but not required.
  2. CIB extension implementations can be in independent translation units.
  3. All component header files are included in a project's nexus translation unit. All of the compile-time initialization and build happens in this one translation unit. These header files do not need to be included by any other translation unit.
@lukevalenty lukevalenty added enhancement New feature or request breaking API breaking change labels Nov 12, 2023
@lukevalenty lukevalenty self-assigned this Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking API breaking change enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant