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

[Merged by Bors] - Updated bevy_dylib documentation and added missing_doc warning. #3515

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions crates/bevy_dylib/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
#![warn(missing_docs)]
#![allow(clippy::single_component_path_imports)]

//! Forces dynamic linking of Bevy.
//!
//! Dynamically linking Bevy makes the "link" step much faster. This can be achieved by adding
//! `bevy_dylib` as dependency and `#[allow(unused_imports)] use bevy_dylib` to `main.rs`. It is
//! recommended to disable the `bevy_dylib` dependency in release mode by adding
//! `#[cfg(debug_assertions)]` to the `use` statement. Otherwise you will have to ship `libstd.so`
//! and `libbevy_dylib.so` with your game.
//! `bevy_dylib` as a dependency and adding the following code to the `main.rs` file:
This conversation was marked as resolved.
Show resolved Hide resolved
//!
//! ```rust
//! #[allow(unused_imports)]
//! use bevy_dylib;
//! ```
//!
//! It is recommended to disable the `bevy_dylib` dependency in release mode by adding the
//! following code to the `use` statement:
//!
//! ```rust
//! #[allow(unused_imports)]
//! #[cfg(debug_assertions)] // new
//! use bevy_dylib;
//! ```
//!
//! If you don't do this you will have to ship `libstd.so` and `libbevy_dylib.so` with your game.

// Force linking of the main bevy crate
#[allow(unused_imports)]
Expand Down