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

add an option about display server protocol, and create document docs/cargo_features.md #249

Merged
merged 8 commits into from
Aug 25, 2020
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ readme = "README.md"
exclude = ["assets/**/*", "tools/**/*", ".github/**/*", "crates/**/*"]

[features]
default = ["bevy_audio", "bevy_gltf", "bevy_wgpu", "bevy_winit", "png", "hdr", "mp3"]
default = ["bevy_audio", "bevy_gltf", "bevy_wgpu", "bevy_winit", "png", "hdr", "mp3", "x11"]
profiler = ["bevy_ecs/profiler", "bevy_diagnostic/profiler"]
wgpu_trace = ["bevy_wgpu/trace"]

Expand All @@ -27,6 +27,10 @@ flac = ["bevy_audio/flac"]
wav = ["bevy_audio/wav"]
vorbis = ["bevy_audio/vorbis"]

# Wayland or X11 support
wayland = ["bevy_winit/wayland"]
x11 = ["bevy_winit/x11"]

[workspace]
members = [
"crates/*",
Expand Down
6 changes: 5 additions & 1 deletion crates/bevy_winit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ repository = "https://github.com/bevyengine/bevy"
license = "MIT"
keywords = ["bevy"]

[features]
wayland = ["winit/wayland"]
x11 = ["winit/x11"]

[dependencies]
# bevy
bevy_app = { path = "../bevy_app", version = "0.1" }
Expand All @@ -18,5 +22,5 @@ bevy_math = { path = "../bevy_math", version = "0.1" }
bevy_window = { path = "../bevy_window", version = "0.1" }

# other
winit = { version = "0.22.2", package = "cart-tmp-winit", default-features = false, features = ["x11"] }
winit = { version = "0.22.2", package = "cart-tmp-winit", default-features = false}
log = { version = "0.4", features = ["release_max_level_info"] }
5 changes: 4 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Examples

These examples demonstrate the main features of Bevy and how to use them.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would prefer to leave non-default feature documentation out of the README. Instead, lets create a new docs/features.md file and link to it from the readme.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cart Done! I create a new docs/features.md file and link to it from the readme.

The suggestions in examples/README.md is reversed for I think it's useful for people who are not familiar with cargo.

How do you like it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just one small set of changes: lets rename the file cargo_features.md, make the title # Cargo Features and then in the main readme make it ## [Bevy Cargo Features](docs/cargo_features.md)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

To run an example, use the command `cargo run --example <Example>`.
To run an example, use the command `cargo run --example <Example>`, and add the option `--features x11` or `--features wayland` to force the example to run on a specific window compositor, e.g.
```
cargo run --features wayland hello_world
```

## Hello, World!

Expand Down