Skip to content

Use released openxr 0.21 / openxr-sys 0.13 - #411

Merged
Supreeeme merged 1 commit into
Supreeeme:mainfrom
damaestro:use-upstream-openxr-crates
Sep 2, 2026
Merged

Use released openxr 0.21 / openxr-sys 0.13#411
Supreeeme merged 1 commit into
Supreeeme:mainfrom
damaestro:use-upstream-openxr-crates

Conversation

@damaestro

Copy link
Copy Markdown
Contributor

The [patch.crates-io] pin on openxrs d0afdd3 was needed for commits that were unreleased at the time, notably the change making Action::create_space take a &Session, along with the UB fix in Instance::supports_() and the wrong-extension-check fix.

All of those shipped in openxr 0.20.0 / openxr-sys 0.12.0, so the git pin is no longer necessary and the workspace can depend on released crates again. This also unblocks distribution packaging, which cannot build from a git-pinned dependency.

Moving to 0.21/0.13 needs two source changes:

  • ExtensionSet::other is now Vec<Vec> holding nul-terminated extension names rather than Vec, so the XR_MNDX_xdev_space name is passed as bytes with an explicit nul.

  • XDev's handle accessors require openxr::sys::Handle in scope.

openxr_mndx_xdev_space moves to 0.2 to match, since 0.1.1 pins openxr 0.19.

The [patch.crates-io] pin on openxrs d0afdd3 was needed for commits that
were unreleased at the time, notably the change making
Action<Posef>::create_space take a &Session, along with the UB fix in
Instance::supports_<prop>() and the wrong-extension-check fix.

All of those shipped in openxr 0.20.0 / openxr-sys 0.12.0, so the git pin
is no longer necessary and the workspace can depend on released crates
again. This also unblocks distribution packaging, which cannot build from
a git-pinned dependency.

Moving to 0.21/0.13 needs three source changes:

  * ExtensionSet::other is now Vec<Vec<u8>> holding nul-terminated
    extension names rather than Vec<String>, so the XR_MNDX_xdev_space
    name is passed as bytes with an explicit nul.

  * openxr-sys 0.13 moves NULL/into_raw/from_raw off the inherent handle
    impls onto a Handle trait, so XDev's handle accessors require
    openxr::sys::Handle in scope.

  * fakexr needs that same trait in scope for its own handle plumbing.
    It is imported as _ there, since fakexr has an unrelated Handle
    trait of its own. Only cargo test builds fakexr, so this is invisible
    to a plain release build.

openxr_mndx_xdev_space moves to 0.2 to match, since 0.1.1 pins openxr
0.19.
@damaestro
damaestro force-pushed the use-upstream-openxr-crates branch from 498adbd to 67284c9 Compare August 16, 2026 23:16
@Supreeeme
Supreeeme merged commit f81fedd into Supreeeme:main Sep 2, 2026
3 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