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

Feature render depends on bevy_ui #4202

Closed
Shatur opened this issue Mar 13, 2022 · 3 comments
Closed

Feature render depends on bevy_ui #4202

Shatur opened this issue Mar 13, 2022 · 3 comments

Comments

@Shatur
Copy link
Contributor

Shatur commented Mar 13, 2022

Bevy version

0.6.1

Operating system & version

Archlinux

What you did

[dependencies]
bevy = { version = "0.6", default-features = false, features = ["render"] }

What you expected to happen

Feature render does not depend on bevy_ui.

What actually happened

cargo tree shows that bevy_ui depends on bevy_internal which is required by Bevy. My Cargo.lock:

[[package]]
name = "bevy_internal"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f92af28d95bba80d11840c24fa4ce8ff84ae27af1def2f5cf8a6891acce5d714"
dependencies = [
 "bevy_app",
 "bevy_asset",
 "bevy_core",
 "bevy_core_pipeline",
 "bevy_derive",
 "bevy_diagnostic",
 "bevy_ecs",
 "bevy_gltf",
 "bevy_input",
 "bevy_log",
 "bevy_math",
 "bevy_pbr",
 "bevy_reflect",
 "bevy_render",
 "bevy_scene",
 "bevy_sprite",
 "bevy_tasks",
 "bevy_text",
 "bevy_transform",
 "bevy_ui",
 "bevy_utils",
 "bevy_window",
 "ndk-glue",
]
@Shatur Shatur added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Mar 13, 2022
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen A-UI Graphical user interfaces, styles, layouts, and widgets C-Code-Quality A section of code that is hard to understand or change D-Trivial Nice and easy! A great choice to get started with Bevy and removed S-Needs-Triage This issue needs to be labelled labels Mar 13, 2022
@mockersf
Copy link
Member

Feature render is a "group" feature that adds bevy_ui among other things that can be rendered:

bevy/Cargo.toml

Lines 35 to 43 in a291b5a

render = [
"bevy_internal/bevy_core_pipeline",
"bevy_internal/bevy_pbr",
"bevy_internal/bevy_gltf",
"bevy_internal/bevy_render",
"bevy_internal/bevy_sprite",
"bevy_internal/bevy_text",
"bevy_internal/bevy_ui",
]

You can use the other more precise features if you want to render without bevy_ui: bevy_render, bevy_core_pipeline, and then add the one you want depending on what you intend to render: bevy_pbr for Bevy pbr capabilities, bevy_sprite for 2d, bevy_text for text in 2d, bevy_ui for ui, ...

@mockersf mockersf removed C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy A-Rendering Drawing game state to the screen A-UI Graphical user interfaces, styles, layouts, and widgets C-Code-Quality A section of code that is hard to understand or change labels Mar 14, 2022
@Shatur
Copy link
Contributor Author

Shatur commented Mar 14, 2022

Oh, so its intended? Thanks for the explanation. I think I should send a lot of PRs to other third-party plugins then.

@mockersf
Copy link
Member

I think I should send a lot of PRs to other third-party plugins then.

I try to do that when trying a new plugin, you're welcome in joining the fight for minimal dependencies!

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