Set the logo and favicon for all of Bevy's published crates (#12696)

# Objective
Currently the built docs only shows the logo and favicon for the top
level `bevy` crate. This makes views like
https://docs.rs/bevy_ecs/latest/bevy_ecs/ look potentially unrelated to
the project at first glance.

## Solution
Reproduce the docs attributes for every crate that Bevy publishes.

Ideally this would be done with some workspace level Cargo.toml control,
but AFAICT, such support does not exist.
This commit is contained in:
James Liu 2024-03-25 11:52:50 -07:00 committed by GitHub
parent 86bd648570
commit f096ad4155
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 160 additions and 0 deletions

View file

@ -1,5 +1,9 @@
#![forbid(unsafe_code)] #![forbid(unsafe_code)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! Accessibility for Bevy //! Accessibility for Bevy

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! Animation for the game engine Bevy //! Animation for the game engine Bevy

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! This crate is about everything concerning the highest-level, application layer of a Bevy app. //! This crate is about everything concerning the highest-level, application layer of a Bevy app.

View file

@ -1,6 +1,10 @@
// FIXME(3492): remove once docs are ready // FIXME(3492): remove once docs are ready
#![allow(missing_docs)] #![allow(missing_docs)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
pub mod io; pub mod io;
pub mod meta; pub mod meta;

View file

@ -1,5 +1,9 @@
#![forbid(unsafe_code)] #![forbid(unsafe_code)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! Audio support for the game engine Bevy //! Audio support for the game engine Bevy
//! //!

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! Representations of colors in various color spaces. //! Representations of colors in various color spaces.
//! //!

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! This crate provides core functionality for Bevy Engine. //! This crate provides core functionality for Bevy Engine.

View file

@ -1,6 +1,10 @@
// FIXME(3492): remove once docs are ready // FIXME(3492): remove once docs are ready
#![allow(missing_docs)] #![allow(missing_docs)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
pub mod blit; pub mod blit;
pub mod bloom; pub mod bloom;

View file

@ -1,6 +1,10 @@
// FIXME(3492): remove once docs are ready // FIXME(3492): remove once docs are ready
#![allow(missing_docs)] #![allow(missing_docs)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
extern crate proc_macro; extern crate proc_macro;

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! This crate provides additional utilities for the [Bevy game engine](https://bevyengine.org), //! This crate provides additional utilities for the [Bevy game engine](https://bevyengine.org),
//! focused on improving developer experience. //! focused on improving developer experience.

View file

@ -1,6 +1,10 @@
// FIXME(3492): remove once docs are ready // FIXME(3492): remove once docs are ready
#![allow(missing_docs)] #![allow(missing_docs)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! This crate provides a straightforward solution for integrating diagnostics in the [Bevy game engine](https://bevyengine.org/). //! This crate provides a straightforward solution for integrating diagnostics in the [Bevy game engine](https://bevyengine.org/).
//! It allows users to easily add diagnostic functionality to their Bevy applications, enhancing //! It allows users to easily add diagnostic functionality to their Bevy applications, enhancing

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! Forces dynamic linking of Bevy. //! Forces dynamic linking of Bevy.
//! //!

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! Bevy's dynamic plugin loading functionality. //! Bevy's dynamic plugin loading functionality.
//! //!

View file

@ -2,6 +2,10 @@
#![allow(unsafe_op_in_unsafe_fn)] #![allow(unsafe_op_in_unsafe_fn)]
#![doc = include_str!("../README.md")] #![doc = include_str!("../README.md")]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
#[cfg(target_pointer_width = "16")] #[cfg(target_pointer_width = "16")]
compile_error!("bevy_ecs cannot safely compile for a 16-bit platform."); compile_error!("bevy_ecs cannot safely compile for a 16-bit platform.");

View file

@ -1,6 +1,10 @@
// FIXME(3492): remove once docs are ready // FIXME(3492): remove once docs are ready
#![allow(missing_docs)] #![allow(missing_docs)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
use bevy_macro_utils::BevyManifest; use bevy_macro_utils::BevyManifest;
use encase_derive_impl::{implement, syn}; use encase_derive_impl::{implement, syn};

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! Systems and type definitions for gamepad handling in Bevy. //! Systems and type definitions for gamepad handling in Bevy.
//! //!

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! This crate adds an immediate mode drawing api to Bevy for visual debugging. //! This crate adds an immediate mode drawing api to Bevy for visual debugging.
//! //!

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! Plugin providing an [`AssetLoader`](bevy_asset::AssetLoader) and type definitions //! Plugin providing an [`AssetLoader`](bevy_asset::AssetLoader) and type definitions
//! for loading glTF 2.0 (a standard 3D scene definition format) files in Bevy. //! for loading glTF 2.0 (a standard 3D scene definition format) files in Bevy.

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! Parent-child relationships for Bevy entities. //! Parent-child relationships for Bevy entities.
//! //!

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! Input functionality for the [Bevy game engine](https://bevyengine.org/). //! Input functionality for the [Bevy game engine](https://bevyengine.org/).
//! //!

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! This module is separated into its own crate to enable simple dynamic linking for Bevy, and should not be used directly //! This module is separated into its own crate to enable simple dynamic linking for Bevy, and should not be used directly

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! This crate provides logging functions and configuration for [Bevy](https://bevyengine.org) //! This crate provides logging functions and configuration for [Bevy](https://bevyengine.org)
//! apps, and automatically configures platform specific log handlers (i.e. WASM or Android). //! apps, and automatically configures platform specific log handlers (i.e. WASM or Android).

View file

@ -1,5 +1,9 @@
#![deny(unsafe_code)] #![deny(unsafe_code)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! A collection of helper types and functions for working on macros within the Bevy ecosystem. //! A collection of helper types and functions for working on macros within the Bevy ecosystem.

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! Provides math types and functionality for the Bevy game engine. //! Provides math types and functionality for the Bevy game engine.
//! //!

View file

@ -7,6 +7,10 @@
// FIXME(3492): remove once docs are ready // FIXME(3492): remove once docs are ready
#![allow(missing_docs)] #![allow(missing_docs)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
use glam::{Vec2, Vec3}; use glam::{Vec2, Vec3};

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! This crate provides panic handlers for [Bevy](https://bevyengine.org) //! This crate provides panic handlers for [Bevy](https://bevyengine.org)
//! apps, and automatically configures platform specifics (i.e. WASM or Android). //! apps, and automatically configures platform specifics (i.e. WASM or Android).

View file

@ -1,6 +1,10 @@
// FIXME(3492): remove once docs are ready // FIXME(3492): remove once docs are ready
#![allow(missing_docs)] #![allow(missing_docs)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
pub mod wireframe; pub mod wireframe;

View file

@ -1,6 +1,10 @@
#![doc = include_str!("../README.md")] #![doc = include_str!("../README.md")]
#![no_std] #![no_std]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
use core::fmt::{self, Formatter, Pointer}; use core::fmt::{self, Formatter, Pointer};
use core::{ use core::{

View file

@ -1,6 +1,10 @@
// FIXME(3492): remove once docs are ready // FIXME(3492): remove once docs are ready
#![allow(missing_docs)] #![allow(missing_docs)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! Reflection in Rust. //! Reflection in Rust.
//! //!

View file

@ -1,6 +1,10 @@
// FIXME(3492): remove once docs are ready // FIXME(3492): remove once docs are ready
#![allow(missing_docs)] #![allow(missing_docs)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
#[cfg(target_pointer_width = "16")] #[cfg(target_pointer_width = "16")]
compile_error!("bevy_render cannot compile for a 16-bit platform."); compile_error!("bevy_render cannot compile for a 16-bit platform.");

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! Provides scene definition, instantiation and serialization/deserialization. //! Provides scene definition, instantiation and serialization/deserialization.
//! //!

View file

@ -1,6 +1,10 @@
// FIXME(3492): remove once docs are ready // FIXME(3492): remove once docs are ready
#![allow(missing_docs)] #![allow(missing_docs)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! Provides 2D sprite rendering functionality. //! Provides 2D sprite rendering functionality.
mod bundle; mod bundle;

View file

@ -1,5 +1,9 @@
#![doc = include_str!("../README.md")] #![doc = include_str!("../README.md")]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
mod slice; mod slice;
pub use slice::{ParallelSlice, ParallelSliceMut}; pub use slice::{ParallelSlice, ParallelSliceMut};

View file

@ -1,6 +1,10 @@
// FIXME(3492): remove once docs are ready // FIXME(3492): remove once docs are ready
#![allow(missing_docs)] #![allow(missing_docs)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
mod error; mod error;
mod font; mod font;

View file

@ -1,5 +1,9 @@
#![doc = include_str!("../README.md")] #![doc = include_str!("../README.md")]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
/// Common run conditions /// Common run conditions
pub mod common_conditions; pub mod common_conditions;

View file

@ -1,5 +1,9 @@
#![doc = include_str!("../README.md")] #![doc = include_str!("../README.md")]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
pub mod commands; pub mod commands;
/// The basic components of the transform crate /// The basic components of the transform crate

View file

@ -1,6 +1,10 @@
// FIXME(3492): remove once docs are ready // FIXME(3492): remove once docs are ready
#![allow(missing_docs)] #![allow(missing_docs)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! This crate contains Bevy's UI system, which can be used to create UI for both 2D and 3D games //! This crate contains Bevy's UI system, which can be used to create UI for both 2D and 3D games
//! # Basic usage //! # Basic usage

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! General utilities for first-party [Bevy] engine crates. //! General utilities for first-party [Bevy] engine crates.
//! //!

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! `bevy_window` provides a platform-agnostic interface for windowing in Bevy. //! `bevy_window` provides a platform-agnostic interface for windowing in Bevy.
//! //!

View file

@ -1,4 +1,8 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
)]
//! `bevy_winit` provides utilities to handle window creation and the eventloop through [`winit`] //! `bevy_winit` provides utilities to handle window creation and the eventloop through [`winit`]
//! //!