Skip to content

Extract codegen-common module to improve compile-time compiler DX#1252

Merged
andreaTP merged 1 commit intodylibso:mainfrom
andreaTP:codegen-common
Mar 24, 2026
Merged

Extract codegen-common module to improve compile-time compiler DX#1252
andreaTP merged 1 commit intodylibso:mainfrom
andreaTP:codegen-common

Conversation

@andreaTP
Copy link
Copy Markdown
Collaborator

Setup of the Chicory compiler has a couple of un-necessary nuances that make it a bit too complicated to setup, this improvement tackle the user DX.
This is an example of applying the new experience: https://github.com/roastedroot/lumis4j/pull/30/changes

The maven plugin can now generate _ModuleExports and _ModuleImports
wrapper classes directly via a new `moduleInterface` parameter,
eliminating the need for users to configure:
- annotations dependency
- annotations-processor in maven-compiler-plugin
- maven-antrun-plugin (path normalization)
- templating-maven-plugin + java-templates directory
- @WasmModuleInterface annotation with WasmResource constant

Changes:
- New codegen-common module with shared CodegenUtils and
  ModuleInterfaceCodegen extracted from WasmModuleProcessor
- Refactored annotations-processor to delegate to codegen-common
- Added moduleInterface parameter to Config, Generator, and
  ChicoryCompilerGenMojo
- Added plugin-only-exports integration test verifying the new
  workflow without annotation processor

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@andreaTP andreaTP merged commit 3b1d78a into dylibso:main Mar 24, 2026
44 of 45 checks passed
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.

1 participant