- Status: Accepted
- Date: 2026-06-27
- Deciders: project maintainer
The library targets JDK 25 and should be usable both on the classpath and as a named module on the module path. FFM downcalls are a restricted operation that JPMS gates per-module.
Ship a module-info.java declaring module io.github.dfa1.zstd, exporting only
the single public API package. The native library is loaded from the separate
zstd-native-<classifier> artifact at runtime (ADR 0004). Callers grant
--enable-native-access=io.github.dfa1.zstd on the module path, or
ALL-UNNAMED on the classpath.
The module name's dfa1 component ends in a digit, which the module-name lint
flags as version-like; it mirrors the Sonatype-verified io.github.dfa1
namespace and the package name, so the advisory is suppressed rather than
diverging from the established coordinates.
- First-class module-path support with a minimal, single-package export surface.
- Native-access requirement is explicit and scoped to this module.
- Consumers on the module path must pass the native-access flag.
- The dash-containing classifier resource directory is intentionally not a valid package, so the native resource is loadable across modules (ADR 0004).
- No
module-info(automatic module): unstable derived name, no explicit export control. - Rename to drop the trailing digit: would diverge from the published Maven coordinates and package name.