feat(cli): port file I/O preferences to Rust

Move fileio preference and context allocation, defaults, setters, and small
query helpers into Rust while keeping the actual file operations in C. Keep
the C structs and ABI declarations as anchors, and make the CLI build track
the new Rust source.

Test Plan:
- rustfmt +nightly --check --edition 2021 rust/src/fileio_prefs.rs rust/cli/src/lib.rs
- RUSTC_WRAPPER= CARGO_BUILD_RUSTC_WRAPPER= cargo test --manifest-path rust/cli/Cargo.toml
- RUSTC_WRAPPER= CARGO_BUILD_RUSTC_WRAPPER= cargo clippy --manifest-path rust/cli/Cargo.toml --all-targets -- -D warnings
- git diff --cached --check
This commit is contained in:
2026-07-12 10:39:35 +02:00
parent 6a9b2d30b5
commit 60877175a4
4 changed files with 716 additions and 227 deletions
+3
View File
@@ -2,6 +2,9 @@
mod benchfn;
#[path = "../../src/datagen.rs"]
mod datagen;
#[cfg(feature = "cli")]
#[path = "../../src/fileio_prefs.rs"]
mod fileio_prefs;
#[path = "../../src/lorem.rs"]
mod lorem;
#[path = "../../src/timefn.rs"]