-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Add bevy_dylib to force dynamic linking of bevy #808
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
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| [package] | ||
| name = "bevy_dylib" | ||
| version = "0.3.0" | ||
| edition = "2018" | ||
| authors = [ | ||
| "Bevy Contributors <bevyengine@gmail.com>", | ||
| "Carter Anderson <mcanders1@gmail.com>", | ||
| ] | ||
| description = "Force the Bevy Engine to be dynamically linked for faster linking" | ||
| homepage = "https://bevyengine.org" | ||
| repository = "https://github.com/bevyengine/bevy" | ||
| license = "MIT" | ||
| keywords = ["bevy"] | ||
|
|
||
| [lib] | ||
| crate-type = ["dylib"] | ||
|
|
||
| [dependencies] | ||
| bevy_internal = { path = "../bevy_internal", version = "0.3.0", default-features = false } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| //! 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. | ||
|
|
||
| // Force linking of the main bevy crate | ||
| #[allow(unused_imports)] | ||
| #[allow(clippy::single_component_path_imports)] | ||
| use bevy_internal; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,4 +13,4 @@ proc-macro = true | |
| syn = "1.0" | ||
| quote = "1.0" | ||
| proc-macro2 = "1.0" | ||
| proc-macro-crate = "0.1.5" | ||
| find-crate = "0.5" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| [package] | ||
| name = "bevy_internal" | ||
| version = "0.3.0" | ||
| edition = "2018" | ||
| authors = [ | ||
| "Bevy Contributors <bevyengine@gmail.com>", | ||
| "Carter Anderson <mcanders1@gmail.com>", | ||
| ] | ||
| description = "An internal Bevy crate used to facilitate optional dynamic linking via the 'dynamic' feature" | ||
| homepage = "https://bevyengine.org" | ||
| repository = "https://github.com/bevyengine/bevy" | ||
| license = "MIT" | ||
| keywords = ["game", "engine", "gamedev", "graphics", "bevy"] | ||
| categories = ["game-engines", "graphics", "gui", "rendering"] | ||
|
|
||
| [features] | ||
| profiler = ["bevy_ecs/profiler", "bevy_diagnostic/profiler"] | ||
| wgpu_trace = ["bevy_wgpu/trace"] | ||
|
|
||
| # Image format support for texture loading (PNG and HDR are enabled by default) | ||
| hdr = ["bevy_render/hdr"] | ||
| png = ["bevy_render/png"] | ||
|
|
||
| # Audio format support (MP3 is enabled by default) | ||
| flac = ["bevy_audio/flac"] | ||
| mp3 = ["bevy_audio/mp3"] | ||
| vorbis = ["bevy_audio/vorbis"] | ||
| wav = ["bevy_audio/wav"] | ||
|
|
||
| serialize = ["bevy_input/serialize"] | ||
|
|
||
| # Display server protocol support (X11 is enabled by default) | ||
| wayland = ["bevy_winit/wayland"] | ||
| x11 = ["bevy_winit/x11"] | ||
|
|
||
| [dependencies] | ||
| # bevy | ||
| bevy_app = { path = "../bevy_app", version = "0.3.0" } | ||
| bevy_asset = { path = "../bevy_asset", version = "0.3.0" } | ||
| bevy_type_registry = { path = "../bevy_type_registry", version = "0.3.0" } | ||
| bevy_core = { path = "../bevy_core", version = "0.3.0" } | ||
| bevy_diagnostic = { path = "../bevy_diagnostic", version = "0.3.0" } | ||
| bevy_ecs = { path = "../bevy_ecs", version = "0.3.0" } | ||
| bevy_input = { path = "../bevy_input", version = "0.3.0" } | ||
| bevy_math = { path = "../bevy_math", version = "0.3.0" } | ||
| bevy_property = { path = "../bevy_property", version = "0.3.0" } | ||
| bevy_scene = { path = "../bevy_scene", version = "0.3.0" } | ||
| bevy_transform = { path = "../bevy_transform", version = "0.3.0" } | ||
| bevy_utils = { path = "../bevy_utils", version = "0.3.0" } | ||
| bevy_window = { path = "../bevy_window", version = "0.3.0" } | ||
| bevy_tasks = { path = "../bevy_tasks", version = "0.3.0" } | ||
| # bevy (optional) | ||
| bevy_audio = { path = "../bevy_audio", optional = true, version = "0.3.0" } | ||
| bevy_gltf = { path = "../bevy_gltf", optional = true, version = "0.3.0" } | ||
| bevy_pbr = { path = "../bevy_pbr", optional = true, version = "0.3.0" } | ||
| bevy_render = { path = "../bevy_render", optional = true, version = "0.3.0" } | ||
| bevy_dynamic_plugin = { path = "../bevy_dynamic_plugin", optional = true, version = "0.3.0" } | ||
| bevy_sprite = { path = "../bevy_sprite", optional = true, version = "0.3.0" } | ||
| bevy_text = { path = "../bevy_text", optional = true, version = "0.3.0" } | ||
| bevy_ui = { path = "../bevy_ui", optional = true, version = "0.3.0" } | ||
| bevy_wgpu = { path = "../bevy_wgpu", optional = true, version = "0.3.0" } | ||
| bevy_winit = { path = "../bevy_winit", optional = true, version = "0.3.0" } | ||
| bevy_gilrs = { path = "../bevy_gilrs", optional = true, version = "0.3.0" } | ||
|
|
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.