Skip to content

Remove ndk-context dependency#220

Merged
Ralith merged 1 commit into
Ralith:masterfrom
Timbals:remove-ndk-context
Jun 25, 2026
Merged

Remove ndk-context dependency#220
Ralith merged 1 commit into
Ralith:masterfrom
Timbals:remove-ndk-context

Conversation

@Timbals

@Timbals Timbals commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

#218 started taking in some Android specific information using a PlatformInfo for instance creation, and #219 expanded that to also use the PlatformInfo for initializing the loader on Android. ndk-context is still used to get the JavaVM pointer.
That means we currently have the downsides of both

  • ndk-context global has to be initialized
  • explicit platform specific arguments have to be passed

This PR removes the ndk-context dependency and passes all data explicitly using the PlatformInfo, including the JavaVM pointer.

I also removed the Sized bound for PlatformInfo so that user code can use dyn PlatformInfo. That's not relevant for the examples in this repo, but for my usage this avoids cfg-gating in multiple places.

Instead of mixing data from `ndk-context` and `PlatformInfo`, all Android specific data is passed using `AndroidPlatformInfo` now.

Removed the `Sized` bound for `PlatformInfo` so that user code can use `dyn PlatformInfo`, to avoid cfg-gating in multiple places.

@Ralith Ralith left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Ralith Ralith merged commit 294809e into Ralith:master Jun 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants