Skip to content

feature: [172] Implement native image build #173

Draft
crazyrokr wants to merge 5 commits into
developfrom
feature/172-implement-native-build
Draft

feature: [172] Implement native image build #173
crazyrokr wants to merge 5 commits into
developfrom
feature/172-implement-native-build

Conversation

@crazyrokr
Copy link
Copy Markdown
Collaborator

@crazyrokr crazyrokr commented Jun 6, 2026

Issue

#172

Description

This PR introduces support for building the MQTT Broker as a GraalVM native image. This allows for faster startup times and reduced memory footprint, making the broker more suitable for resource-constrained environments or ephemeral deployments (e.g., in Kubernetes).

Changes

  • Infrastructure: Enabled native build support via GraalVM in the project's build configuration.
  • Configuration: Added NativeConfigurationHints to provide necessary metadata for GraalVM reflection, resources, and JNI during the native image build process.
  • Utilities: Implemented ClassPathUriResolver to reliably resolve resources from the classpath, which is critical for native image compatibility where filesystem structures are not directly available.
  • Testing: Added NativeImageVerificationTest to verify the functionality of the native image configuration. Updated/enabled existing tests to ensure compatibility with native build constraints.
  • Dependencies: Updated gradle/libs.versions.toml to support the required plugins for native image building.

@crazyrokr crazyrokr linked an issue Jun 6, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 6, 2026

Test Coverage Report

Overall Project 84.75% -0.88% 🍏
Files changed 40%

File Coverage
GroovyDslBasedAuthorizationService.java 83.22% 🍏
ClassPathUriResolver.java 82.25% -17.75% 🍏
FileCredentialsSource.java 60.34% 🍏
NativeConfigurationHints.java 0%
MqttBrokerApplication.java 0% 🍏

@crazyrokr crazyrokr requested a review from JavaSaBr June 6, 2026 22:06
@crazyrokr crazyrokr marked this pull request as ready for review June 6, 2026 22:06
@crazyrokr crazyrokr marked this pull request as draft June 7, 2026 19:42
@crazyrokr crazyrokr added enhancement New feature or request core labels Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Native Build

1 participant