mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-04 17:23:33 +01:00
Switch from zlib-ng to zlib-rs
zlib-rs provides the same performance as zlib-ng with minedmap, while reducing the amount of C code and avoiding the external build dependency on CMake.
This commit is contained in:
parent
40bc6cd2a9
commit
f8c8ca78ba
6 changed files with 21 additions and 27 deletions
|
@ -45,6 +45,10 @@
|
|||
- Unknown biome types (from not yet supported or modded versions of Minecraft)
|
||||
will now use plains biome colors as a fallback instead of resulting in water,
|
||||
grass and foliage blocks to be rendered as transparent pixels
|
||||
- Switched from zlib-ng to zlib-rs
|
||||
|
||||
This should have no noticable effect on the usage of MinedMap, but avoids
|
||||
an external build dependency on CMake.
|
||||
|
||||
## [2.4.0] - 2025-01-11
|
||||
|
||||
|
|
27
Cargo.lock
generated
27
Cargo.lock
generated
|
@ -212,15 +212,6 @@ version = "0.7.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
|
||||
|
||||
[[package]]
|
||||
name = "cmake"
|
||||
version = "0.1.54"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "colorchoice"
|
||||
version = "1.0.3"
|
||||
|
@ -364,7 +355,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc"
|
||||
dependencies = [
|
||||
"crc32fast",
|
||||
"libz-ng-sys",
|
||||
"libz-rs-sys",
|
||||
"miniz_oxide",
|
||||
]
|
||||
|
||||
|
@ -609,13 +600,12 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "libz-ng-sys"
|
||||
version = "1.1.21"
|
||||
name = "libz-rs-sys"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7cee1488e961a80d172564fd6fcda11d8a4ac6672c06fe008e9213fa60520c2b"
|
||||
checksum = "902bc563b5d65ad9bba616b490842ef0651066a1a1dc3ce1087113ffcb873c8d"
|
||||
dependencies = [
|
||||
"cmake",
|
||||
"libc",
|
||||
"zlib-rs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -664,6 +654,7 @@ dependencies = [
|
|||
"clap",
|
||||
"enum-map",
|
||||
"fastnbt",
|
||||
"flate2",
|
||||
"futures-util",
|
||||
"git-version",
|
||||
"humantime",
|
||||
|
@ -1426,6 +1417,12 @@ version = "0.52.6"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
||||
|
||||
[[package]]
|
||||
name = "zlib-rs"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8b20717f0917c908dc63de2e44e97f1e6b126ca58d0e391cee86d504eb8fbd05"
|
||||
|
||||
[[package]]
|
||||
name = "zstd"
|
||||
version = "0.13.3"
|
||||
|
|
|
@ -42,6 +42,7 @@ bincode = "1.3.3"
|
|||
clap = { version = "4.1.4", features = ["derive", "wrap_help"] }
|
||||
enum-map = "2.7.3"
|
||||
fastnbt = "2.3.2"
|
||||
flate2 = { version = "1.1.0", features = ["zlib-rs"] }
|
||||
futures-util = "0.3.28"
|
||||
git-version = "0.3.5"
|
||||
humantime = "2.1.0"
|
||||
|
@ -67,7 +68,6 @@ tracing-subscriber = "0.3.17"
|
|||
zstd = "0.13.0"
|
||||
|
||||
[features]
|
||||
default = ["jemalloc-auto", "zlib-ng"]
|
||||
default = ["jemalloc-auto"]
|
||||
jemalloc-auto = ["dep:minedmap-default-alloc"]
|
||||
jemalloc = ["jemalloc-auto", "minedmap-default-alloc/jemalloc"]
|
||||
zlib-ng = ["minedmap-nbt/zlib-ng"]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
FROM docker.io/library/alpine:latest AS builder
|
||||
|
||||
WORKDIR /build
|
||||
RUN apk add --no-cache build-base cmake cargo
|
||||
RUN apk add --no-cache build-base cargo
|
||||
|
||||
ARG MINEDMAP_VERSION
|
||||
|
||||
|
|
|
@ -117,11 +117,6 @@ or newer). The following command can be used to build the current development ve
|
|||
cargo install --git 'https://github.com/neocturne/MinedMap.git'
|
||||
```
|
||||
|
||||
In addition, CMake is needed to build the zlib-ng library. If you do not have
|
||||
CMake installed, you can disable the zlib-ng feature by passing `--no-default-features`
|
||||
to cargo. A pure-Rust zlib implementation will be used, which is more portable,
|
||||
but slower than zlib-ng.
|
||||
|
||||
If you are looking for the older C++ implementation of the MinedMap tile renderer,
|
||||
see the [v1.19.1](https://github.com/neocturne/MinedMap/tree/v1.19.1) tag.
|
||||
|
||||
|
|
|
@ -11,12 +11,10 @@ repository.workspace = true
|
|||
anyhow = "1.0.75"
|
||||
bytemuck = "1.13.1"
|
||||
fastnbt = "2.4.4"
|
||||
flate2 = "1.0.27"
|
||||
flate2 = "1.1.0"
|
||||
minedmap-types = { version = "0.1.4", path = "../types" }
|
||||
serde = "1.0.183"
|
||||
|
||||
[features]
|
||||
zlib-ng = ["flate2/zlib-ng"]
|
||||
|
||||
[dev-dependencies]
|
||||
clap = { version = "4.3.23", features = ["derive"] }
|
||||
flate2 = { version = "1.1.0", features = ["zlib-rs"] }
|
||||
|
|
Loading…
Add table
Reference in a new issue