Update to jni 0.22 and jni-sys 0.4 - #202
Merged
Merged
Conversation
MarijnS95
force-pushed
the
release-0.6
branch
2 times, most recently
from
November 15, 2025 14:07
bdbfc4c to
8ab73d0
Compare
MarijnS95
force-pushed
the
release-0.6
branch
from
December 19, 2025 19:54
8ab73d0 to
8f9b490
Compare
rib
force-pushed
the
rib/pr/jni-0.22
branch
2 times, most recently
from
January 9, 2026 16:03
3525414 to
a7a4f64
Compare
rib
force-pushed
the
rib/pr/jni-0.22
branch
5 times, most recently
from
January 11, 2026 21:07
14d41bd to
aaf0e8b
Compare
rib
marked this pull request as ready for review
February 18, 2026 01:19
simlay
reviewed
Feb 18, 2026
This adds a common init_android_main_thread() utility that's called by both backends in order to get the ClassLoader from the Activity and associate that with the thread via `JThreadthread::set_context_class_loader` (which jni 0.22 can use automatically when loading classes). This change notably starts to use the `jni::bind_java_type!` macro for the `KeyCharacterMap` and `InputDevice` Java SDK API bindings in `src/input/sdk.rs` which is a nice simplification.
This was referenced Feb 24, 2026
This was referenced Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a common
init_android_main_thread()utility that's called by both backends in order to get theClassLoaderfrom theActivityand associate that with the thread viaJThread::set_context_class_loader(which jni 0.22 can use automatically when loading classes).This change notably starts to use the
jni::bind_java_type!macro for theKeyCharacterMapandInputDeviceJava SDK API bindings insrc/input/sdk.rswhich is a nice simplification.