github zuisong/rs-fortune v0.10.0

9 hours ago

Release Notes 0.10.0

This release brings significant performance improvements and modernizes the codebase.

๐Ÿš€ Performance & Architecture

  • Streaming I/O & Reservoir Sampling: Completely rewrote the fortune parsing engine.
    • Memory Efficiency: The tool now processes files of any size with constant O(1) memory usage, thanks to reservoir sampling. It no longer loads the entire file into memory.
    • Streaming: Fortunes are read and sampled on-the-fly using BufRead, improving responsiveness.
  • Refactored Core: Logic for fortune selection has been decoupled from output handling, making the code more robust and testable.

๐Ÿ›  Maintenance & Modernization

  • Rust 2024 Edition: Updated the project to use the Rust 2024 edition.
  • Dependency Updates: Updated predicates and other dev dependencies.
  • Code Cleanup: Removed legacy authors field and simplified module declarations.

๐Ÿงช Testing

  • Enhanced Test Suite: Added more rigorous integration tests (cli_tests.rs) covering actual content verification, edge cases, and CLI argument precedence.

Don't miss a new rs-fortune release

NewReleases is sending notifications on new releases.