Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding optional features for preview extensions #23

Closed
Manishearth opened this issue Apr 22, 2020 · 8 comments
Closed

Adding optional features for preview extensions #23

Manishearth opened this issue Apr 22, 2020 · 8 comments

Comments

@Manishearth
Copy link
Contributor

Microsoft has a bunch of WIP features, e.g. XR_MSFT_hand_tracking_preview.

It would be nice to have sys bindings for these, and perhaps some optional cargo features to enable nicer APIs. I'd love to write the nicer APIs, however I'm not sure how to work the generator.

It seems like you need an xml file from the SDK, which doesn't exist for these (I can ask for one, maybe). We could potentially write one by hand and tweak the generator to accept additional xml files to be cfg-gated.

Thoughts?

@Manishearth
Copy link
Contributor Author

Seems like I can get my hands on an xml file.

@Ralith
Copy link
Owner

Ralith commented Apr 22, 2020

I'm amenable to this. The generator's a bit of a hackjob but it should be able to digest idiomatic extensions to the XML without changes. A single off-by-default cargo feature to expose preview extensions probably makes sense given the narrow audience and a desire to discourage reliance on them in their current form.

There'll likely be a breaking change when the stable version is published, especially if the preview version uses the same identifiers; we could consider preview-feature-gated interfaces inherently unstable, but I think this crate is sufficiently unlikely to appear in interfaces that just eating the semver bump is acceptable, at least pre-1.0. I'd rather not get into the position of having arbitrarily large amounts of deprecated code hanging around even if the identifiers aren't reused.

@Manishearth
Copy link
Contributor Author

Yeah I was considering that msft-preview would be inherently unstable.

I'm not very familiar with the generator -- would you be able to extend it to slurp additional XML if I can find Microsoft's XML file (they said they'd give one to me, I'm just waiting). Perhaps we can start with a dummy XML for now.

@Ralith
Copy link
Owner

Ralith commented Apr 22, 2020

I expect that would be an easy extension, but I'm not inclined to attempt it until we've seen what the file looks like. There's no convention for multi-file interface specs that I'm aware of, and they may well just give you a complete file with their changes added, which will require no extra effort.

@Manishearth
Copy link
Contributor Author

Ah cool

@Manishearth
Copy link
Contributor Author

Got a full XML at https://manishearth.net/xr.xml

Feels like a partial one might be more useful for making this an optional feature that can be composed with other such partial XMLs, but right now Microsoft is the only group with a preview extension set anyway so shrug.

@Manishearth
Copy link
Contributor Author

I'm experimenting in https://github.com/Manishearth/openxrs/tree/xr-msft

@Ralith
Copy link
Owner

Ralith commented Nov 4, 2021

Closing as this extension has been stabilized. If someone wants a new preview extension supported, feel free to open a new issue or PR!

@Ralith Ralith closed this as completed Nov 4, 2021
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

No branches or pull requests

2 participants