Skip to content

Commit aa4c71d

Browse files
authored
refactor(rust): Split large modules into modular structure (#29)
* Add Bytes alias to ByteArray parameters for consistency Add [Alias('Bytes')] to the -ByteArray parameter in: - ConvertFrom-ByteArrayToString - ConvertFrom-CompressedByteArrayToString This matches the existing pattern in ConvertFrom-ByteArrayToBase64 and ConvertFrom-ByteArrayToMemoryStream, providing a consistent API across all functions that accept byte array input. Fixes #25 * chore: Bump version to 2.0.6-alpha * refactor: modularize base64 into focused modules Split monolithic base64.rs (1,917 lines) into modular structure: - encoding.rs: encoding conversion helpers (301 lines) - string_ops.rs: string-based Base64 FFI functions (256 lines) - bytes_ops.rs: byte array-based Base64 FFI functions (156 lines) - mod.rs: module organization and re-exports (13 lines) Benefits: - Improved maintainability with clear separation of concerns - Tests co-located with implementation (Rust best practice) - Easier navigation with smaller, focused files - All 184 tests passing with no breaking changes * Optimize Rust dependencies with selective features and update to latest versions - Disable default features for all dependencies to reduce bloat - Enable only required features (std, alloc, rust_backend) - Update chrono 0.4.42 -> 0.4.43 - Update flate2 1.1.5 -> 1.1.8 - Pin exact versions for reproducible builds - All 184 tests pass * refactor(rust): Split encoding.rs into modular structure * refactor(rust): Split hash.rs into modular structure * refactor(rust): Split compression.rs into modular structure * style(rust): Apply cargo fmt formatting
1 parent 503ee9c commit aa4c71d

21 files changed

Lines changed: 3209 additions & 4567 deletions

lib/Cargo.lock

Lines changed: 4 additions & 128 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ name = "convert_core"
88
crate-type = ["cdylib"]
99

1010
[dependencies]
11-
base64 = "0.22"
12-
sha2 = "0.10"
13-
sha1 = "0.10"
14-
md-5 = "0.10"
15-
hmac = "0.12"
16-
flate2 = "1.0"
17-
percent-encoding = "2.3"
18-
chrono = "0.4"
11+
base64 = { version = "0.22.1", default-features = false, features = ["std"] }
12+
sha2 = { version = "0.10.9", default-features = false }
13+
sha1 = { version = "0.10.6", default-features = false }
14+
md-5 = { version = "0.10.6", default-features = false }
15+
hmac = { version = "0.12.1", default-features = false }
16+
flate2 = { version = "1.1.8", default-features = false, features = ["rust_backend"] }
17+
percent-encoding = { version = "2.3.2", default-features = false, features = ["alloc"] }
18+
chrono = { version = "0.4.43", default-features = false, features = ["std"] }
1919

2020
[dev-dependencies]
21-
criterion = "0.5"
22-
proptest = "1.4"
21+
criterion = "0.5.1"
22+
proptest = "1.9.0"

0 commit comments

Comments
 (0)