mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Removed duplicate crates added so there could be dynamic crates, now compiled with crate type specified instead.
This commit is contained in:
parent
23c51af437
commit
cfeb197f85
21
Cargo.lock
generated
21
Cargo.lock
generated
@ -6840,13 +6840,6 @@ dependencies = [
|
||||
"veloren-common-ecs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "veloren-server-agent-dyn"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"veloren-server-agent",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "veloren-server-cli"
|
||||
version = "0.13.0"
|
||||
@ -6964,13 +6957,6 @@ dependencies = [
|
||||
"veloren-common-dynlib",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "veloren-voxygen-anim-dyn"
|
||||
version = "0.10.0"
|
||||
dependencies = [
|
||||
"veloren-voxygen-anim",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "veloren-voxygen-egui"
|
||||
version = "0.9.0"
|
||||
@ -6983,13 +6969,6 @@ dependencies = [
|
||||
"veloren-common-dynlib",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "veloren-voxygen-egui-dyn"
|
||||
version = "0.9.0"
|
||||
dependencies = [
|
||||
"veloren-voxygen-egui",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "veloren-voxygen-i18n"
|
||||
version = "0.13.0"
|
||||
|
@ -17,14 +17,11 @@ members = [
|
||||
"plugin/rt",
|
||||
"server",
|
||||
"server/agent",
|
||||
"server/agent/dyn",
|
||||
"server-cli",
|
||||
"voxygen",
|
||||
"voxygen/anim",
|
||||
"voxygen/anim/dyn",
|
||||
"voxygen/i18n",
|
||||
"voxygen/egui",
|
||||
"voxygen/egui/dyn",
|
||||
"world",
|
||||
"network",
|
||||
"network/protocol",
|
||||
|
@ -238,11 +238,15 @@ fn compile(dyn_package: &str) -> bool {
|
||||
let output = Command::new("cargo")
|
||||
.stderr(Stdio::inherit())
|
||||
.stdout(Stdio::inherit())
|
||||
.arg("build")
|
||||
.arg("rustc")
|
||||
.arg("--package")
|
||||
.arg(dyn_package)
|
||||
.arg("--features")
|
||||
.arg(format!("{}/be-dyn-lib", dyn_package))
|
||||
.arg("-Z")
|
||||
.arg("unstable-options")
|
||||
.arg("--crate-type")
|
||||
.arg("dylib")
|
||||
.output()
|
||||
.unwrap();
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
[package]
|
||||
authors = ["Samuel Keiffer <samuelkeiffer@gmail.com>"]
|
||||
edition = "2021"
|
||||
name = "veloren-server-agent-dyn"
|
||||
version = "0.1.0"
|
||||
|
||||
[lib]
|
||||
crate-type = ["dylib"]
|
||||
|
||||
[features]
|
||||
be-dyn-lib = ["veloren-server-agent/be-dyn-lib"]
|
||||
|
||||
[dependencies]
|
||||
veloren-server-agent = { path = "../" }
|
@ -1,14 +0,0 @@
|
||||
//! This crate hacks around the inability to dynamically specify the
|
||||
//! `crate-type` for cargo to build.
|
||||
//!
|
||||
//! For more details on the issue this is a decent starting point: https://github.com/rust-lang/cargo/pull/8789
|
||||
//!
|
||||
//! This crate avoids use building the dynamic lib when it isn't needed and the
|
||||
//! same with the non dynamic build. Additionally, this allows compilation to
|
||||
//! start earlier since a cdylib doesn't pipeline with it's dependencies.
|
||||
//!
|
||||
//! NOTE: the `be-dyn-lib` feature must be used for this crate to be useful, it
|
||||
//! is not on by default because this causes cargo to switch the feature on in
|
||||
//! the anim crate when compiling the static lib into voxygen.
|
||||
#[cfg(feature = "be-dyn-lib")]
|
||||
pub use veloren_server_agent::*;
|
@ -17,7 +17,7 @@ use {common_dynlib::LoadedLib, lazy_static::lazy_static, std::sync::Arc, std::sy
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
lazy_static! {
|
||||
pub static ref LIB: Arc<Mutex<Option<LoadedLib>>> =
|
||||
common_dynlib::init("veloren-server-agent", "veloren-server-agent-dyn", "agent");
|
||||
common_dynlib::init("veloren-server-agent", "veloren-server-agent", "agent");
|
||||
}
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
|
@ -1,17 +0,0 @@
|
||||
[package]
|
||||
authors = ["Imbris <imbrisf@gmail.com>"]
|
||||
edition = "2021"
|
||||
name = "veloren-voxygen-anim-dyn"
|
||||
version = "0.10.0"
|
||||
|
||||
[lib]
|
||||
# Using dylib instead of cdylib increases the size 3 -> 13 mb
|
||||
# but it is needed to expose the symbols from the anim crate :(
|
||||
# effect on compile time appears to be insignificant
|
||||
crate-type = ["dylib"]
|
||||
|
||||
[features]
|
||||
be-dyn-lib = ["veloren-voxygen-anim/be-dyn-lib"]
|
||||
|
||||
[dependencies]
|
||||
veloren-voxygen-anim = { path = "../" }
|
@ -1,14 +0,0 @@
|
||||
//! This crate hacks around the inability to dynamically specify the
|
||||
//! `crate-type` for cargo to build.
|
||||
//!
|
||||
//! For more details on the issue this is a decent starting point: https://github.com/rust-lang/cargo/pull/8789
|
||||
//!
|
||||
//! This crate avoids use building the dynamic lib when it isn't needed and the
|
||||
//! same with the non dynamic build. Additionally, this allows compilation to
|
||||
//! start earlier since a cdylib doesn't pipeline with it's dependencies.
|
||||
//!
|
||||
//! NOTE: the `be-dyn-lib` feature must be used for this crate to be useful, it
|
||||
//! is not on by default because this causes cargo to switch the feature on in
|
||||
//! the anim crate when compiling the static lib into voxygen.
|
||||
#[cfg(feature = "be-dyn-lib")]
|
||||
pub use veloren_voxygen_anim::*;
|
@ -99,7 +99,7 @@ pub type Bone = Transform<f32, f32, f32>;
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
lazy_static! {
|
||||
static ref LIB: Arc<Mutex<Option<LoadedLib>>> =
|
||||
common_dynlib::init("veloren-voxygen-anim", "veloren-voxygen-anim-dyn", "anim");
|
||||
common_dynlib::init("veloren-voxygen-anim", "veloren-voxygen-anim", "anim");
|
||||
}
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
|
@ -1,14 +0,0 @@
|
||||
[package]
|
||||
authors = ["Imbris <imbrisf@gmail.com>"]
|
||||
edition = "2021"
|
||||
name = "veloren-voxygen-egui-dyn"
|
||||
version = "0.9.0"
|
||||
|
||||
[lib]
|
||||
crate-type = ["dylib"]
|
||||
|
||||
[features]
|
||||
be-dyn-lib = ["veloren-voxygen-egui/be-dyn-lib"]
|
||||
|
||||
[dependencies]
|
||||
veloren-voxygen-egui = { path = "../" }
|
@ -1,14 +0,0 @@
|
||||
//! This crate hacks around the inability to dynamically specify the
|
||||
//! `crate-type` for cargo to build.
|
||||
//!
|
||||
//! For more details on the issue this is a decent starting point: https://github.com/rust-lang/cargo/pull/8789
|
||||
//!
|
||||
//! This crate avoids use building the dynamic lib when it isn't needed and the
|
||||
//! same with the non dynamic build. Additionally, this allows compilation to
|
||||
//! start earlier since a cdylib doesn't pipeline with it's dependencies.
|
||||
//!
|
||||
//! NOTE: the `be-dyn-lib` feature must be used for this crate to be useful, it
|
||||
//! is not on by default because this causes cargo to switch the feature on in
|
||||
//! the anim crate when compiling the static lib into voxygen.
|
||||
#[cfg(feature = "be-dyn-lib")]
|
||||
pub use veloren_voxygen_egui::*;
|
@ -37,7 +37,7 @@ use {
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
lazy_static! {
|
||||
static ref LIB: Arc<Mutex<Option<LoadedLib>>> =
|
||||
common_dynlib::init("veloren-voxygen-egui", "veloren-voxygen-egui-dyn", "egui");
|
||||
common_dynlib::init("veloren-voxygen-egui", "veloren-voxygen-egui", "egui");
|
||||
}
|
||||
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
|
Loading…
Reference in New Issue
Block a user