Commit graph

618 commits

Author SHA1 Message Date
775fcb2d1b
treewide: cargo fmt with 1.85 2025-03-13 21:50:50 +01:00
7bba5bae55
Update to Rust 2024
With bincode 2, we require rust 1.85 anyways, so we might as well
upgrade, too.
2025-03-13 21:50:50 +01:00
5c85687554
Clean up dependency features 2025-03-13 21:50:50 +01:00
708fb9645d
core/region_processor: refactor
Separate configuration and mutable state, also allowing to avoid a few
mem::take().
2025-03-13 21:50:50 +01:00
53a0f24600
treewide: update to bincode 2
Consistently use bincode's Encode/Decode to avoid issues with
incompatible serde features. Support for storing some temporary files as
JSON is removed.

The size of the "processed" directory is reduced by ~8% with the new
default encoding of bincode 2. Performance is more or less unaffected.
2025-03-13 21:50:50 +01:00
404ad74235
core: deserialize biome list into Vec
Only use IndexSet for deduplication while processing the biome; when
deserializing, no deduplication is required, so using a Vec is faster
(besides IndexSet missing non-serde support for bincode 2).
2025-03-13 21:50:50 +01:00
deb232ddf3
Update dependencies 2025-03-13 21:50:50 +01:00
fbdd5ed457
Dockerfile: switch back to docker.io/library/rust:alpine image
bincode 2 required Rust 1.85, so our options are to switch to Alpine
edge or to use the rust image. While using the rust image results in a
statically linked binary, this does not actually increase the size of
the image, as we were already using jemalloc, so almost nothing of libc
is actually used.
2025-03-13 21:50:50 +01:00
b1c0f316cb
Merge pull request #70 from neocturne/seagrass
resource: make seagrass opaque
2025-02-28 16:27:32 +01:00
7686996fd3
resource: make seagrass opaque
See changelog for rationale.
2025-02-28 16:16:29 +01:00
b8a5d1580b
Merge pull request #69 from neocturne/zlib-rs
Switch to zlib-rs
2025-02-28 13:54:53 +01:00
f8c8ca78ba
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.
2025-02-28 12:43:47 +01:00
40bc6cd2a9
Update dependencies 2025-02-28 11:55:42 +01:00
5ee8e493d4
docker-compose.yml: mount volumes read-only where appropriate 2025-02-25 18:23:54 +01:00
6e2f2697fc
Merge pull request #68 from neocturne/docker
docker: set ARG after apk add
2025-02-22 11:34:55 +01:00
24c266fc78
docker: set ARG after apk add
Allow reusing apk add layer when MINEDMAP_VERSION has changed.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2025-02-22 11:29:10 +01:00
0a08e8cc46
Merge pull request #67 from neocturne/docker
Docker image improvements and docker-compose.yml example
2025-02-22 11:23:51 +01:00
90f2c5fdd0
docker: add example docker-compose.yml 2025-02-22 11:18:03 +01:00
8cb1eee60b
docker, ci: fix --version output
When building the docker image manually, MINEDMAP_VERSION needs to be
set explicitly to get a proper version string.
2025-02-22 11:15:47 +01:00
282f62fc30
docker: run minedmap as unpriviledged user 2025-02-22 04:02:10 +01:00
7bc15f97de
docker: viewer: use nginx:alpine-slim as base 2025-02-22 03:13:43 +01:00
901489dbc3
Merge pull request #66 from neocturne/docker
Watch mode and Docker publish
2025-02-21 21:52:32 +01:00
dba3dd551e
ci: build Docker images, publish to GHCR 2025-02-21 21:43:05 +01:00
850b1a668b
docker: use lowercase stage name 2025-02-21 19:08:51 +01:00
3b5ce82873
docker: include Alpine base tools, tini
Including tini fixes forwarding signals to MinedMap, allowing to
interrupt it using Ctrl-C. The base tools may be used to add a wrapper
script to configure MinedMap with environment variables.

As the Alpine base is included now, we can switch from the rust:alpine
image to alpine:latest, resulting in MinedMap to be linked dynamically.
2025-02-21 10:55:50 +01:00
cb0aa235db
docker: move viewer Dockerfile to viewer subdirectory 2025-02-21 10:55:50 +01:00
d02ca9aea2
ci: update OS 2025-02-21 10:55:50 +01:00
c10e9e4902
Implement watch mode 2025-02-21 10:55:50 +01:00
37126f69fc
MetadataWriter: add fallback to level.dat_old
Looking at inotify dumps, it appears like because of bad implementation
choices, Minecraft's level.dat may not exist for a brief moment between
moving the old file to level.dat_old and moving a new version into place.

Add a fallback to level.dat_old, so generation will not fail if were
unlucky enough to hit this moment.
2025-02-21 10:55:50 +01:00
971afea727
Fix new clippy warnings 2025-02-21 10:55:50 +01:00
f661f854a4
Merge pull request #65 from neocturne/jemalloc
Add jemalloc and jemalloc-auto features
2025-02-12 20:51:51 +01:00
1d9be9a41c
Add jemalloc and jemalloc-auto features
Introduce the new features jemalloc (set jemalloc global allocator
unconditionally) and jemalloc-auto (set jemalloc global allocator on
musl-based targets to fix multithreaded performance, see [1]).

Because cargo does not support target-specific features or feature
defaults, the default is handled using a helper crate
minedmap-default-alloc.

[1] https://nickb.dev/blog/default-musl-allocator-considered-harmful-to-performance/
2025-02-12 20:34:09 +01:00
a25b3cdbd7
Merge pull request #64 from neocturne/fallback-biome
resource, world: implement fallback to plains for unknown biomes
2025-02-11 23:25:17 +01:00
d96bb727f7
ci: upgrade to upload-artifact v4 2025-02-11 23:04:08 +01:00
0dd36a409a
Update dependencies
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2025-02-11 23:03:33 +01:00
a10151a4f3
resource, world: implement fallback to plains for unknown biomes
Closes #63
2025-02-11 23:00:21 +01:00
d7fc95c950
README.md: fix size reduction estimate for WebP tiles
I accidentally measured the output size including the `processed`
directory for the previous numbers.
2025-01-11 02:10:00 +01:00
561a1e6577
minedmap 2.4.0 2025-01-11 01:54:53 +01:00
0bf1d46aad
minedmap-types 0.1.4 2025-01-11 01:53:05 +01:00
a2f0ad401d
CHANGELOG.md: fix missing word 2025-01-11 01:51:35 +01:00
ec309dc15f
Merge pull request #62 from neocturne/webp
core, viewer: add support for WebP output
2025-01-11 01:50:36 +01:00
6763e2b4ec
Update dependencies 2025-01-11 01:42:42 +01:00
c23b53a8c3
core, viewer: add support for WebP output
WebP can be selected by passing `--image-format webp` on the command
line. For typical Minecraft worlds, this results in a size reduction of
10-15% without increasing processing time.
2025-01-11 01:41:04 +01:00
bb11b29e92
Merge pull request #60 from neocturne/updates
Updates
2025-01-09 21:40:34 +01:00
28a191a23a
resource: ignore array size clippy warning
The const is used only once, so there is no reason not to inline it.
2025-01-09 21:09:48 +01:00
52572a9e81
Update dependencies 2025-01-09 20:57:12 +01:00
b9cd94b235
CHANGELOG.md: remove reference to Minecraft internals
Remove a sentence that refers to internal color names, as the
information is more confusing than helpful in a user-facing changlog.
2025-01-06 22:31:56 +01:00
f9954d1ce4
minedmap 2.3.1 2025-01-06 21:25:29 +01:00
a67bdb3b67
minedmap-resource 0.6.0 2025-01-06 21:25:20 +01:00
0a3f6d7765
Merge pull request #59 from neocturne/sign-colors
Sign color fixes
2025-01-06 21:24:46 +01:00