bevyengine/bevy
bevy_dylib
A single-file crate that re-exports bevy as a cdylib. Used to enable dynamic linking for fast iterative compiles during development.
Purpose
When the dynamic_linking feature is on, the bevy umbrella crate's src/lib.rs adds use bevy_dylib;. Cargo builds bevy_dylib as a shared library (.dll/.so/.dylib) and links the rest of the project against it. Subsequent rebuilds only relink against the dylib instead of recompiling the whole engine.
This is purely a development optimization — you do not ship a dynamic_linking build to production.
Directory layout
crates/bevy_dylib/src/
└── lib.rs # `pub use bevy_internal::*;`Key abstractions
| Symbol | File | Description |
|---|---|---|
pub use bevy_internal::* |
crates/bevy_dylib/src/lib.rs |
The whole point of the crate. |
Cargo.toml sets crate-type = ["dylib"] so cargo emits a shared library.
Integration points
- Depends on:
bevy_internal. - Used by: The
dynamic_linkingcargo feature on the top-levelbevycrate.
Entry points for modification
- Don't. The whole crate is one re-export and a
Cargo.toml. If you need to change anything, you probably actually want to changebevy_internal.
See also
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.