Update Rust crate ndk to 0.9 #228

Merged
SakulFlee merged 1 commit from renovate/ndk-0.x into main 2026-01-09 18:18:38 +01:00
Owner

This PR contains the following updates:

Package Type Update Change
ndk dependencies minor 0.7 -> 0.9

Release Notes

rust-mobile/ndk (ndk)

v0.9.0: ndk v0.9.0

Compare Source

  • Move MediaFormat from media::media_codec to its own media::media_format module. (#​442)
  • media_format: Expose MediaFormat::copy() and MediaFormat::clear() from API level 29. (#​449)
  • Breaking: media_format: Mark all fn set_*() and fn str() as taking self by &mut. (#​452)
  • Breaking: Require all dyn Fn* types to implement Send when the FFI implementation invokes them on a separate thread: (#​455)
    • audio::AudioStreamDataCallback;
    • audio::AudioStreamErrorCallback;
    • media::image_reader::BufferRemovedListener;
    • media::image_reader::ImageListener;
    • media::media_codec::ErrorCallback;
    • media::media_codec::FormatChangedCallback;
    • media::media_codec::InputAvailableCallback;
    • media::media_codec::OutputAvailableCallback.
  • Drop previous Boxed callbacks after registering new ones, instead of before. (#​455)
  • input_queue: Add from_java() constructor, available since API level 33. (#​456)
  • event: Add from_java() constructors to KeyEvent and MotionEvent, available since API level 31. (#​456)
  • Breaking: image_reader: Special-case return statuses in Image-acquire functions. (#​457)
  • Breaking: image_reader: Mark ImageReader::acquire_latest_image_async() unsafe to match the safety requirements on ImageReader::acquire_next_image_async(). (#​457)
  • event: Implement SourceClass bitflag and provide Source::class() getter. (#​458)
  • Ensure all bitflags implementations consider all (including unknown) bits in negation and all(). (#​458)
  • Breaking: Mark all enums as non_exhaustive and fix repr types. (#​459)
  • Breaking: native_window: Remove redundant TRANSFORM_ prefix from NativeWindowTransform variants. (#​460)
  • Breaking: hardware_buffer: Convert HardwareBufferUsage to bitflags. (#​461)
  • bitmap: Guard BitmapCompressError behind missing api-level-30 feature. (#​462)
  • native_window: Require linking against libnativewindow for most API >= 26 functions. (#​465)
  • Breaking: audio: Merge AudioResult variant enum into AudioError. (#​467)
  • data_space: Add missing DataSpaceRange::Unspecified variant. (#​468)
  • Breaking: looper: Require Send marker when adding fd event callbacks on ForeignLooper. (#​469)
  • Breaking: Upgrade to ndk-sys 0.6.0. (#​472)

v0.8.0: ndk v0.8.0

Compare Source

  • event: Add tool_type getter for Pointer. (#​323)
  • input_queue: Allow any non-zero return code from pre_dispatch() again, as per documentation. (#​325)
  • asset: Use entire asset length when mapping buffer. (#​387)
  • Bump MSRV to 1.66 for raw-window-handle 0.5.1, num_enum's catch_all with arbitrary enum discriminants. (#​388, #​431)
  • Bump optional jni dependency for doctest example from 0.19 to 0.21. (#​390)
  • Breaking: Upgrade to ndk-sys 0.5.0. (#​370)
  • Breaking: Upgrade bitflags crate from 1 to 2. (#​394)
  • bitmap: Add try_format() to AndroidBitmapInfo to handle unexpected formats without panicking. (#​395)
  • Add Font bindings. (#​397)
  • Breaking: Upgrade num_enum crate from 0.5.1 to 0.7. (#​398, #​419)
  • Breaking: Renamed, moved and flattened "media" error types and helpers to a new media_error module. (#​399, #​432)
  • Breaking: media_codec: Wrap common dequeued-buffer status codes in enum. (#​401)
  • Breaking: media_codec: Return MaybeUninit bytes in buffer_mut(). (#​403)
  • native_window: Add lock() to blit raw pixel data. (#​404)
  • hardware_buffer_format: Add YCbCr_P010 and R8_UNORM variants. (#​405)
  • Breaking: hardware_buffer_format: Add catch-all variant. (#​407)
  • asset: Add missing is_allocated() and open_file_descriptor() methods. (#​409)
  • Breaking: media_codec: Add support for asynchronous notification callbacks. (#​410)
  • Add panic guards to callbacks. (#​412)
  • looper: Add remove_fd() to unregister events/callbacks for a file descriptor. (#​416)
  • Breaking: Use BorrowedFd and OwnedFd to clarify possible ownership transitions. (#​417)
  • Breaking: Upgrade to ndk-sys 0.5.0. (#​420)
  • Add bindings for sync.h. (#​423)
  • Breaking: bitmap: Provide detailed implementation for AndroidBitmapInfoFlags. (#​424)
  • native_window: Add set_buffers_transform(), try_allocate_buffers() and set_frame_rate*(). (#​425)
  • Add bindings for ASharedMemory. (#​427)
  • hardware_buffer: Add id() to retrieve a system-wide unique identifier for a HardwareBuffer. (#​428)
  • Breaking: bitmap: Strip Android prefix from structs and enums, and Bitmap from Result. (#​430)
  • Breaking: raw-window-handle 0.5 support is now behind an optional rwh_05 crate feature and raw-window-handle 0.4 and 0.6 support is provided via the new rwh_04 and (default-enabled) rwh_06 crate features. (#​434)
  • Breaking: looper: Provide event value to file descriptor poll callback. (#​435)
  • Breaking: HardwareBufferFormat is no longer exported from hardware_buffer and native_window, and can only be reached through the hardware_buffer_format module. (#​436)
  • Breaking: get_ prefixes have been removed from all public functions in light of the C-GETTER convention. (#​437)
  • Add DataSpace type and relevant functions on Bitmap and NativeWindow. (#​438)
  • bitmap: Add Bitmap::compress() and Bitmap::compress_raw() functions. (#​440)
  • Breaking: Turn BitmapError into a non_exhaustive enum. (#​440)
  • Breaking: audio: Rename AudioErrorResult to AudioResult and turn into a non_exhaustive enum. (#​441)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [ndk](https://github.com/rust-mobile/ndk) | dependencies | minor | `0.7` -> `0.9` | --- ### Release Notes <details> <summary>rust-mobile/ndk (ndk)</summary> ### [`v0.9.0`](https://github.com/rust-mobile/ndk/releases/tag/ndk-0.9.0): ndk v0.9.0 [Compare Source](https://github.com/rust-mobile/ndk/compare/ndk-0.8.0...ndk-0.9.0) - Move `MediaFormat` from `media::media_codec` to its own `media::media_format` module. ([#&#8203;442](https://github.com/rust-mobile/ndk/issues/442)) - media\_format: Expose `MediaFormat::copy()` and `MediaFormat::clear()` from API level 29. ([#&#8203;449](https://github.com/rust-mobile/ndk/issues/449)) - **Breaking:** media\_format: Mark all `fn set_*()` and `fn str()` as taking `self` by `&mut`. ([#&#8203;452](https://github.com/rust-mobile/ndk/issues/452)) - **Breaking:** Require all `dyn Fn*` types to implement `Send` when the FFI implementation invokes them on a separate thread: ([#&#8203;455](https://github.com/rust-mobile/ndk/issues/455)) - `audio::AudioStreamDataCallback`; - `audio::AudioStreamErrorCallback`; - `media::image_reader::BufferRemovedListener`; - `media::image_reader::ImageListener`; - `media::media_codec::ErrorCallback`; - `media::media_codec::FormatChangedCallback`; - `media::media_codec::InputAvailableCallback`; - `media::media_codec::OutputAvailableCallback`. - Drop previous `Box`ed callbacks *after* registering new ones, instead of before. ([#&#8203;455](https://github.com/rust-mobile/ndk/issues/455)) - input\_queue: Add `from_java()` constructor, available since API level 33. ([#&#8203;456](https://github.com/rust-mobile/ndk/issues/456)) - event: Add `from_java()` constructors to `KeyEvent` and `MotionEvent`, available since API level 31. ([#&#8203;456](https://github.com/rust-mobile/ndk/issues/456)) - **Breaking:** image\_reader: Special-case return statuses in `Image`-acquire functions. ([#&#8203;457](https://github.com/rust-mobile/ndk/issues/457)) - **Breaking:** image\_reader: Mark `ImageReader::acquire_latest_image_async()` `unsafe` to match the safety requirements on `ImageReader::acquire_next_image_async()`. ([#&#8203;457](https://github.com/rust-mobile/ndk/issues/457)) - event: Implement `SourceClass` `bitflag` and provide `Source::class()` getter. ([#&#8203;458](https://github.com/rust-mobile/ndk/issues/458)) - Ensure all `bitflags` implementations consider all (including unknown) bits in negation and `all()`. ([#&#8203;458](https://github.com/rust-mobile/ndk/issues/458)) - **Breaking:** Mark all enums as `non_exhaustive` and fix `repr` types. ([#&#8203;459](https://github.com/rust-mobile/ndk/issues/459)) - **Breaking:** native\_window: Remove redundant `TRANSFORM_` prefix from `NativeWindowTransform` variants. ([#&#8203;460](https://github.com/rust-mobile/ndk/issues/460)) - **Breaking:** hardware\_buffer: Convert `HardwareBufferUsage` to `bitflags`. ([#&#8203;461](https://github.com/rust-mobile/ndk/issues/461)) - bitmap: Guard `BitmapCompressError` behind missing `api-level-30` feature. ([#&#8203;462](https://github.com/rust-mobile/ndk/issues/462)) - native\_window: Require linking against `libnativewindow` for most API >= 26 functions. ([#&#8203;465](https://github.com/rust-mobile/ndk/issues/465)) - **Breaking:** audio: Merge `AudioResult` variant enum into `AudioError`. ([#&#8203;467](https://github.com/rust-mobile/ndk/issues/467)) - data\_space: Add missing `DataSpaceRange::Unspecified` variant. ([#&#8203;468](https://github.com/rust-mobile/ndk/issues/468)) - **Breaking:** looper: Require `Send` marker when adding fd event callbacks on `ForeignLooper`. ([#&#8203;469](https://github.com/rust-mobile/ndk/issues/469)) - **Breaking:** Upgrade to [`ndk-sys 0.6.0`](ndk-sys/CHANGELOG.md#060-2024-04-26). ([#&#8203;472](https://github.com/rust-mobile/ndk/issues/472)) ### [`v0.8.0`](https://github.com/rust-mobile/ndk/releases/tag/ndk-0.8.0): ndk v0.8.0 [Compare Source](https://github.com/rust-mobile/ndk/compare/ndk-0.7.0...ndk-0.8.0) - event: Add `tool_type` getter for `Pointer`. ([#&#8203;323](https://github.com/rust-mobile/ndk/issues/323)) - input\_queue: Allow any non-zero return code from `pre_dispatch()` again, as per documentation. ([#&#8203;325](https://github.com/rust-mobile/ndk/issues/325)) - asset: Use entire asset length when mapping buffer. ([#&#8203;387](https://github.com/rust-mobile/ndk/issues/387)) - Bump MSRV to 1.66 for `raw-window-handle 0.5.1`, `num_enum`'s `catch_all` with arbitrary enum discriminants. ([#&#8203;388](https://github.com/rust-mobile/ndk/issues/388), [#&#8203;431](https://github.com/rust-mobile/ndk/issues/431)) - Bump optional `jni` dependency for doctest example from `0.19` to `0.21`. ([#&#8203;390](https://github.com/rust-mobile/ndk/issues/390)) - **Breaking:** Upgrade to [`ndk-sys 0.5.0`](ndk-sys/CHANGELOG.md#050-2023-10-15). ([#&#8203;370](https://github.com/rust-mobile/ndk/issues/370)) - **Breaking:** Upgrade `bitflags` crate from `1` to `2`. ([#&#8203;394](https://github.com/rust-mobile/ndk/issues/394)) - bitmap: Add `try_format()` to `AndroidBitmapInfo` to handle unexpected formats without panicking. ([#&#8203;395](https://github.com/rust-mobile/ndk/issues/395)) - Add `Font` bindings. ([#&#8203;397](https://github.com/rust-mobile/ndk/issues/397)) - **Breaking:** Upgrade `num_enum` crate from `0.5.1` to `0.7`. ([#&#8203;398](https://github.com/rust-mobile/ndk/issues/398), [#&#8203;419](https://github.com/rust-mobile/ndk/issues/419)) - **Breaking:** Renamed, moved and flattened "`media`" error types and helpers to a new `media_error` module. ([#&#8203;399](https://github.com/rust-mobile/ndk/issues/399), [#&#8203;432](https://github.com/rust-mobile/ndk/issues/432)) - **Breaking:** media\_codec: Wrap common dequeued-buffer status codes in enum. ([#&#8203;401](https://github.com/rust-mobile/ndk/issues/401)) - **Breaking:** media\_codec: Return `MaybeUninit` bytes in `buffer_mut()`. ([#&#8203;403](https://github.com/rust-mobile/ndk/issues/403)) - native\_window: Add `lock()` to blit raw pixel data. ([#&#8203;404](https://github.com/rust-mobile/ndk/issues/404)) - hardware\_buffer\_format: Add `YCbCr_P010` and `R8_UNORM` variants. ([#&#8203;405](https://github.com/rust-mobile/ndk/issues/405)) - **Breaking:** hardware\_buffer\_format: Add catch-all variant. ([#&#8203;407](https://github.com/rust-mobile/ndk/issues/407)) - asset: Add missing `is_allocated()` and `open_file_descriptor()` methods. ([#&#8203;409](https://github.com/rust-mobile/ndk/issues/409)) - **Breaking:** media\_codec: Add support for asynchronous notification callbacks. ([#&#8203;410](https://github.com/rust-mobile/ndk/issues/410)) - Add panic guards to callbacks. ([#&#8203;412](https://github.com/rust-mobile/ndk/issues/412)) - looper: Add `remove_fd()` to unregister events/callbacks for a file descriptor. ([#&#8203;416](https://github.com/rust-mobile/ndk/issues/416)) - **Breaking:** Use `BorrowedFd` and `OwnedFd` to clarify possible ownership transitions. ([#&#8203;417](https://github.com/rust-mobile/ndk/issues/417)) - **Breaking:** Upgrade to [`ndk-sys 0.5.0`](../ndk-sys/CHANGELOG.md#050-2023-10-15). ([#&#8203;420](https://github.com/rust-mobile/ndk/issues/420)) - Add bindings for `sync.h`. ([#&#8203;423](https://github.com/rust-mobile/ndk/issues/423)) - **Breaking:** bitmap: Provide detailed implementation for `AndroidBitmapInfoFlags`. ([#&#8203;424](https://github.com/rust-mobile/ndk/issues/424)) - native\_window: Add `set_buffers_transform()`, `try_allocate_buffers()` and `set_frame_rate*()`. ([#&#8203;425](https://github.com/rust-mobile/ndk/issues/425)) - Add bindings for `ASharedMemory`. ([#&#8203;427](https://github.com/rust-mobile/ndk/issues/427)) - hardware\_buffer: Add `id()` to retrieve a system-wide unique identifier for a `HardwareBuffer`. ([#&#8203;428](https://github.com/rust-mobile/ndk/issues/428)) - **Breaking:** bitmap: Strip `Android` prefix from structs and enums, and `Bitmap` from `Result`. ([#&#8203;430](https://github.com/rust-mobile/ndk/issues/430)) - **Breaking:** `raw-window-handle 0.5` support is now behind an *optional* `rwh_05` crate feature and `raw-window-handle` `0.4` and `0.6` support is provided via the new `rwh_04` and (default-enabled) `rwh_06` crate features. ([#&#8203;434](https://github.com/rust-mobile/ndk/issues/434)) - **Breaking:** looper: Provide `event` value to file descriptor poll callback. ([#&#8203;435](https://github.com/rust-mobile/ndk/issues/435)) - **Breaking:** `HardwareBufferFormat` is no longer exported from `hardware_buffer` and `native_window`, and can only be reached through the `hardware_buffer_format` module. ([#&#8203;436](https://github.com/rust-mobile/ndk/issues/436)) - **Breaking:** `get_` prefixes have been removed from all public functions in light of the [C-GETTER](https://rust-lang.github.io/api-guidelines/naming.html#getter-names-follow-rust-convention-c-getter) convention. ([#&#8203;437](https://github.com/rust-mobile/ndk/issues/437)) - Add `DataSpace` type and relevant functions on `Bitmap` and `NativeWindow`. ([#&#8203;438](https://github.com/rust-mobile/ndk/issues/438)) - bitmap: Add `Bitmap::compress()` and `Bitmap::compress_raw()` functions. ([#&#8203;440](https://github.com/rust-mobile/ndk/issues/440)) - **Breaking:** Turn `BitmapError` into a `non_exhaustive` `enum`. ([#&#8203;440](https://github.com/rust-mobile/ndk/issues/440)) - **Breaking:** audio: Rename `AudioErrorResult` to `AudioResult` and turn into a `non_exhaustive` `enum`. ([#&#8203;441](https://github.com/rust-mobile/ndk/issues/441)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4yNy4wIiwidXBkYXRlZEluVmVyIjoiNDIuMjcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Update Rust crate ndk to 0.9
Some checks failed
Coverage / coverage (pull_request) Has been cancelled
Multiplatform Build / shared (macos-latest) (pull_request) Has been cancelled
Multiplatform Build / shared (ubuntu-latest) (pull_request) Has been cancelled
Multiplatform Build / shared (windows-latest) (pull_request) Has been cancelled
Multiplatform Build / clippy (pull_request) Has been cancelled
Multiplatform Build / platform_linux (ubuntu-latest, x86_64-unknown-linux-gnu) (pull_request) Has been cancelled
Multiplatform Build / platform_macos (macos-latest, aarch64-apple-darwin) (pull_request) Has been cancelled
Multiplatform Build / platform_macos (macos-latest, x86_64-apple-darwin) (pull_request) Has been cancelled
Multiplatform Build / platform_windows (windows-latest, x86_64-pc-windows-msvc) (pull_request) Has been cancelled
Multiplatform Build / platform_webassembly (ubuntu-latest) (pull_request) Has been cancelled
Multiplatform Build / platform_android (ubuntu-latest) (pull_request) Has been cancelled
Multiplatform Build / platform_ios (macos-latest) (pull_request) Has been cancelled
1bd64b49bd
Renovate changed title from Update Rust crate ndk to 0.9 to fix(deps): update rust crate ndk to 0.9 2025-12-31 01:01:01 +01:00
Renovate changed title from fix(deps): update rust crate ndk to 0.9 to Update Rust crate ndk to 0.9 2025-12-31 19:01:01 +01:00
Sign in to join this conversation.
No description provided.