aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cargo/config_fast_builds.toml (renamed from .cargo/config_fast_builds)45
-rw-r--r--azalea-client/tests/move_and_despawn_entity.rs11
-rw-r--r--azalea/README.md2
3 files changed, 31 insertions, 27 deletions
diff --git a/.cargo/config_fast_builds b/.cargo/config_fast_builds.toml
index 9f370141..06620164 100644
--- a/.cargo/config_fast_builds
+++ b/.cargo/config_fast_builds.toml
@@ -1,33 +1,46 @@
-# This file was borrowed from Bevy: https://github.com/bevyengine/bevy/blob/main/.cargo/config_fast_builds
+# This file is based on Bevy's fast builds config: https://github.com/bevyengine/bevy/blob/main/.cargo/config_fast_builds.toml
# Add the contents of this file to `config.toml` to enable "fast build" configuration. Please read the notes below.
-# NOTE: For maximum performance, build using a nightly compiler
-# If you are using rust stable, remove the "-Zshare-generics=y" below.
-
[target.x86_64-unknown-linux-gnu]
linker = "clang"
-rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zshare-generics=y"]
+rustflags = [
+ # LLD linker
+ #
+ # You may need to install it:
+ #
+ # - Ubuntu: `sudo apt-get install lld clang`
+ # - Fedora: `sudo dnf install lld clang`
+ # - Arch: `sudo pacman -S lld clang`
+ "-Clink-arg=-fuse-ld=lld",
+
+ # Mold linker
+ #
+ # You may need to install it:
+ #
+ # - Ubuntu: `sudo apt-get install mold clang`
+ # - Fedora: `sudo dnf install mold clang`
+ # - Arch: `sudo pacman -S mold clang`
+ # "-Clink-arg=-fuse-ld=mold",
+
+ # Nightly
+ "-Zshare-generics=y",
+]
# NOTE: you must install [Mach-O LLD Port](https://lld.llvm.org/MachO/index.html) on mac. you can easily do this by installing llvm which includes lld with the "brew" package manager:
# `brew install llvm`
[target.x86_64-apple-darwin]
-rustflags = [
- "-C",
- "link-arg=-fuse-ld=/usr/local/opt/llvm/bin/ld64.lld",
- "-Zshare-generics=y",
-]
+rustflags = ["-Zshare-generics=y"]
[target.aarch64-apple-darwin]
-rustflags = [
- "-C",
- "link-arg=-fuse-ld=/opt/homebrew/opt/llvm/bin/ld64.lld",
- "-Zshare-generics=y",
-]
+rustflags = ["-Zshare-generics=y"]
[target.x86_64-pc-windows-msvc]
linker = "rust-lld.exe"
-rustflags = ["-Zshare-generics=n"]
+rustflags = [
+ # This needs to be off if you use dynamic linking on Windows.
+ "-Zshare-generics=n",
+]
# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only'
# In most cases the gains are negligible, but if you are on macos and have slow compile times you should see significant gains.
diff --git a/azalea-client/tests/move_and_despawn_entity.rs b/azalea-client/tests/move_and_despawn_entity.rs
index 080ca903..09d901bc 100644
--- a/azalea-client/tests/move_and_despawn_entity.rs
+++ b/azalea-client/tests/move_and_despawn_entity.rs
@@ -25,9 +25,7 @@ fn test_move_and_despawn_entity() {
ResourceLocation::new("azalea:overworld"),
));
- for x in 0..=10 {
- simulation.receive_packet(make_basic_empty_chunk(ChunkPos::new(x, 0), (384 + 64) / 16));
- }
+ simulation.receive_packet(make_basic_empty_chunk(ChunkPos::new(0, 0), (384 + 64) / 16));
simulation.tick();
simulation.receive_packet(make_basic_add_entity(EntityKind::Cow, 123, (0.5, 64., 0.5)));
@@ -47,11 +45,4 @@ fn test_move_and_despawn_entity() {
entity_ids: vec![MinecraftEntityId(123)],
});
simulation.tick();
-
- // make sure it's despawned
- let mut cow_query = simulation.app.world_mut().query_filtered::<(), With<Cow>>();
- let cow_iter = cow_query.iter(simulation.app.world());
- assert_eq!(cow_iter.count(), 0, "cow should be despawned");
-
- simulation.tick();
}
diff --git a/azalea/README.md b/azalea/README.md
index 83ff0d49..26a06dde 100644
--- a/azalea/README.md
+++ b/azalea/README.md
@@ -15,7 +15,7 @@ Then, use one of the following commands to add Azalea to your project:
## Optimization
For faster compile times, create a `.cargo/config.toml` file in your project and copy
-[this file](https://github.com/azalea-rs/azalea/blob/main/.cargo/config_fast_builds)
+[this file](https://github.com/azalea-rs/azalea/blob/main/.cargo/config_fast_builds.toml)
into it. You may have to install the LLD linker.
For faster performance in debug mode, add the following code to your