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

Make naga::back items public to support out of tree backends #5398

Closed
LegNeato opened this issue Mar 15, 2024 · 1 comment · Fixed by #5399
Closed

Make naga::back items public to support out of tree backends #5398

LegNeato opened this issue Mar 15, 2024 · 1 comment · Fixed by #5399
Labels
area: api Issues related to API surface naga Shader Translator

Comments

@LegNeato
Copy link
Contributor

LegNeato commented Mar 15, 2024

Is your feature request related to a problem? Please describe.

As suggested in a matrix thread, I am trying to convert the rust backend in #5175 to an out of tree maintained backend. To do so, I need some types in naga::back to be public.

For example, my PR uses

struct FunctionCtx<'a> {
which works when it is in-tree but fails out of tree.

It seems pretty much everything in naga::back should be public if out of tree backends are encouraged as the module is meant for backends to use.

I'm fine dealing with breakage if these are pub and marked as unstable and/or hidden in the docs.

Describe the solution you'd like
The items in naga::back be pub.

Describe alternatives you've considered

  1. I could not use those abstractions. My out of tree backend will be structured differently / drift from the in-tree ones. Eventually I would like to merge it in naga proper and using existing abstractions will help.
  2. I could copy and paste what I need in. This will be what I do if naga doesn't want them to be pub.

Additional context
I was told in matrix to open an issue when something prevents the backend from being out of tree. I am happy to put up a PR flipping what I need to pub, but I wanted to open this issue first to see if there is a different preferred solution.

@AdrianEddy
Copy link
Contributor

+1 I'm also interested in this feature

LegNeato added a commit to LegNeato/wgpu that referenced this issue Mar 16, 2024
This helps out-of-tree backends.

Fixes gfx-rs#5398.
@teoxoy teoxoy added area: api Issues related to API surface naga Shader Translator labels Apr 2, 2024
teoxoy pushed a commit that referenced this issue Apr 2, 2024
This helps out-of-tree backends.

Fixes #5398.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Issues related to API surface naga Shader Translator
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants