News

Quarkus 3.35 Adds JAR Tree-Shaking, Native-Build Optimization, and Semeru AOT Support

Key Takeaways

  • Quarkus 3.35 focuses on smaller, faster Java applications. Experimental JAR tree-shaking can remove unused classes from runtime dependencies, while native-build profile-guided optimization is intended to improve performance.
  • The release expands ahead-of-time options. New IBM Semeru AOT support builds on Quarkus’ Project Leyden-related work and showed startup-time reductions in early testing, though container image support is not yet automatic.
  • Several features remain early or limited. JAR tree-shaking is experimental, PGO requires Oracle GraalVM, Semeru AOT support is limited to JAR builds, and Jackson reflection-free serializers were postponed to Quarkus 3.36.

The Quarkus project has released Quarkus 3.35, adding features intended to reduce Java application size, improve native-build performance, and expand ahead-of-time compilation options for cloud-native Java workloads.

The release includes experimental JAR tree-shaking, which performs build-time dependency analysis to identify and remove unused classes from runtime dependencies. The Quarkus team said the feature is enabled through the quarkus.package.jar.tree-shake.mode option and can be set to classes. It supports fast-jar, uber-jar, legacy-jar, and aot-jar packaging types.

According to the project, tree-shaking on the Quarkus CLI removed more than 6,000 unreachable classes and reduced the JAR by about 18 MB, or 39.5%. The team described the feature as experimental and is seeking user feedback.

Quarkus 3.35 also adds profile-guided optimization, or PGO, support for native builds. Developers can enable it by setting quarkus.native.pgo.enabled=true. When enabled, Quarkus uses integration tests as the profiling workload and feeds the resulting data into native compilation to improve runtime performance. The Quarkus team noted that PGO is an Oracle GraalVM feature and is not available in GraalVM Community Edition.

The release also adds support for IBM Semeru AOT, building on Project Leyden-related AOT integration introduced in Quarkus 3.32. In initial testing using the rest-json quickstart with IBM Semeru Runtime Open Edition 25, the team said startup time was reduced from roughly 380 milliseconds to about 190 milliseconds. The feature is currently limited to building JARs with Semeru AOT, and automatic container image building is not yet supported.

Another change is support for the @Transactional annotation with Hibernate Reactive, through a new quarkus-reactive-transactions extension. Quarkus said developers can now use @Transactional on methods that return Uni, with transaction begin, commit, and rollback handled within the reactive pipeline. The release currently supports only TxType.REQUIRED, and developers cannot mix @Transactional with @WithTransaction or @WithSessionOnDemand.

The update also adds CORS support for the management interface, allowing developers to configure CORS policies separately from the main HTTP interface. In testing, Quarkus no longer uses system properties to propagate configuration from Dev Services, Test Resources, and Test Profiles, a change the project said could support better parallel test execution in the future.

Quarkus has also changed how it distributes snapshots. The project said snapshots are no longer published to Sonatype because of reliability issues with the volume of artifacts involved. Instead, snapshots are now published daily as GitHub Releases in the quarkusio/quarkus-ecosystem-ci repository, using version 999-SNAPSHOT, with a dedicated GitHub Action available for CI setups.

The release includes platform component updates, including Camel Quarkus 3.35.0, Quarkus CXF 3.35.1, Quarkus Amazon Services 3.18.0, Quarkus MCP Server 1.12.0, and Quarkus Flow 0.9.0.

The Quarkus team said it had planned to make Jackson reflection-free serializers the default for Quarkus REST in 3.35, but postponed the change to 3.36 after community testing identified edge cases that still need to be addressed. Developers can still enable the feature manually for testing.

For application development teams, the release is most relevant to organizations trying to reduce Java artifact size, improve startup performance, and tune native builds for production workloads. The new capabilities also serve as a reminder that much of the Java platform’s cloud-native work now involves build-time analysis, ahead-of-time compilation, and tighter integration with container and native-image workflows.

Developers can update by installing the latest Quarkus CLI and running quarkus update. The project said the command can update applications from any version of Quarkus, including 2.x, to Quarkus 3.35.

About the Author

John K. Waters is the editor in chief of a number of Converge360.com sites, with a focus on high-end development, AI and future tech. He's been writing about cutting-edge technologies and culture of Silicon Valley for more than two decades, and he's written more than a dozen books. He also co-scripted the documentary film Silicon Valley: A 100 Year Renaissance, which aired on PBS.  He can be reached at [email protected].