-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Port 708 decoder encoding module to RUST #1607
[FEATURE] Port 708 decoder encoding module to RUST #1607
Conversation
This `decoder/encoding.rs` file will contain the content of `lib_ccx/ccx_708_decoder_encoding.c` file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the contribution.
Please wait for review from @cfsmp3
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit 2ada36d...:
All tests passing on the master branch were passed completely. NOTE: The following tests have been failing on the master branch as well as the PR:
Congratulations: Merging this PR would fix the following tests:
Check the result page for more info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the rust extern functions automatically picked up by C because they have the same name? I remember having to define extern fn ...
in C and then having to call it like this,
#ifndef DISABLE_RUST
// Use rust function here
#else
// Use C function here
#endif
Is that not needed?
@prateekmedia Any idea why Windows is failing here? |
@PunitLodha You can go on for merge if you find correct, btw this method of having same name is working, I have checked it And another thing I have also Enable the |
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 5748042...:
All tests passing on the master branch were passed completely. NOTE: The following tests have been failing on the master branch as well as the PR:
Congratulations: Merging this PR would fix the following tests:
Check the result page for more info. |
* feat: Add `decoder/encoding` new module This `decoder/encoding.rs` file will contain the content of `lib_ccx/ccx_708_decoder_encoding.c` file * feat: Add encoding functions * feat: Add conditional compilation to include Rust functions * fix: conditional compilation logic * refactor: Use of match statement instead of if-else * fix: Calling C function for rust * feat: Enable `derive_default` feature
* feat: Add `decoder/encoding` new module This `decoder/encoding.rs` file will contain the content of `lib_ccx/ccx_708_decoder_encoding.c` file * feat: Add encoding functions * feat: Add conditional compilation to include Rust functions * fix: conditional compilation logic * refactor: Use of match statement instead of if-else * fix: Calling C function for rust * feat: Enable `derive_default` feature
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
I have migrated the logic and functions from the lib_ccx/ccx_decoder_708_encoding.c file to Rust, located in decoder/encoding.rs. This conversion maintains the same functionality that was originally written in C, now implemented in Rust.
To know more See ccx_decoder_708_encoding.c and compare with File Changed in PR, they are both same
Background & Testing
cargo test
is just seeing the rust code only.-without-rust
then only C code will work or else Rust code will build. And Yes I have manually tested that when compiling with rust src files, rust code is being used and giving the same result.