-
Notifications
You must be signed in to change notification settings - Fork 1
WIP: feat: add GraalVM native-image support #13
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
base: main
Are you sure you want to change the base?
Conversation
This commit introduces GraalVM native-image support for ChronDB, enabling the creation of standalone native executables. Key changes include: - Added GraalVM native-image build workflow for Ubuntu and macOS - Created reflection and resource configuration files for GraalVM - Added build scripts for generating native images - Updated project documentation with native-image build instructions - Configured deps.edn for native-image compatibility - Reorganized documentation structure These changes allow ChronDB to be compiled into a native binary, improving startup time and reducing memory footprint while maintaining full functionality. Signed-off-by: Avelino <[email protected]>
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (4)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Signed-off-by: Avelino <[email protected]>
> actions/upload-artifact@v3 is scheduled for deprecation on November 30, 2024. Learn more. Similarly, v1/v2 are scheduled for deprecation on June 30, 2024. Please update your workflow to use v4 of the artifact actions. This deprecation will not impact any existing versions of GitHub Enterprise Server being used by customers. Signed-off-by: Avelino <[email protected]>
Signed-off-by: Avelino <[email protected]>
- Add continue-on-error to wait-for-test step - Add allowed-conclusions (success,skipped) - Add verbose mode for better debugging - Add running-workflow-name to identify the workflow Signed-off-by: Avelino <[email protected]>
- Remove dependency on test completion for native image build - Change test check to be optional and non-blocking - Rename job to better reflect its optional nature Signed-off-by: Avelino <[email protected]>
Signed-off-by: Avelino <[email protected]>
- Add diagnostic script to help troubleshoot native-image build failures - Implement build retry with explicit initialization parameters - Continue pipeline execution even if initial build fails Signed-off-by: Avelino <[email protected]>
…teps for failure handling." Signed-off-by: Avelino <[email protected]>
- Added support for building JAR before native image - Improved error handling during JAR building - Added libz support for macOS and Linux systems - Improved environment variables management - Added support for extra compilation flags Signed-off-by: Avelino <[email protected]>
- Adjust string format in workflow file - Add extra flags for class initialization in GraalVM - Improve build script for libz support across different systems Signed-off-by: Avelino <[email protected]>
- Disabled default class initialization at build time - Explicitly specified classes that should be initialized at runtime - Added tracking for problematic class initialization - Included additional classes that were causing issues: - com.sun.jndi.dns.DnsClient - sun.security.jca.JCAUtil$CachedSecureRandomHolder - org.eclipse.jgit.util.sha1.SHA1 - org.eclipse.jgit.lib.RepositoryCache Signed-off-by: Avelino <[email protected]>
- Removed `com.sun.jndi.dns.DnsClient` from runtime initialization list - Added critical classes for runtime initialization: - sun.security.jca.JCAUtil$CachedSecureRandomHolder - org.eclipse.jgit.util.sha1.SHA1 - org.eclipse.jgit.lib.RepositoryCache Signed-off-by: Avelino <[email protected]>
…untime initialization class list The issue was related to premature class initialization during native image building. The sun.security.jca.JCAUtil$CachedSecureRandomHolder class was removed from the list of classes that should be initialized at runtime, as it was unnecessary and causing build issues. Signed-off-by: Avelino <[email protected]>
- Adopt clj-easy/graalvm-clojure recommended practices - Remove unnecessary class initialization flags - Streamline build configuration for better maintainability - Focus on essential initialization controls for Clojure and problematic classes Signed-off-by: Avelino <[email protected]>
- Added support for clj-easy/graal-build-time to manage class initialization - Simplified build process by removing manual initialization flags - Added GraalVM-specific configurations for Lucene - Updated build script for better support across different operating systems - Added automatic detection and configuration of native libraries (libz) - Improved error handling and logging during build process Signed-off-by: Avelino <[email protected]>
This commit adds support for building ChronDB as a native binary using GraalVM native-image. The changes include: - Added necessary GraalVM configuration for native-image compilation - Configured class initialization settings for Jetty, Lucene, and SLF4J - Added trace class initialization for critical components - Disabled security manager and unsupported codec checks for Lucene - Implemented fallback index when Lucene initialization fails - Updated build configuration to support native-image compilation These changes enable ChronDB to be compiled into a standalone native binary, improving startup time and reducing memory footprint while maintaining full functionality. Signed-off-by: Avelino <[email protected]>
…rors Signed-off-by: Avelino <[email protected]>
Signed-off-by: Avelino <[email protected]>
Signed-off-by: Avelino <[email protected]>
…uild This change ensures that the ConcurrentMergeScheduler class from Apache Lucene is initialized at runtime rather than build time, which is necessary for proper functionality in the native image. This fixes potential initialization issues that could occur during the native image build process. Signed-off-by: Avelino <[email protected]>
Signed-off-by: Avelino <[email protected]>
Adds support for native libraries (libz, libpthread, libdl) required for the native image build process. Includes: - Automatic dependency installation on Linux via apt-get - Automatic dependency installation on macOS via brew - Verification of libraries presence after installation - Build script adjustments for better path handling - Improvements in build environment detection and configuration These changes resolve linking issues encountered during native image building across different operating systems. Signed-off-by: Avelino <[email protected]>
Signed-off-by: Avelino <[email protected]>
This change adds: - Simplified mode for native image generation (for CI and restricted environments) - Solution for the ScopedMemoryAccess problem via JNI and substitutions - Automatic CI environment detection to use appropriate configurations - Improved reflection configuration for Lucene classes - Support for JNI compilation across different platforms Signed-off-by: Avelino <[email protected]>
This commit introduces GraalVM native-image support for ChronDB, enabling the creation of standalone native executables. Key changes include:
These changes allow ChronDB to be compiled into a native binary, improving startup time and reducing memory footprint while maintaining full functionality.
fixed: #12