Commit graph

111 commits

Author SHA1 Message Date
Nolan Darilek
8d1f6ff7fa Integrate AccessKit (#6874)
# Objective

UIs created for Bevy cannot currently be made accessible. This PR aims to address that.

## Solution

Integrate AccessKit as a dependency, adding accessibility support to existing bevy_ui widgets.

## Changelog

### Added

* Integrate with and expose [AccessKit](https://accesskit.dev) for platform accessibility.
* Add `Label` for marking text specifically as a label for UI controls.
2023-03-01 22:45:04 +00:00
张林伟
acfd53a0fc Remove redundant symphonia-mp3 feature (#7852)
# Objective

- Fixes https://github.com/bevyengine/bevy/issues/7848.

## Solution

- remove the symphonia-mp3 feature and add a minimp3 feature instead.
2023-03-01 03:22:46 +00:00
François
261905f11d Feature documentation (#7814)
# Objective

- Fixes #1800, fixes #6984
- Alternative to #7196
- Ensure feature list is always up to date and that all are documented
- Help discovery of features

## Solution

- Use a template to update the cargo feature list
- Use the comment just above the feature declaration as the description
- Add the checks to CI
- Add the features to the base crate doc
2023-02-28 14:24:47 +00:00
Rdbo
93d7328c6a Add setup documentation for Alpine Linux (#7752)
Adds documentation for setting up bevy on Alpine Linux and its derivatives.
It contains instructions on installing the required packages and also fixing runtime errors.
2023-02-20 04:31:49 +00:00
Niklas Eicker
943499fcdf Remove last mentions of Stages (#7553)
# Objective

- Remove mentions of Stages, since they are gone now

## Solution

- Remove mentions of Stages
2023-02-07 18:07:57 +00:00
Chris Ohk
3281aea5c2 Fix minor typos in code and docs (#7378)
# Objective

I found several words in code and docs are incorrect. This should be fixed.

## Solution

- Fix several minor typos

Co-authored-by: Chris Ohk <utilforever@gmail.com>
2023-01-27 12:12:53 +00:00
张林伟
02978053cd Rename dynamic feature (#7340)
# Objective

- Fixes https://github.com/bevyengine/bevy/issues/7334

## Solution

- Rename `dynamic` feature to `dynamic_linking`.

---

## Migration Guide
- `dynamic` feature was renamed to `dynamic_linking`
2023-01-23 14:28:00 +00:00
Carter Anderson
c56bbcb3b0 Use Bevy People links in The Bevy Organization Doc (#7200)
Bevy People should be considered the source of truth for Bevy Organization roles. This replaces inline lists of maintainers and SMEs with links to Bevy People.
2023-01-15 06:13:56 +00:00
2ne1ugly
e42c0988eb Add missing discord link in "the_bevy_organization.md" (#7203)
# Objective

- Add change that was suggested in https://github.com/bevyengine/bevy/pull/7185#pullrequestreview-1248746032 but missed

## Solution

- Add the change
2023-01-15 05:56:14 +00:00
Carter Anderson
82b0e712ce Subject Matter Experts and new Bevy Org docs (#7185)
We are in the process of rolling out a new Bevy Organization role! (Subject Matter Expert)

This adds a new "The Bevy Organization" document and links to it from CONTRIBUTING.md. This doc describes how the Bevy Organization will work going forward. It outlines the functionality of each role, as well as the expectations we have for them. The previously existing roles (Project Lead, Maintainer) still work the same way, but their definition and scope have been made much clearer.

Tomorrow we will be announcing this publicly in a blog post. This will describe the motivation and announce the first round of SMEs . But before that  it makes sense to do a quick review round first.

Given the quick turnaround on this PR, this isn't the best platform to discuss changes to the SME system (or its validity). After you have read the announcement tomorrow, feel free to start discussions wherever is preferable to you (this repo, discord, etc). So for now, please just review for clarity / typos / phrasing / missed info / etc.

[Rendered](08ceae43db/docs/the_bevy_organization.md)
2023-01-14 20:36:56 +00:00
Mike
e4d54739e7 add link to tracy compatibility table (#7144)
# Objective

- Fixes https://github.com/bevyengine/bevy/issues/5200
2023-01-10 17:07:27 +00:00
Yyee
a41e869aa9 Expose symphonia features from rodio in bevy_audio and bevy (#6388)
# Objective
Fix #6301 

## Solution
Add new features in `bevy_audio` to use `symphonia` sound format from `rodio` 
Also add in `bevy`
2023-01-09 19:05:30 +00:00
figsoda
d2963267ba improve nix docs (#7044)
# Objective

`xlibsWrapper` is being deprecated: https://github.com/NixOS/nixpkgs/issues/194054, this pr removes the deprecated xlibsWrapper and makes a couple more improvements

## Solution

- rename NixOS to Nix since this is not specific to NixOS
- remove usage of `xlibsWrapper`
- add instructions for nix flakes with `nix develop`
- add example of a packaged bevy program in nixpkgs
- minor cosmetic/grammatical changes
2022-12-29 21:37:27 +00:00
aktaboot
4ca19ac4d3 Update linux_dependencies.md (#7021)
fixes alsalib dependency for NixOS
2022-12-26 16:52:17 +00:00
Lixou
aeb2c4b917 Update linux_dependencies.md for Arch - Vulkan API not only for Intel GPUs (#6729)
fix note in arch's linux deps.
2022-12-11 19:24:18 +00:00
zxygentoo
68a7127a27 Update linux_dependencies.md (#6915)
Add a section about install `vulkan-loader` on Gentoo.

# Objective

- Clarify the dependency about install on Gentoo with NVIDIA GPU and using a proprietary driver.

## Solution

- Emerge `vulkan-loader` to help Bevy to find the correct ICD.
2022-12-11 18:46:48 +00:00
James Liu
10898d1dc9 Docs: Show how to compare two different traces in Tracy (#6869)
# Objective
Fixes #5199.

## Solution
Mention how to compare two different saved tracy traces in the profiling section.
2022-12-07 22:57:27 +00:00
Olivia Crain
176d7df5db docs: Use correct cargo-flamegraph upstream repo URL (#6873)
# Objective

Links to `cargo-flamegraph`'s repo point to a [fork](https://github.com/killercup/cargo-flamegraph), not the actual upstream repo. We should point to the source of truth instead of a fork that hasn't been updated since 2019.

## Solution

Change links to point to the upstream repo at  [flamegraph-rs/flamegraph](https://github.com/flamegraph-rs/flamegraph).
2022-12-07 21:23:20 +00:00
KazaniAvali
7963bb9ab3 Docs: amdgpu-pro-vulkan on Gentoo. (#6749)
When running Bevy on Gentoo using an AMD Radeon GPU, it panics unless `amdgpu-pro-vulkan` has been installed (and it took quite a bit of experimentation to find this information). This PR adds a mention of this to the linux dependencies documentation.
2022-11-28 13:54:15 +00:00
cathalogue
2cde4c73ed Update linux_dependencies.md (#6205)
for nix build, pkgconfig has been renamed to pkg-config. Very small fix :>

# Objective

- Describe the objective or issue this PR addresses.
- If you're fixing a specific issue, say "Fixes #X".

## Solution

- Describe the solution used to achieve the objective above.

---

## Changelog

> This section is optional. If this was a trivial fix, or has no externally-visible impact, you can delete this section.

- What changed as a result of this PR?
- If applicable, organize changes under "Added", "Changed", or "Fixed" sub-headings
- Stick to one or two sentences. If more detail is needed for a particular change, consider adding it to the "Solution" section
  - If you can't summarize the work, your change may be unreasonably large / unrelated. Consider splitting your PR to make it easier to review and merge!

## Migration Guide

> This section is optional. If there are no breaking changes, you can delete this section.

- If this PR is a breaking change (relative to the last release of Bevy), describe how a user might need to migrate their code to support these changes
- Simply adding new functionality is not a breaking change.
- Fixing behavior that was definitely a bug, rather than a questionable design choice is not a breaking change.
2022-10-10 16:34:24 +00:00
Nicola Papale
4e5b165fa0 Add details about intel linux vulkan driver (#6103)
# Objective

Fixes #6073

# Solution

Add a paragraph about `vulkan-intel` to the archlinux section.
2022-09-28 20:38:43 +00:00
ira
92e78a4bc5 Fix some grammatical errors in the docs (#6109)
Co-authored-by: devil-ira <justthecooldude@gmail.com>
2022-09-26 21:47:31 +00:00
bjorn3
f68f5cd2a5 Add troubleshooting for pkgconfig errors on fedora (#5821)
# Objective

- There can be a confusing pkgconfig error on fedora.

## Solution

- Add troubleshooting guide for pkgconfig errors on fedora.

---

cc https://github.com/bevyengine/bevy/issues/2826
cc https://github.com/bevyengine/bevy/issues/5738

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2022-08-29 23:16:43 +00:00
François
231894a3a6 Lighter no default features (#5447)
# Objective

- Even though it's marked as optional, it is no longer possible to not depend on `bevy_render` as it's a dependency of `bevy_scene`

## Solution

- Make `bevy_scene` optional
- For the minimalist among us, also make `bevy_asset` optional
2022-07-25 15:48:14 +00:00
SuperSamus
4c35ecf71f linux_dependencies: fix NixOS (#5251)
I forgot a rec... (and I removed the redundant file name).

# Objective

- Fix the whoopsie from #5086.
2022-07-08 17:14:34 +00:00
Robert Swain
dfe9690052 docs: Add section about using Tracy for profiling (#4534)
# Objective

- Document how to do profiling with Tracy

# Solution

- The documentation of setting `RUST_LOG=info` in order to capture `wgpu` spans depends on https://github.com/bevyengine/bevy/pull/5182
2022-07-04 17:31:47 +00:00
SuperSamus
3d68094f6f linux_dependencies: cleanup NixOS (#5086)
# Objective

Small cleanup to NixOS dependencies.
Switched `clang` and `lld` to `bintools` because of [this](https://matklad.github.io/2022/03/14/rpath-or-why-lld-doesnt-work-on-nixos.html).
2022-06-24 02:13:00 +00:00
Domi
30ca97e287 Fix Nix section of linux_dependencies.md (#5050)
# Objective

`nix-shell` reported: ```error: 'x11' has been renamed to/replaced by 'xlibsWrapper'```.

## Solution

Replacing `x11` with `xlibsWrapper` in the Nix section of linux_dependencies.md fixes the problem on my system, and bevy projects build fine.
2022-06-20 19:06:38 +00:00
Cai Bingjun
5ace79ff09 Let the project page support GitHub's new ability to display open source licenses (#4966)
Change _LICENSE-APACHE_ and _LICENSE-MIT_ file location
Delete _LICENSE_
You can make the license in about on bevy's GitHub page display as **Apache-2.0, MIT licenses found** instead of **View license**
2022-06-08 17:55:57 +00:00
Johan Klokkhammer Helsing
d51a87cf28 Recommend posting new plugins in #crates discord channel (#4956)
# Objective

- Guide people to the right discord channel to post about their new plugin. #showcase was split into multiple channels.

## Solution

- recommend posting in #crates
2022-06-07 08:14:10 +00:00
Yutao Yuan
c4080c6832 Fix release workflow (#4903)
# Objective

While playing with the code, I found some problems in the recently merged version-bumping workflow:
- Most importantly, now that we are using `0.8.0-dev` in development, the workflow will try to bump it to `0.9.0` 😭 
- The crate filter is outdated now that we have more crates in `tools`.
- We are using `bevy@users.noreply.github.com`, but according to [Github help](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address#about-commit-email-addresses), that email address means "old no-reply email format for the user `bevy`". It is currently not associated with any account, but I feel this is still not appropriate here.

## Solution

- Create a new workflow, `Post-release version bump`, that should be run after a release and bumps version from `0.X.0` to `0.X+1.0-dev`. Unfortunately, cargo-release doesn't have a builtin way to do this, so we need to parse and increment the version manually.
- Add the new crates in `tools` to exclusion list. Also removes the dependency version specifier from `bevy_ecs_compile_fail_tests`. It is not in the workspace so the dependency version will not get automatically updated by cargo-release.
- Change the author email to `41898282+github-actions[bot]@users.noreply.github.com`. According to the discussion [here](https://github.com/actions/checkout/issues/13#issuecomment-724415212) and [here](https://github.community/t/github-actions-bot-email-address/17204/6), this is the email address associated with the github-actions bot account.
- Also add the workflows to our release checklist.

See infmagic2047#5 and infmagic2047#6 for examples of release and post-release PRs.
2022-06-06 15:47:51 +00:00
ira
ef032040dd Cargo --timings option has been stabilized. Update profiling.md. (#4850)
As of https://github.com/rust-lang/cargo/pull/10245 `--timings` has been stabilized.
Update profiling.md to reflect this.

Co-authored-by: devil-ira <justthecooldude@gmail.com>
2022-05-30 21:16:48 +00:00
Thomas Hansen
ba53a44956 Add Clear Linux OS dependencies (#4852) 2022-05-30 18:13:36 +00:00
Thomas Hansen
7d21ca3744 Add alsa-lib-devel to OpenSUSE dependencies (#4635)
Needed for compilation, tumbleweed. This PR adds the needed alsa package for OpenSUSE to the documentation.
2022-05-01 01:00:27 +00:00
Yutao Yuan
08eaa13c81 Add animation feature to cargo_features.md (#4450)
# Objective

The new feature `animation` is not documented in `cargo_features.md`.

## Solution

Add it there.
2022-04-11 04:20:25 +00:00
persik
31636a3504 Update linux_dependencies for Gentoo. (#4195)
# Objective

- Add dependencies installation instructions for Gentoo for `linux_dependencies.md`.

## Solution

- Edit the `linux_dependencies.md`.
2022-03-21 04:15:37 +00:00
Alice Cecile
7ce3ae43e3 Bump Bevy to 0.7.0-dev (#4230)
# Objective

- The [dev docs](https://dev-docs.bevyengine.org/bevy/index.html#) show version 0.6.0, which is actively misleading.

[Image of the problem](https://cdn.discordapp.com/attachments/695741366520512563/953513612943704114/Screenshot_20220316-154100_Firefox-01.jpeg)

Noticed by @ickk, fix proposed by @mockersf.

## Solution

- Bump the version across all Bevy crates to 0.7.0 dev.
- Set a reminder in the Release Checklist to remember to do this each release.
2022-03-19 03:54:15 +00:00
Carter Anderson
de677dbfc9 Use more ergonomic span syntax (#4246)
Tracing added support for "inline span entering", which cuts down on a lot of complexity:

```rust
let span = info_span!("my_span").entered();
```

This adapts our code to use this pattern where possible, and updates our docs to recommend it.

This produces equivalent tracing behavior. Here is a side by side profile of "before" and "after" these changes.
![image](https://user-images.githubusercontent.com/2694663/158912137-b0aa6dc8-c603-425f-880f-6ccf5ad1b7ef.png)
2022-03-18 04:19:21 +00:00
Robert Swain
0529f633f9 KTX2/DDS/.basis compressed texture support (#3884)
# Objective

- Support compressed textures including 'universal' formats (ETC1S, UASTC) and transcoding of them to 
- Support `.dds`, `.ktx2`, and `.basis` files

## Solution

- Fixes https://github.com/bevyengine/bevy/issues/3608 Look there for more details.
- Note that the functionality is all enabled through non-default features. If it is desirable to enable some by default, I can do that.
- The `basis-universal` crate, used for `.basis` file support and for transcoding, is built on bindings against a C++ library. It's not feasible to rewrite in Rust in a short amount of time. There are no Rust alternatives of which I am aware and it's specialised code. In its current state it doesn't support the wasm target, but I don't know for sure. However, it is possible to build the upstream C++ library with emscripten, so there is perhaps a way to add support for web too with some shenanigans.
- There's no support for transcoding from BasisLZ/ETC1S in KTX2 files as it was quite non-trivial to implement and didn't feel important given people could use `.basis` files for ETC1S.
2022-03-15 22:26:46 +00:00
Carter Anderson
98938a8555 Internal Asset Hot Reloading (#3966)
Adds "hot reloading" of internal assets, which is normally not possible because they are loaded using `include_str` / direct Asset collection access.

This is accomplished via the following:
* Add a new `debug_asset_server` feature flag
* When that feature flag is enabled, create a second App with a second AssetServer that points to a configured location (by default the `crates` folder). Plugins that want to add hot reloading support for their assets can call the new `app.add_debug_asset::<T>()` and `app.init_debug_asset_loader::<T>()` functions.
* Load "internal" assets using the new `load_internal_asset` macro. By default this is identical to the current "include_str + register in asset collection" approach. But if the `debug_asset_server` feature flag is enabled, it will also load the asset dynamically in the debug asset server using the file path. It will then set up a correlation between the "debug asset" and the "actual asset" by listening for asset change events.

This is an alternative to #3673. The goal was to keep the boilerplate and features flags to a minimum for bevy plugin authors, and allow them to home their shaders near relevant code. 

This is a draft because I haven't done _any_ quality control on this yet. I'll probably rename things and remove a bunch of unwraps. I just got it working and wanted to use it to start a conversation.

Fixes #3660
2022-02-18 22:56:57 +00:00
Thomas Versteeg
c4f132afbf Fix call with features in docs/profiling.md (#3967)
Features must be called with the crate, otherwise the following error is thrown:

> error: none of the selected packages contains these features: trace_chrome
2022-02-17 18:51:43 +00:00
Zhe Chen
836ffeda31 Add missing dependencies for Fedora with Wayland (#3708)
# Objective

- The Linux dependencies document lacks packages for Fedora with Wayland.

## Solution

- Add instructions to install packages for running Bevy apps in Fedora with Wayland.
2022-01-17 22:22:16 +00:00
SuperSamus
fc0f15f11e Documentation: simplify NixOS dependencies (#3527)
# Objective

The description of NixOS dependencies is extremely long and spends entire paragraphs just for simple line changes.
With this PR it should be much simpler.

## Solution

- Linking Vulkan in `build.rs` is less effective than adding it in LD_LIBRARY_PATH, so I removed the former (related to #1992);
- I put a simple comment explaining the line in the list of dependencies, instead of making entire paragraphs;
- Clang is not in an absolute path in `.cargo/config_fast_builds` anymore, so that there is no need to specify it in `docs/linux_dependencies.md` (didn't test if this breaks other distros, though I doubt it. Also, maybe it could also be done on Darwin for consistency?);
- Also added optional wayland dependencies.

A few notes:
- The x11 libraries will be linked only during the compilation phase. This means that if you use the `x11` feature without these libraries in the environment (for example because you forget to enter the nix shell before compiling), the program will still compile successfully but won't run. You'll have to `cargo clean` and recompile with the x11 libraries in the environment. I don't know if this is important enough to be added to the documentation, but it's not specified anywhere, though I don't think it's specific to NixOS;
- The wayland dependencies need to be put in LD_LIBRARY_PATH only in certain conditions (IIRC, only if using the `dynamic` feature) and the text doesn't specify it. Because putting them there doesn't increase the number of dependencies (they are already in buildInputs) or alter the performance, I doubt anyone will care;
- Should I comment out what isn't needed by default?
- ~I removed `cargo` from buildInputs. Ignoring the fact that it should be in nativeBuildInputs, having it in `shell.nix` allows to use stable Rust in case it's not in the system environment, but maybe the user wanted to use the version that was already in the system environment and will be caught by surprise. In my opinion, if someone is looking at a Bevy's documentation on NixOS, that user will either have Rust already in the system environment (eg. via rustup) or is capable to add the toolchain they want on shell.nix by themselves. This isn't exactly the place to explain how this works.~ ~EDIT: I replaced `cargo` with Rust from the [Oxalica overlay](https://github.com/oxalica/rust-overlay) in order to have the latest nightly.~ EDIT: Removed `cargo` from dependencies. See comments for details.
2022-01-10 17:05:13 +00:00
SarthakSingh31
2d301ea0ea Add instruction to enable ALSA api routing on Arch / Manjaro systems (#3455)
# Objective

Every few months a person using Arch asks for help with the following error on discord:
```
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
```
This error is caused by their sound server not being configured for ALSA. The fix is to install `pipewire-alsa` or `pulseaudio-alsa` depending on the sound server they use.

Examples:
- https://discord.com/channels/691052431525675048/749690364792668301/924380204237987861
- https://discord.com/channels/691052431525675048/742884593551802431/907392651689619486
- https://discord.com/channels/691052431525675048/742884593551802431/838062316360433664

## Solution

Add the instruction to install either `pipewire-alsa` or `pulseaudio-alsa` to [linux_dependencies.md](https://github.com/bevyengine/bevy/blob/main/docs/linux_dependencies.md#arch--manjaro)

## Extra Info

A lot of people don't run into this issue because `pipewire-alsa` / `pulseaudio-alsa` is a dependency for gnome and cinnamon.

@alice-i-cecile Sorry, had to recreate the pr. It doesn't let me reopen and change the branch of the original pr.
2022-01-05 23:28:30 +00:00
François
a6d3cd92fe revert new dependency for fedora added in #3517 (#3530)
# Objective

- Revert #3517 as the dependency added (rust-libudev-devel) has a dependency on cargo which install the package manager version, which isn't compatible with rustup version and may break the setup of users


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
2022-01-02 20:36:41 +00:00
Oscar
478bf7a2b6 Remove Lutris from NixOS dependency section (#2945)
# Objective

- Using the instructions given for NixOS results in an unnecessarily long time to evaluate the shell expression due to unnecessary dependencies pulled in by `lutris`.

## Solution

- Removed `lutris` dependency.

Lutris is a GUI tool for running games on wine, I'm assuming it was pulled in by accident as it's definitely not necessary for running bevy. A hello world example, at the least, works fine without it.
2022-01-01 22:55:19 +00:00
Joel Godfrey-Smith
6b239713bf Update linux_dependencies.md (#3517)
Thanks for making Bevy. Recommend adding rust-libudev-devel as an additional dependence for Fedora.

# Objective

- Describe the objective or issue this PR addresses.
- If you're fixing a specific issue, say "Fixes #X".

## Solution

- Describe the solution used to achieve the objective above.
2022-01-01 22:28:44 +00:00
François
aeba9faf04 use ogg by default instead of mp3 (#3421)
# Objective

- mp3 feature of rodio has dependencies that are not maintained with security issues
- mp3 feature of rodio doesn't build in wasm
- mp3 feature of rodio uses internal memory allocation that cause rejection from Apple appstore

## Solution

- Use vorbis instead of mp3 by default


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
2021-12-23 19:19:15 +00:00
François
3974e02fd1 Enable trace feature for subfeatures using it (#3337)
# Objective

- It isn't very useful to be able to enable feature `trace_chrome` on its own

## Solution

- Enable `trace` feature when enabling `trace_chrome` or `trace_tracy`


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
2021-12-18 00:09:22 +00:00
Carter Anderson
ffecb05a0a Replace old renderer with new renderer (#3312)
This makes the [New Bevy Renderer](#2535) the default (and only) renderer. The new renderer isn't _quite_ ready for the final release yet, but I want as many people as possible to start testing it so we can identify bugs and address feedback prior to release.

The examples are all ported over and operational with a few exceptions:

* I removed a good portion of the examples in the `shader` folder. We still have some work to do in order to make these examples possible / ergonomic / worthwhile: #3120 and "high level shader material plugins" are the big ones. This is a temporary measure.
* Temporarily removed the multiple_windows example: doing this properly in the new renderer will require the upcoming "render targets" changes. Same goes for the render_to_texture example.
* Removed z_sort_debug: entity visibility sort info is no longer available in app logic. we could do this on the "render app" side, but i dont consider it a priority.
2021-12-14 03:58:23 +00:00