Skip to content

Need better on-load / on-unload in Rust #1715

@sgammon

Description

@sgammon

Currently, building static libs is unreliable, because multiple modules may define a JNI_OnLoad or JNI_OnUnload symbol; these symbols crash in static contexts.

We use macros and conditions when building our native code to work around this slightly, but it's messy; instead of using these symbols, specifically, we should have our own on-load and on-unload logic which is safely composable, and which can then be dispatched from the umbrella layer's JNI_OnLoad and/or JNI_OnUnload.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions