ndk-glue suffers one fatal flaw: it's "only" supposed to be used by the crate providing fn main() and only supposed to end up in the dependency graph once as it has static globals which get duplicated across versions.
Introducing ndk-context: a crate that holds these statics, with the intention/premise to not see a breaking release /ever/ and make this a problem of the past. The crate is currently initialized with the VM and Android Context on ndk-glue 0.5.1 and 0.6.1 making it compatible with whatever is current, and the possibility for backporting to older ndk-glue versions too.
ndk-glue
suffers one fatal flaw: it's "only" supposed to be used by the crate providingfn main()
and only supposed to end up in the dependency graph once as it hasstatic
globals which get duplicated across versions.In the current case with
winit 0.26
still onndk-glue 0.5
butapp_dirs2
booted from0.4
to0.6
it'll always panic infn native_activity()
as thestatic
globals on these versions are not initialized: https://github.com/app-dirs-rs/app_dirs2/pull/18#issuecomment-1029026065Introducing
ndk-context
: a crate that holds thesestatic
s, with the intention/premise to not see a breaking release /ever/ and make this a problem of the past. The crate is currently initialized with the VM and Android Context onndk-glue
0.5.1 and 0.6.1 making it compatible with whatever is current, and the possibility for backporting to olderndk-glue
versions too.See also: https://github.com/rust-windowing/android-ndk-rs/issues/211 https://github.com/rust-windowing/android-ndk-rs/pull/223