Skip to content

chore: modernize project to Rust 2024 and update configurations#1

Open
fenris02 wants to merge 4 commits intofcami:mainfrom
fenris02:up-2026-03-26
Open

chore: modernize project to Rust 2024 and update configurations#1
fenris02 wants to merge 4 commits intofcami:mainfrom
fenris02:up-2026-03-26

Conversation

@fenris02
Copy link
Copy Markdown

  • Updated the project to the Rust 2024 edition and set MSRV to 1.91.
  • Added templates and configurations for linting, formatting, and licensing:
    • Added .clippy.toml, .rustfmt.toml, .dprint.json, .prettierrc, and .editorconfig.
    • Added .licensesnip for license header management and .typos.toml for spell checking.
  • Applied automated maintenance and code quality fixes:
    • Ran cargo fix and cargo clippy --fix.
    • Upgraded dependencies using cargo update and cargo upgrade.
    • Formatted the codebase with cargo fmt and dprint fmt.
  • Refined project lints in Cargo.toml:
    • Set unsafe_code to warn to allow cargo audit and cargo clippy to run with only warnings about unsafe usage.
    • Enabled pedantic clippy lints.
  • Documentation updates:
    • Added docs/analyze_this_project,_what_problems_can.md outlining architectural analysis and future improvements.
    • Generated docs/cargo-license.txt for dependency license tracking.

- Updated the project to the Rust 2024 edition and set MSRV to 1.91.
- Added templates and configurations for linting, formatting, and licensing:
  - Added `.clippy.toml`, `.rustfmt.toml`, `.dprint.json`, `.prettierrc`, and `.editorconfig`.
  - Added `.licensesnip` for license header management and `.typos.toml` for spell checking.
- Applied automated maintenance and code quality fixes:
  - Ran `cargo fix` and `cargo clippy --fix`.
  - Upgraded dependencies using `cargo update` and `cargo upgrade`.
  - Formatted the codebase with `cargo fmt` and `dprint fmt`.
- Refined project lints in `Cargo.toml`:
  - Set `unsafe_code` to `warn` to allow `cargo audit` and `cargo clippy` to run with only warnings about unsafe usage.
  - Enabled pedantic clippy lints.
- Documentation updates:
  - Added `docs/analyze_this_project,_what_problems_can.md` outlining architectural analysis and future improvements.
  - Generated `docs/cargo-license.txt` for dependency license tracking.
@fcami
Copy link
Copy Markdown
Owner

fcami commented Mar 26, 2026

hi @fenris02 thank you for the contribution! We currently need to be able to build with older Rust toolchain versions (down to what RHEL 8 provides). I will drop RHEL 8 soon, but that leaves RHEL 9. Can you please check if you can build your branch using the UBI steps in the readme?

d.johnson added 3 commits March 26, 2026 13:57
…ration

- Replaced `cargo test` with `cargo nextest run` across all testing commands.
- Added `.nextest.toml` configuration for customizable and efficient test execution.
…mplementations

- Added `from_bytes` methods for `McHeader`, `McRec`, and related types in `src/types.rs`.
- Replaced all `std::ptr::read_unaligned` usages with corresponding `from_bytes` calls.
- Improved error handling for parsing with detailed length checks and `Option`/`Result` usage.
- Added unit test support for `McPwdData` serialization and deserialization.
…cache file handling

- Replaced `memmap2::Mmap` with `Vec<u8>` for safer and more portable memory management.
- Updated `CacheFile` and related methods to work with in-memory buffers.
- Strengthened linter configuration by forbidding `unsafe_code` instead of warning.
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.

2 participants