Java bindings: evaluate replacing hand-written JNI with the Foreign Function & Memory API
メンテナーはふだん 1 日以内に返信
@hlinsen がすでに取り組んでいます。
2026年8月25日 から。
評価
この issue はまだ評価されていません。
説明
The Java bindings added in #1524 are hand-written JNI. Java 22 and later ship the Foreign Function & Memory API (JEP 454), which calls the C API directly and would remove cuopt_jni.cpp and its build entirely.
Why it was not done now: the bindings target Java 17, which is still a common default. An earlier revision of #1524 did use FFM and required Java 22 or higher.
Trade-off to settle:
- Hand-written JNI keeps the Java 17 floor, but every
static nativedeclaration and its entry point must be kept in sync by hand. #1524 addsscripts/check_jni_symbols.shto catch drift, since JNI resolves lazily and a mismatch otherwise surfaces only when something calls the method. - FFM removes the native shim and the drift class of bug, at the cost of requiring Java 22+.
cuVS uses FFM (via jextract) for its Java interface, so there is in-house precedent for the tooling.
Raised by @mlubin in review: https://github.com/NVIDIA/cuopt/pull/1524#discussion_r3839538078
Part of #1535.
- 主要言語
- Cuda
- スター
- 1.1k
- フォーク
- 255
- 平均マージ
- 1日 22時間
- マージ済み PR(30日)
- 102
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/cuopt のほかの issue
-
[BUG] Constraint validation reports CSR offset count as the number of rows対応中かも @0z5a が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
ci: pr-test-summary job shows red when the GitHub API returns persistent 5xx errors対応中かも @0z5a が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug mip
難易度 4/5 1〜2日 初心者へのやさしさ 53/100
NVIDIA/cuopt#2290 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] Dataset downloader reports success and replaces data after a failed download対応中かも @0z5a が 3 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信