#bevy #linker

bevy_dylib

Force the Bevy Engine to be dynamically linked for faster linking

46 releases

Uses new Rust 2024

0.17.3 Nov 17, 2025
0.17.0 Sep 30, 2025
0.16.1 May 30, 2025
0.16.0-rc.3 Mar 31, 2025
0.4.0 Dec 19, 2020

#2975 in Game dev

Download history 10724/week @ 2025-08-13 11471/week @ 2025-08-20 13160/week @ 2025-08-27 12065/week @ 2025-09-03 15073/week @ 2025-09-10 14098/week @ 2025-09-17 15559/week @ 2025-09-24 13169/week @ 2025-10-01 9956/week @ 2025-10-08 16537/week @ 2025-10-15 14859/week @ 2025-10-22 13595/week @ 2025-10-29 13859/week @ 2025-11-05 13974/week @ 2025-11-12 15342/week @ 2025-11-19 13718/week @ 2025-11-26

58,691 downloads per month
Used in 86 crates (via bevy)

MIT/Apache

78KB
310 lines

Forces dynamic linking of Bevy.

Dynamic linking causes Bevy to be built and linked as a dynamic library. This will make incremental builds compile much faster.

Warning

Do not enable this feature for release builds because this would require you to ship libstd.so and libbevy_dylib.so with your game.

Enabling dynamic linking

The easiest way to enable dynamic linking is to use the --features bevy/dynamic_linking flag when using the cargo run command:

cargo run --features bevy/dynamic_linking

The unrecommended way

It is also possible to enable the dynamic_linking feature inside of the Cargo.toml file. This is unrecommended because it requires you to remove this feature every time you want to create a release build to avoid having to ship additional files with your game.

To enable dynamic linking inside of the Cargo.toml file add the dynamic_linking feature to the bevy dependency:

features = ["dynamic_linking"]

The manual way

Manually enabling dynamic linking is achieved by adding bevy_dylib as a dependency and adding the following code to the main.rs file:

#[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 to avoid having to ship additional files with your game:

#[allow(unused_imports)]
#[cfg(debug_assertions)] // new
use bevy_dylib;

Bevy Dynamic Library

License Crates.io Downloads Docs Discord

Dependencies

~19–33MB
~543K SLoC