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

Features are gated by OS, not by named features #307

Open
asajeffrey opened this issue Sep 11, 2019 · 6 comments
Open

Features are gated by OS, not by named features #307

asajeffrey opened this issue Sep 11, 2019 · 6 comments

Comments

@asajeffrey
Copy link
Member

OES texture support is gated by OS at

#![cfg(any(
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd"
))]
:

#![cfg(any(
    target_os = "linux",
    target_os = "dragonfly",
    target_os = "freebsd",
    target_os = "netbsd",
    target_os = "openbsd"
))]

which means that platforms (like magicleap) which support OES but aren't in the blessed list of OS's can't use the feature.

@jdm
Copy link
Member

jdm commented Sep 11, 2019

Named features are hard because you can't enable cargo features conditionally by target.

@ceyusa
Copy link
Contributor

ceyusa commented Sep 12, 2019

Named features are hard because you can't enable cargo features conditionally by target.

That's the reason we designed render crates per target. Sadly we are having a lot of duplicated code that we have to work out.

ceyusa added a commit to ceyusa/media that referenced this issue Sep 12, 2019
ceyusa added a commit to ceyusa/media that referenced this issue Sep 12, 2019
ceyusa added a commit to ceyusa/media that referenced this issue Sep 12, 2019
ceyusa added a commit to ceyusa/media that referenced this issue Sep 12, 2019
ceyusa added a commit to ceyusa/media that referenced this issue Sep 12, 2019
ceyusa added a commit to ceyusa/media that referenced this issue Sep 12, 2019
@asajeffrey
Copy link
Member Author

The problem with gating by Target OS is that there are some platforms where the OS doesn't uniquely identify them. The particular instance I'm dealing with is magicleap, which has target_os=="android" but should use the unix back end.

@ceyusa
Copy link
Contributor

ceyusa commented Sep 12, 2019

In #308 I just added the gl render for android as target

@asajeffrey
Copy link
Member Author

I'll have a look to see if it works. If it uses anything from libandroid the answer will be "no" :/

ceyusa added a commit to ceyusa/media that referenced this issue Sep 16, 2019
@asajeffrey
Copy link
Member Author

Er, that PR still gates on target_os.

@asajeffrey asajeffrey reopened this Sep 16, 2019
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

3 participants