-
-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Conversation
include/halp/halp.cppm exports the halp convenience layer (import halp;) pulling in only halp's own deps -- no binding/score/ossia/Qt -- so it builds standalone. Built into avnd_halp_module (gated on CMAKE_CXX_SCAN_FOR_MODULES), reused by every backend. Validated: builds with gcc-16 via avendish's own CMake (FILE_SET CXX_MODULES).
A user object written as a .cppm module (export module <c_name>; import halp;) now builds through the same per-backend prototype as a header object: the prototype's single "pull in the user code" line becomes @AVND_MAIN_IMPORT@, configured to either #include the header or import the module -- no duplicated module_prototype files. Helpers (avendish.modules.cmake): avnd_main_import (the prototype line), and avnd_add_object_to_base / avnd_add_object_to_backend, which compile a .cppm once in the object's base library (exported BMI) and have backend targets link it to import, or compile a header as before. Module-ness is auto-detected from the extension; the module name is the object's C_NAME by convention. Wired through avnd_register (base) + the dump backend. Validated with gcc-16: the non-module dump path is unchanged and a .cppm object builds, links, and runs.
Each backend prototype now uses the shared @AVND_MAIN_IMPORT@ line (computed once in _avnd_dispatch_backend, or explicitly for dump/ossia/example_host) and consumes the user object via avnd_add_object_to_backend (link the base library that compiled the .cppm, or source the header as before). No duplicated per-backend module prototypes. Full configure is clean across all backends; the non-module path is unchanged and a .cppm object builds + runs through the dump backend (gcc-16). Known limitation (next): GCC requires a module BMI's exception/rtti dialect to match its consumers, but avendish backends differ (dump uses exceptions, plugin backends use DisableExceptions / -fno-exceptions -fno-rtti), so one shared module can't yet serve both -- a dialect decision is needed.
GCC requires a module BMI's exception/rtti dialect to match every consumer exactly, so a single shared halp BMI cannot serve both the exception backends (dump/python/ossia) and the -fno-exceptions -fno-rtti plugin backends. Compile the slim halp module and the user object into each backend target instead, in that backend's own dialect; both are one small object, so the duplication is cheap and every backend stays self-contained. This replaces the shared avnd_halp_module STATIC library and its base-library compilation. Also move `import` after the avnd binding includes in the 9 prototypes that had it first. A module-linkage processor type whose `import` precedes the avnd introspection headers makes value-init concepts (inputs_is_value, ...) diverge, leaving effect_container<T> incomplete and the example process() constraints unsatisfied; including avnd first -- the order dump/vst3/fuzz/standalone already used -- fixes it for both the header and module paths with one shared prototype. Requires a generator with module support (Ninja; the Makefiles generator drops -fmodules) and -DCMAKE_CXX_SCAN_FOR_MODULES=ON. Validated with gcc-16 on the same object across dialects: dump (exceptions) and example (no-exceptions) build and run, vintage (no-exceptions/no-rtti) builds its plugin .so. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jcelerier
jcelerier
force-pushed
the
feature/halp-module
branch
from
June 22, 2026 20:59
f0c20f4 to
df69016
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.