diff --git a/README.md b/README.md index 50dcae2d97..0a1e1976bd 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,12 @@ This [list][cargo_features] outlines the different cargo features supported by B [cargo_features]: docs/cargo_features.md +## [Third Party Plugins][plugin_guidelines] + +Plugins are very welcome to extend Bevy's features. [Guidelines][plugin_guidelines] are available to help integration and usage. + +[plugin_guidelines]: docs/plugins_guidelines.md + ## Thanks and Alternatives Additionally, we would like to thank the [Amethyst](https://github.com/amethyst/amethyst), [macroquad](https://github.com/not-fl3/macroquad), [coffee](https://github.com/hecrj/coffee), [ggez](https://github.com/ggez/ggez), [rg3d](https://github.com/mrDIMAS/rg3d), and [Piston](https://github.com/PistonDevelopers/piston) projects for providing solid examples of game engine development in Rust. If you are looking for a Rust game engine, it is worth considering all of your options. Each engine has different design goals, and some will likely resonate with you more than others. diff --git a/docs/cargo_features.md b/docs/cargo_features.md index fa3dc390f1..a2df4f8177 100644 --- a/docs/cargo_features.md +++ b/docs/cargo_features.md @@ -2,81 +2,29 @@ ## Default Features -### bevy_audio - -Audio support. Support for all audio formats depends on this. - -### bevy_gilrs -Adds gamepad support. - -### bevy_gltf - -[glTF](https://www.khronos.org/gltf/) support. - -### bevy_winit - -GUI support. - -### bevy_wgpu - -Make use of GPU via [WebGPU](https://gpuweb.github.io/gpuweb/) support. - -### render - -The render pipeline and all render related plugins. - -### bevy_dynamic_plugins - -Plugins for dynamic loading (libloading) - -### png - -PNG picture format support. - -### hdr - -[HDR](https://en.wikipedia.org/wiki/High_dynamic_range) support. - -### mp3 - -MP3 audio format support. - -### x11 - -Make GUI applications use X11 protocol. You could enable wayland feature to override this. +|feature name|description| +|-|-| +|bevy_audio|Audio support. Support for all audio formats depends on this.| +|bevy_dynamic_plugins|Plugins for dynamic loading (libloading)| +|bevy_gilrs|Adds gamepad support.| +|bevy_gltf|[glTF](https://www.khronos.org/gltf/) support.| +|bevy_winit|GUI support.| +|bevy_wgpu|Make use of GPU via [WebGPU](https://gpuweb.github.io/gpuweb/) support.| +|render|The render pipeline and all render related plugins.| +|png|PNG picture format support.| +|hdr|[HDR](https://en.wikipedia.org/wiki/High_dynamic_range) support.| +|mp3|MP3 audio format support.| +|x11|Make GUI applications use X11 protocol. You could enable wayland feature to override this.| ## Optional Features -### trace - -Enables system tracing (useful in tandem wit a feature like trace_chrome) - -### trace_chrome - -Enables [tracing-chrome](https://github.com/thoren-d/tracing-chrome) as bevy_log output. This allows you to visualize system execution. - -### wgpu_trace - -For tracing wgpu. - -### flac - -FLAC audio format support. It's included in bevy_audio feature. - -### wav - -WAV audio format support. - -### vorbis - -Vorbis audio format support. - -### wayland - -Enable this to use Wayland display server protocol other than X11. - -### subpixel_glyph_atlas - -Enable this to cache glyphs using subpixel accuracy. This increases texture -memory usage as each position requires a separate sprite in the glyph atlas, but -provide more accurate character spacing. +|feature name|description| +|-|-| +|trace|Enables system tracing (useful in tandem wit a feature like trace_chrome)| +|trace_chrome|Enables [tracing-chrome](https://github.com/thoren-d/tracing-chrome) as bevy_log output. This allows you to visualize system execution.| +|wgpu_trace|For tracing wgpu.| +|flac|FLAC audio format support. It's included in bevy_audio feature.| +|wav|WAV audio format support.| +|vorbis|Vorbis audio format support.| +|wayland|Enable this to use Wayland display server protocol other than X11.| +|subpixel_glyph_atlas|Enable this to cache glyphs using subpixel accuracy. This increases texture memory usage as each position requires a separate sprite in the glyph atlas, but provide more accurate character spacing.| diff --git a/docs/plugins_guidelines.md b/docs/plugins_guidelines.md new file mode 100644 index 0000000000..2f87abc7d9 --- /dev/null +++ b/docs/plugins_guidelines.md @@ -0,0 +1,114 @@ +# Third Party Plugin Guidelines + +Bevy has a plug and play architecture, where you can easily add plugins for new features, or replace built-in plugins with your own. + +This document targets plugin authors. + + +## Checklist + +* [ ] [Pick a reasonable, descriptive name](#naming) +* [ ] [Bevy/plugin version support table](#bevy-version-supported) +* [ ] [Turn off default Bevy features](#bevy-features) +* [ ] [Choose a Bevy git/master tracking badge](#master-branch-tracking) +* [ ] [Pick a license](#licensing) +* [ ] [Remove unnecessary or redundant dependencies](#small-crate-size) +* [ ] [Add cargo tests and CI](#tests-and-ci) +* [ ] [Documentation and examples](#documentation-and-examples) +* [ ] [Publish your plugin](#publishing-your-plugin) +* [ ] [Promote your plugin](#promotion) + +## Naming + +You are free to use a `bevy_xxx` name for your plugin, with the caveat "please be reasonable". If you are about to claim a generic name like `bevy_animation`, `bevy_color`, or `bevy_editor`... please ask first. The rational is explained [here](https://github.com/bevyengine/bevy/discussions/1202#discussioncomment-258907). + +## Promotion + +You can promote your plugin in Bevy's [communities](https://github.com/bevyengine/bevy#community): + +* Add it to [Awesome Bevy](https://github.com/bevyengine/awesome-bevy) +* Announce it on [Discord](https://discord.gg/gMUk5Ph), in channel `#showcase` +* Announce it on [Reddit](https://reddit.com/r/bevy) + +## Bevy Version Supported + +Indicating which version of your plugin works with which version of Bevy can be helpful for your users. Some of your users may be using an older version of Bevy for any number of reasons. You can help them find which version of your plugin they should use. This can be shown as a simple table in your readme with each version of Bevy and the corresponding compatible version of your plugin. + +|bevy|bevy_awesome_plugin| +|---|---| +|0.4|0.3| +|0.3|0.1| + +## Bevy Features + +You should disable Bevy features that you don't use. This is because with Cargo, features are additive. Features that are enabled for Bevy in your plugin can't be disabled by someone using your plugin. You can find the list of features [here](cargo_features.md). +``` +bevy = { version = "0.4", default-features = false, features = ["..."] } +``` + +## Master Branch Tracking + +If you intend to track Bevy's master branch, you can specify the latest commit you support in your cargo.toml file: +``` +bevy = { version = "0.4", git = "https://github.com/bevyengine/bevy", rev="509b138e8fa3ea250393de40c33cc857c72134d3", default-features = false } +``` +You can specify the dependency [both as a version and with git](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#multiple-locations), the version will be used if using the dependency from [crates.io](https://crates.io), the git dependency will be used otherwise. + +Bevy is evolving very fast. You can use one of these badges to communicate to your users how closely you intend to track Bevy's master branch. + +|