Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature/halp module#117

Open
jcelerier wants to merge 4 commits into
main from
feature/halp-module
Open

Feature/halp module #117
jcelerier wants to merge 4 commits into
main from
feature/halp-module

Conversation

@jcelerier

@jcelerier jcelerier commented Jun 22, 2026

Copy link
Copy Markdown
Member

No description provided.

jcelerier and others added 4 commits June 22, 2026 21:59
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /