rust-mobile / android-activity

Glue for building Rust applications on Android with NativeActivity or GameActivity
238 stars 46 forks source link

build(deps): update jni-sys requirement from 0.3 to 0.4 #126

Open dependabot[bot] opened 11 months ago

dependabot[bot] commented 11 months ago

Updates the requirements on jni-sys to permit the latest version.

Release notes

Sourced from jni-sys's releases.

v0.4.0

It's alive! 😃

It's been about 6 years since the last release and although that's generally been OK, since the JNI API doesn't change that frequently, there have been a number of paper cuts adding up that this release hopefully helps to address.

Thanks to @​sfackler for transferring the repo to the https://github.com/jni-rs Github organisation where we can hopefully keep the flame alive.

The most notable changes are that jboolean is now an alias for bool and that JNINativeInterface_ is now a union that namespaces the functions based on the JNI version when each function was added to the spec. Please see below for more details.

Added

  • Added JNI_VERSION_9, JNI_VERSION_10, JNI_VERSION_19, JNI_VERSION_20 and JNI_VERSION_21 constants
  • Added GetModule() to JNINativeInterface (#22)
  • IsVirtualThread() to JNINativeInterface (#32)
  • Implemented Debug trait for all types (#31)
  • Added support for no_std environments (#12)

Changed

  • jboolean is now an alias for bool instead of u8 (#23)

  • The JNIInvokeInterface_ and JNINativeInterface_ structs were turned into unions that namespace functions by version (#28):

    This makes it much clearer what version of JNI you require to access any function safely.

    So instead of a struct like:

    struct JNINativeInterface_ {
        pub reserved0: *mut c_void,
        ..
        pub GetVersion: unsafe extern "system" fn(env: *mut JNIEnv) -> jint,
        ..
        pub NewLocalRef: unsafe extern "system" fn(env: *mut JNIEnv, ref_: jobject) -> jobject,
    }
    

    there is now a union like:

    union JNINativeInterface_ {
        v1_1: JNINativeInterface__1_1,
        v1_2: JNINativeInterface__1_2,
        reserved: JNINativeInterface__reserved,
    }
    

    And you can access GetVersion like: env.v1_1.GetVersion and access NewLocalRef like: env.v1_2.NewLocalRef.

    Each version struct includes all functions for that version and lower, so it's also possible to access GetVersion like env.v1_2.GetVersion.

... (truncated)

Changelog

Sourced from jni-sys's changelog.

[0.4.0] - 2023-09-25

Added

  • Added JNI_VERSION_9, JNI_VERSION_10, JNI_VERSION_19, JNI_VERSION_20 and JNI_VERSION_21 constants
  • Added GetModule() to JNINativeInterface (#22)
  • IsVirtualThread() to JNINativeInterface (#32)
  • Implemented Debug trait for all types (#31)
  • Added support for no_std environments (#12)

Changed

  • jboolean is now an alias for bool instead of u8 (#23)

  • The JNIInvokeInterface_ and JNINativeInterface_ structs were turned into unions that namespace functions by version (#28):

    This makes it much clearer what version of JNI you require to access any function safely.

    So instead of a struct like:

    struct JNINativeInterface_ {
        pub reserved0: *mut c_void,
        ..
        pub GetVersion: unsafe extern "system" fn(env: *mut JNIEnv) -> jint,
        ..
        pub NewLocalRef: unsafe extern "system" fn(env: *mut JNIEnv, ref_: jobject) -> jobject,
    }
    

    there is now a union like:

    union JNINativeInterface_ {
        v1_1: JNINativeInterface__1_1,
        v1_2: JNINativeInterface__1_2,
        reserved: JNINativeInterface__reserved,
    }
    

    And you can access GetVersion like: env.v1_1.GetVersion and access NewLocalRef like: env.v1_2.NewLocalRef.

    Each version struct includes all functions for that version and lower, so it's also possible to access GetVersion like env.v1_2.GetVersion.

  • Function pointers are no longer wrapped in an Option<> (#25)

[0.3.0] - 2017-07-20

Changed

  • Changed jvalue into a union

... (truncated)

Commits
  • f1e890f Release 0.4.0
  • 6d57bdd jni-sys: package metadata updates
  • f94615b Add package exclusions
  • 296bc33 Update CHANGELOG
  • 1449565 jni-sys-macros: package metadata updates
  • 6ecb779 Add README for jni-sys-macros crate
  • 9500c5d Add IsVirtualThread to JNINativeInterface_
  • aa914ab Avoid checking more recent version constants in systest
  • 8379800 feat: append 20 and 21 consts to lib.rs
  • 3fcf285 Add version constants for Java 19
  • Additional commits viewable in compare view


You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

MarijnS95 commented 11 months ago

Blocked on https://github.com/jni-rs/jni-rs/pull/478, just like the documentation in https://github.com/rust-mobile/ndk/pull/433.