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

eframe: selectively expose parts of the API based on compile target #1867

Merged
merged 2 commits into from
Jul 29, 2022

Conversation

emilk
Copy link
Owner

@emilk emilk commented Jul 29, 2022

A lot of the eframe API is native-only or web-only. With this PR, only the parts that are implemented for each platform is exposed.

This means you'll need to add #[cfg(target_arch = "wasm32")] around code that uses the web-parts of the eframe API, and add #[cfg(not(target_arch = "wasm32"))] around the parts that are for native/desktop.

A lot of the `eframe` API is native-only or web-only. With this PR,
only the parts that are implemented for each platform is exposed.

This means you'll need to add `#[cfg(target_arch = "wasm32")]` around
code that uses the web-parts of the eframe API, and add
`#[cfg(not(target_arch = "wasm32"))]` around the parts that are
for native/desktop.
@emilk emilk merged commit 8c09804 into master Jul 29, 2022
@emilk emilk deleted the eframe-web-vs-native branch July 29, 2022 12:37
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.

1 participant