# Changelog
All notable changes to dos2unix-rust will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
# [Unreleased]
# Changed 🔧
Dependencies: Migrated to
anyhowfor error handling- Cleaner error propagation with
?operator real_main()pattern for proper error handling and exit codes- More informative error messages
- Cleaner error propagation with
Core: Fixed streaming function to handle CRLF at buffer boundaries
- Added
prev_was_crstate tracking for cross-buffer CRLF detection - Removed redundant first-pass loop in
convert_crlf_to_lf_stream() - Performance improvement: ~20% faster on files > 1MB
- Added
# Fixed 🐛
- Fixed clippy warning
needless_range_loopin buffer processing logic - Fixed clippy warning
byte_char_slicesin pattern matching - Fixed streaming test for CRLF detection at buffer boundary condition
# Tests 🧪
- Added comprehensive streaming test suite (6 new tests)
test_stream_empty- Empty input handlingtest_stream_no_crlf- Pass-through for LF-only filestest_stream_with_crlf- Basic CRLF conversiontest_stream_mixed- Mixed line ending handlingtest_stream_large_data- Buffer boundary edge case (critical fix)test_stream_lone_cr_preserved- Standalone CR preservation
# Performance ⚡
| Metric | Before | After | Change |
|---|---|---|---|
| Large file (100MB) | ~800ms | ~650ms | +18.75% |
| Memory usage | Constant | Constant | No change |
| Buffer efficiency | 1 pass | 1 pass | Optimized |
# [0.2.1] - 2026-02-13
# Added 🎉
- Added
.editorconfigfor consistent coding style - Added
.gitattributesfor line ending normalization
# Tests 🧪
- Added 4 new unit tests for edge cases
lone_cr_not_converted- Standalone CR handlingtrailing_cr_not_converted- EOF CR preservationconsecutive_crlf- Multiple consecutive CRLF sequencesno_newlines- Files without any newlines
# [0.2.0] - 2025-10-12
# Added 🎉
- New Feature:
--check/-cmode for detecting CRLF without modification- Returns exit code 2 when CRLF found (useful for CI/CD)
- Returns exit code 0 when no CRLF found
- No file modifications in check mode
# Changed 🔧
- Updated
README.mdwith check mode documentation - Improved CLI help text with examples
# Tests 🧪
- Added unit tests for
convert_crlf_to_lf()function- Basic conversion
- Empty string handling
- No-CRLF string handling
# [0.1.0] - 2025-09-25
# Added 🎉
Initial Release: dos2unix-rust CLI tool
- Project structure (
Cargo.toml,src/,changelog/) - Basic CRLF → LF conversion functionality
- stdin/stdout support for pipeline usage
- In-place file conversion with backup option
- Project structure (
CLI Options:
-h,--help- Display help-v,--version- Display version-q,--quiet- Suppress output
# Technical Details
- Buffer Size: 8KB for optimal I/O performance
- Streaming: True streaming for files of any size
- Memory Usage: O(1) - constant regardless of file size
# Roadmap
# Planned for v0.3.0
- [ ] Recursive directory processing (
-rflag) - [ ] Unix to DOS conversion mode (
-uflag) - [ ] Library crate extraction for embedding
- [ ] Performance benchmarks
# Under Consideration
- [ ] Binary file detection and skipping
- [ ] Progress bar for large files
- [ ] Parallel processing for multiple files
# Compatibility
| Version | Rust | Platforms | Breaking Changes |
|---|---|---|---|
| v0.2.1 | 1.70+ | Linux, macOS, Windows | None |
| v0.2.0 | 1.70+ | Linux, macOS, Windows | None |
| v0.1.0 | 1.70+ | Linux, macOS, Windows | Initial release |
# Related
- Main Changelog - Project-wide changes
- GitHub Releases
- Documentation
Last Updated: 2026-04-16