Skip to content

Improve security, optimize performance, and update documentation - #2

Merged
Flash303 merged 31 commits into
mainfrom
opt/general
Oct 25, 2026
Merged

Flash303 merged 31 commits into
mainfrom
opt/general

Conversation

@Flash303

Copy link
Copy Markdown
Owner

This pull request marks the 1.0 release of minecraft-pinger and introduces several breaking changes, performance improvements, and new features, along with updated documentation and a new benchmarking example. The highlights include a new API for JavaPingConfig, improved error handling, performance and memory optimizations, and enhanced documentation for migration and advanced usage.

Breaking API Changes and Migration (Major Version Release):

  • Bumped crate version to 1.0.0 and updated all usage and documentation to reference the new version. [1] [2]
  • Changed JavaPingConfig::from(&PingConfigBuilder) to JavaPingConfig::from(&PingConfig), removing the to_builder() method. [1] [2]
  • Updated PingError variants for clarity and efficiency, e.g., BlockedEndpoint(String) → BlockedEndpoint(Vec<IpAddr>), and ReadPacket(String) → ReadPacket(&'static str).
  • BedrockPing::try_from now takes &str (with a TryFrom<String> shim for compatibility). [1] [2] [3]

Performance and Resource Improvements:

  • Optimized packet parsing and deserialization, reduced allocations, and introduced options to skip heavy fields (favicon, player.sample) for faster fleet scans. [1] [2] [3]
  • Added support for sharing a UDP socket for Bedrock scans, reducing port exhaustion and improving resource efficiency.

Documentation and Examples:

  • Expanded the README.md with migration notes, advanced configuration, performance benchmarks, and usage tips for efficient fleet scans. [1] [2] [3]
  • Added a new fleet benchmarking example (examples/bench_fleet.rs) for large-scale server ping testing.

Dependency and Internal Cleanups:

  • Removed the unused rand dependency; Bedrock GUIDs now use an atomic counter. [1] [2]
  • Refactored and clarified Bedrock packet parsing logic and added comprehensive tests for the new API. [1] [2] [3] [4]

These changes modernize the API, improve performance and reliability, and provide clearer documentation for users upgrading from 0.x to 1.0.

@Flash303
Flash303 merged commit 90fadca into main Oct 25, 2026
5 checks passed
@Flash303
Flash303 deleted the opt/general branch October 25, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant