Commit graph

405 commits

Author SHA1 Message Date
BD103
c3eb3a1acf
Give alt text to Bevy logo (#13205)
# Objective

- In the documentation of the `bevy` crate, we embed the Bevy logo.
([docs.rs](https://docs.rs/bevy/0.13.2/bevy/index.html),
[logo](https://bevyengine.org/assets/bevy_logo_docs.svg))
- It was first added in 9aae341.
- Markdown supports adding alternate descriptions for images that either
cannot be loaded or for screen readers.

## Solution

- Add alt text for the Bevy logo.

---

## Changelog

- Added alt text to Bevy logo.
2024-05-03 19:50:17 +00:00
James Liu
538d699994
Make dynamic_linking a no-op on wasm targets (#12672)
# Objective
Resolve #10054.

## Solution
Make dynamic linking a no-op by omitting it from the dependency tree on
wasm targets.

To test this, try `cargo build --lib --target wasm32-unknown-unknown
--features bevy/dynamic_linking` with and without this PR.

Might need to update the book on the website to explain this when this
makes it into a release.

Co-Authored By: @daxpedda

---------

Co-authored-by: BD103 <59022059+BD103@users.noreply.github.com>
2024-04-24 04:49:38 +00:00
James Liu
ac4b9beb00
Remove redundant doc_auto_config (#12682)
# Objective
CI on main has been failing for the following reason:
```
error[E0636]: the feature `doc_auto_cfg` has already been declared
  --> src/lib.rs:48:29
   |
48 | #![cfg_attr(docsrs, feature(doc_auto_cfg))]
   |                             ^^^^^^^^^^^^
```

## Solution
Remove the redundant attribute.
2024-03-29 02:02:44 +00:00
mamekoro
cb9789bc35
Remove unnecessary executable flags from Rust source files (#12707)
# Objective
I found that some .rs files are unnecessarily executable.

Rust source files may start with a shebang-like statement `#!`, so let's
make sure they are not executable just in case.

Here is the result of the `find` commend that lists executable .rs files
as of main branch `86bd648`.
```console
$ find -name \*.rs -type f -executable
./crates/bevy_gizmos/src/lib.rs
./crates/bevy_tasks/src/lib.rs
./crates/bevy_time/src/lib.rs
./crates/bevy_transform/src/lib.rs
./src/lib.rs
```

It appears that the permissions of those files were originally 644, but
were unexpectedly changed to 755 by commit
52e3f2007b.

## Solution
Make them not executable by using this command;
`find -name \*.rs -type f -executable -exec chmod --verbose a-x -- {}
\+`
2024-03-25 20:03:55 +00:00
Ame
72c51cdab9
Make feature(doc_auto_cfg) work (#12642)
# Objective

- In #12366 `![cfg_attr(docsrs, feature(doc_auto_cfg))] `was added. But
to apply it it needs `--cfg=docsrs` in rustdoc-args.


## Solution

- Apply `--cfg=docsrs` to all crates and CI.

I also added `[package.metadata.docs.rs]` to all crates to avoid adding
code behind a feature and forget adding the metadata.

Before:

![Screenshot 2024-03-22 at 00 51
57](https://github.com/bevyengine/bevy/assets/104745335/6a9dfdaa-8710-4784-852b-5f9b74e3522c)

After:
![Screenshot 2024-03-22 at 00 51
32](https://github.com/bevyengine/bevy/assets/104745335/c5bd6d8e-8ddb-45b3-b844-5ecf9f88961c)
2024-03-23 02:22:52 +00:00
Al M
52e3f2007b
Add "all-features = true" to docs.rs metadata for most crates (#12366)
# Objective

Fix missing `TextBundle` (and many others) which are present in the main
crate as default features but optional in the sub-crate. See:

- https://docs.rs/bevy/0.13.0/bevy/ui/node_bundles/index.html
- https://docs.rs/bevy_ui/0.13.0/bevy_ui/node_bundles/index.html

~~There are probably other instances in other crates that I could track
down, but maybe "all-features = true" should be used by default in all
sub-crates? Not sure.~~ (There were many.) I only noticed this because
rust-analyzer's "open docs" features takes me to the sub-crate, not the
main one.

## Solution

Add "all-features = true" to docs.rs metadata for crates that use
features.

## Changelog

### Changed

- Unified features documented on docs.rs between main crate and
sub-crates
2024-03-08 20:03:09 +00:00
Paul Kupper
dedf66f72b
Replace references to old book with quick start guide (#11983)
# Objective

Since https://github.com/bevyengine/bevy-website/pull/880, the old book
is now the Quick Start Guide, but the references to the old book have
not been updated.

## Solution

Update references to the old book to point to the Quick Start Guide.
2024-02-19 20:25:35 +00:00
Carter Anderson
aefe1f0739
Schedule-First: the new and improved add_systems (#8079)
Co-authored-by: Mike <mike.hsu@gmail.com>
2023-03-18 01:45:34 +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
张林伟
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
Niklas Eicker
fbab01a40d Add missing closing ticks for inline examples and some cleanup (#3573)
# Objective

- clean up documentation and inline examples

## Solution

- add missing closing "```"
- remove stray "```"
- remove whitespace in inline examples
- unify inline examples (remove some `rust` labels)
2022-01-07 09:25:12 +00:00
François
b724a0f586 Down with the system! (#2496)
# Objective

- Remove all the `.system()` possible.
- Check for remaining missing cases.

## Solution

- Remove all `.system()`, fix compile errors
- 32 calls to `.system()` remains, mostly internals, the few others should be removed after #2446
2021-07-27 23:42:36 +00:00
bjorn3
6d6bc2a8b4 Merge AppBuilder into App (#2531)
This is extracted out of eb8f973646476b4a4926ba644a77e2b3a5772159 and includes some additional changes to remove all references to AppBuilder and fix examples that still used App::build() instead of App::new(). In addition I didn't extract the sub app feature as it isn't ready yet.

You can use `git diff --diff-filter=M eb8f973646476b4a4926ba644a77e2b3a5772159` to find all differences in this PR. The `--diff-filtered=M` filters all files added in the original commit but not in this commit away.

Co-Authored-By: Carter Anderson <mcanders1@gmail.com>
2021-07-27 20:21:06 +00:00
Nathan Ward
00d8d5d5a0 fix clippy warning failing on CI (#2353)
# Objective

- CI jobs are starting to fail due to `clippy::bool-assert-comparison` and `clippy::single_component_path_imports` being triggered.

## Solution

- Fix all uses where `asset_eq!(<condition>, <bool>)` could be replace by `assert!`
- Move the `#[allow()]` for `single_component_path_imports` to `#![allow()]` at the start of the files.
2021-06-18 00:08:39 +00:00
Carter Anderson
b17f8a4bce format comments (#1612)
Uses the new unstable comment formatting features added to rustfmt.toml.
2021-03-11 00:27:30 +00:00
Nathan Stocks
a0475e9ad5
Change 'components' to 'bundles' where it makes sense semantically (#1257)
change 'components' to 'bundles' where it makes sense semantically
2021-01-18 16:50:36 -08:00
bjorn3
80a0448473
Add bevy_dylib to force dynamic linking of bevy (#808)
This easily improve compilation time by 2x
2020-11-09 19:26:08 -08:00
Nathan Stocks
9871e7e24b
Remove add_default_plugins and add MinimalPlugins for simple "headless" scenarios (#767)
Remove add_default_plugins and add MinimalPlugins for simple "headless" scenarios
2020-11-02 18:38:37 -08:00
memoryruins
d4dc115bd7
Add more notes about bevy's modules (#771) 2020-11-02 16:33:30 -08:00
memoryruins
f41f2069a0
Improve bevy crate's docs (#748)
Change `bevy` crates re-exports to modules
2020-10-29 19:41:00 -07:00
Carter Anderson
bf2a917b81
app: PluginGroups and DefaultPlugins (#744) 2020-10-29 13:04:28 -07:00
CGMossa
58eb7e7e05
Documenting small things here and there.. (#706)
Documenting small things here and there..
2020-10-21 15:57:03 -07:00
Carter Anderson
f88cfabdde
asset: WasmAssetIo (#703)
asset: WasmAssetIo
2020-10-19 17:29:31 -07:00
EthanYidong
4c753e2588
move dynamic plugin loading to its own optional crate (#544)
move dynamic plugin loading to its own crate
2020-10-01 13:04:06 -07:00
Utkarsh
19d4694d24
Added gamepad support using Gilrs (#280)
Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2020-09-18 14:43:47 -07:00
Tomasz Sterna
b9f549efaa
Make "render" feature optional (#485) 2020-09-15 12:20:20 -07:00
Lachlan Sneff
17e7642611
Task System for Bevy (#384)
Add bevy_tasks crate to replace rayon
2020-08-29 12:35:41 -07:00
Victor "multun" Collod
d138647818 enforce cargo fmt --check 2020-08-16 05:02:06 -07:00
Carter Anderson
9d45a058b5 update links 2020-08-04 19:57:55 -07:00
Carter Anderson
471639841b more optional features 2020-07-31 12:26:36 -07:00
Thomas Herzog
b4c185eb0c cargo fmt 2020-07-26 21:10:18 +02:00
Carter Anderson
89af5ea4e0 fix some doc tests 2020-07-23 13:40:07 -07:00
Carter Anderson
009141d453 window: customizable default descriptor 2020-07-20 02:05:56 -07:00
Carter Anderson
81df34adcf finish up import simplification 2020-07-16 19:38:21 -07:00
Carter Anderson
7823c3a9e2 property: simplify imports 2020-07-16 19:29:00 -07:00
Carter Anderson
2a6e75a27e pbr: simplify imports 2020-07-16 19:27:19 -07:00
Carter Anderson
e2d2b41c67 math: simplify imports 2020-07-16 19:23:47 -07:00
Carter Anderson
9f26a453c6 ecs: simplify imports 2020-07-16 19:20:51 -07:00
Carter Anderson
f742ce3ef2 app: simplify app imports 2020-07-16 18:47:51 -07:00
Carter Anderson
b12c4d0a48 render: simplify imports and cleanup prelude 2020-07-16 18:26:21 -07:00
Carter Anderson
196bde64e3 cargo fmt 2020-07-16 17:23:50 -07:00
Carter Anderson
1110f9b877 create bevy_math crate and move math types there 2020-07-16 17:11:52 -07:00
Carter Anderson
d9adea1b5e transform: TransformPlugin 2020-07-16 16:32:39 -07:00
Carter Anderson
3eb393548d audio: initial (very minimal) audio plugin 2020-07-16 13:46:51 -07:00
Carter Anderson
0dc810a37a ecs: add thread local system support to parallel executor 2020-07-14 14:19:17 -07:00
Carter Anderson
c81ab99dac cargo fmt 2020-07-10 01:37:06 -07:00
Carter Anderson
950e50bbb1 Bevy ECS migration 2020-07-10 01:06:21 -07:00
Carter Anderson
5787bcb2c5 legion: upgrade 2020-06-27 14:32:50 -07:00
Carter Anderson
8a8d01aa88 render: add ClearColor resource 2020-06-25 15:24:27 -07:00
Carter Anderson
92c44320ee ecs: rename EntityArchetype to ComponentSet 2020-06-25 11:21:56 -07:00