Skip to content

chore(rust): standardize strip = true across release profiles#189

Merged
WilliamBerryiii merged 3 commits intomicrosoft:mainfrom
DenisMal00:chore/standardize-rust-strip
Feb 12, 2026
Merged

chore(rust): standardize strip = true across release profiles#189
WilliamBerryiii merged 3 commits intomicrosoft:mainfrom
DenisMal00:chore/standardize-rust-strip

Conversation

@DenisMal00
Copy link
Contributor

Summary

This PR standardizes the Rust release profiles by adding strip = true to the Cargo.toml files of the application crates. This aligns with the OSSF Silver security badge requirements for reducing binary size and preventing debug symbol leakage (#177).

Changes

  • Added [profile.release] with strip = true to 6 active Rust crates (covering 7 identified targets) within the src/500-application/ directory.

Module Mapping & Analysis

The repository structure has evolved since the opening of #177. Here is the mapping of the crates updated:

  • 501-rust-telemetry: Updated sender and receiver.
  • 502-rust-http-connector: Updated broker and subscriber.
  • 503-media-capture-service: Updated.
  • 507-ai-inference: Updated both ai-edge-inference and ai-edge-inference-crate (Note: the latter likely corresponds to the '508' target mentioned in the issue).

Modules Inspected & Skipped

The following paths were audited but do not require changes in this branch:

  • Missing/Moved Paths: 500-basic-inference, 505-event-processor, 506-open-telemetry-collector, and 508-ai-edge-inference-crate no longer exist as independent directories in the current src/500-application/ tree.
  • Non-Rust Modules: src/900-tools-utilities/900-mqtt-tools/ was inspected but contains only YAML/Markdown files (no Cargo.toml).

Verification

  • Build: Successfully ran cargo build --release.
  • Symbol Check: Confirmed with nm on macOS (arm64) that internal symbols are correctly stripped.

@DenisMal00 DenisMal00 requested a review from a team as a code owner February 10, 2026 21:51
@DenisMal00
Copy link
Contributor Author

@microsoft-github-policy-service agree

Copy link
Member

@WilliamBerryiii WilliamBerryiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @anthropics-ai — welcome and thank you so much for this contribution! We really appreciate you diving into the repo structure, identifying the affected crates, and putting together such a thorough analysis in the PR description. That level of diligence is exactly what makes open-source great. 🙌

I left one inline comment — ai-edge-inference/Cargo.toml already has a [profile.release] section (lines 88–92 on main) that includes strip = true along with lto, codegen-units, and panic settings. The PR adds a duplicate table at the end of the file, which would cause a TOML parse error. Since it's already covered, this file can simply be removed from the changeset.

Also — I owe you an apology: we have a 504-mqtt-otel-trace-exporter Rust crate that I missed when issue #177 was filed, so it wasn't in the original list. That's on us for not keeping the issue up to date and comprehensive. If you'd like to include it in this PR, you'll find it at Cargo.toml. Totally fine to tackle it separately too — whatever works best for you.

The other 6 file changes all look clean. Once the duplicate is resolved, this should be good to go. Thanks again for the contribution! 🎉

@WilliamBerryiii WilliamBerryiii requested a review from a team February 11, 2026 20:00
@WilliamBerryiii WilliamBerryiii merged commit 945ea28 into microsoft:main Feb 12, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants