**[IMPROVEMENT]** Port hex_to_int from C to Rust #1774
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Description
This PR ports the hex_to_int utility function from C (src/lib_ccx/utility.c) to Rust (src/rust/lib_ccxr/src/util/hex.rs) as part of the ongoing Rust migration effort.
Changes
Created src/rust/lib_ccxr/src/util/hex.rs with the Rust implementation. Exposed the function via C-FFI in
src/rust/src/libccxr_exports/util.rs
Updated src/lib_ccx/utility.c to use the Rust implementation when DISABLE_RUST is not defined.
Changes :- Created src/rust/lib_ccxr/src/util/hex.rs with the Rust implementation.Exposed the function via C-FFI in src/rust/src/libccxr_exports/util.rs.
Updated :- src/lib_ccx/utility.c to use the Rust implementation when DISABLE_RUST is not defined.
Verification :- Ran cargo test -p lib_ccxr and verified that all tests passed, including the new
test_hex_to_int.