Skip to content

rust: Forbid unsafe_code in libobs-rust and obs-stream-rust - #414

Merged
zackees merged 1 commit into
masterfrom
chore/297-deny-unsafe-remaining
Oct 13, 2026
Merged

zackees merged 1 commit into
masterfrom
chore/297-deny-unsafe-remaining

Conversation

@zackees

@zackees zackees commented Oct 12, 2026

Copy link
Copy Markdown
Member

Part of #297; together with #413 it closes the issue's checklist.

  • #![forbid(unsafe_code)] in libobs-rust (lib.rs) and obs-stream-rust (lib.rs and main.rs). Neither has any unsafe today, so forbid fits: nothing needs allowing back.
  • obs-c-oracle stays exempt. Its lib.rs now says why: it is a dev-only crate of raw extern "C" bindings to the original C. That exemption already appears in the testing policy and in the platform Dylint's scope.
  • The testing policy notes that crates with no C boundary forbid unsafe_code.

The local gate passed and is stamped.

Neither crate has any unsafe, so forbid keeps it that way. obs-c-oracle
documents why it is exempt: it exists to bind the original C.

Refs #297

Local-Gate: v1 tree=38b76dbd1c351ed61617604169673b5f22f829f6 secs=160 lanes=lint:run,rust-test:run,tier2-linux:run
Ci-Attestation: {"at":1791849220,"gate":"rust/all/fmt","host":"linux-x86_64","key":"1f705167a896768487bb72ebbe330b961b765e219990dba959dc3182eae0ddee","lane":"lint","parents":["7d2a91c67c155658030e063069c69c826cf3b11f"],"secs":22,"stamp":"79b50ab492c03fcd65cc945f614a6d24","tree":"38b76dbd1c351ed61617604169673b5f22f829f6","v":1,"via":"run"}
Ci-Attestation: {"at":1791849220,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"1f705167a896768487bb72ebbe330b961b765e219990dba959dc3182eae0ddee","lane":"lint","parents":["7d2a91c67c155658030e063069c69c826cf3b11f"],"secs":22,"stamp":"0a8887061596c5105040ad9e788c66ec","tree":"38b76dbd1c351ed61617604169673b5f22f829f6","v":1,"via":"run"}
Ci-Attestation: {"at":1791849220,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"c210292061e463c731f38f1b89fa9ded0eedbb076032f39b9043f5ce6a408b08","lane":"rust-test","parents":["7d2a91c67c155658030e063069c69c826cf3b11f"],"secs":63,"stamp":"2d09593ccd9d999ffa529d7b50709ba9","tree":"38b76dbd1c351ed61617604169673b5f22f829f6","v":1,"via":"run"}
Ci-Attestation: {"at":1791849220,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"9a5b3ff0f32adb953cc29a7fff3356df6a2e1cf5324e6dcffb4048d471312d2e","lane":"tier2-linux","parents":["7d2a91c67c155658030e063069c69c826cf3b11f"],"secs":74,"stamp":"62f84f07a00863a57b4ade367e98964b","tree":"38b76dbd1c351ed61617604169673b5f22f829f6","v":1,"via":"run"}
@zackees
zackees merged commit 487c90c into master Oct 13, 2026
20 checks passed
@zackees
zackees deleted the chore/297-deny-unsafe-remaining branch October 26, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant