Skip to content
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

rust: name and visibility cleanups - v3 #12443

Closed
wants to merge 10 commits into from

Conversation

jasonish
Copy link
Member

Rebase of #12434 with conflicts resolved.

If a function is extern "C" and not pub, remove no_mangle so its not
exposed as-is into the global name space.

Ticket: 7498
Both the macros export_tx_data_get and export_state_data_get can
generate non-pub functions as the function they generate is only used
as a pointer during registration.

Remove "pub" and "no_mangle" from the generated functions and update
the names of the generated functions to follow Rust rules as they are
no longer exported into the global C namespace.

Ticket: 7498
- remove "rs_" prefix from functions that are not exported
- prefix exported functions with "SC"
- don't export functions that are only used by pointer

Ticket: 7498
Remove pub and no_mangle from non-exported functions and rename to
Rust style as needed.

Ticket: 7498
Remove pub and no_mangle from non-exported functions and rename to
Rust as-needed.

Ticket: 7498
Remove pub and no_mangle from non-exported functions and rename to
Rust as-needed.

Ticket: 7498
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 96.78616% with 26 lines in your changes missing coverage. Please review.

Project coverage is 80.64%. Comparing base (95e8427) to head (9193694).
Report is 13 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #12443   +/-   ##
=======================================
  Coverage   80.63%   80.64%           
=======================================
  Files         920      920           
  Lines      258704   258739   +35     
=======================================
+ Hits       208595   208648   +53     
+ Misses      50109    50091   -18     
Flag Coverage Δ
fuzzcorpus 56.81% <83.10%> (+<0.01%) ⬆️
livemode 19.40% <37.67%> (+<0.01%) ⬆️
pcap 44.30% <73.96%> (-0.04%) ⬇️
suricata-verify 63.25% <92.43%> (-0.02%) ⬇️
unittests 58.53% <74.75%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@victorjulien victorjulien added this to the 8.0 milestone Jan 21, 2025
@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 24298

@victorjulien
Copy link
Member

Merged in #12445, thanks!

@jasonish jasonish deleted the rust/cleanups/v3 branch January 23, 2025 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants