Skip to content

Commit 84c0a62

Browse files
hyperpolymathclaude
andcommitted
chore: add #![forbid(unsafe_code)] to safe Rust crates
Adds the forbid(unsafe_code) crate-level attribute to all Rust crates that do not use unsafe code, hardening the safety guarantee at compile time. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ac534f4 commit 84c0a62

8 files changed

Lines changed: 8 additions & 0 deletions

File tree

crates/intsoc-api/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
//! 1. IETF Datatracker: For document discovery, state tracking, and submission.
1010
//! 2. IANA Registries: For protocol parameter verification and lookup.
1111
12+
#![forbid(unsafe_code)]
1213
pub mod datatracker;
1314
pub mod iana;
1415

crates/intsoc-cli/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
//! intsoc status <name> Check submission status
1010
//! intsoc init <name> Initialize a new draft from template
1111
12+
#![forbid(unsafe_code)]
1213
use clap::{Parser, Subcommand};
1314
use std::path::PathBuf;
1415

crates/intsoc-core/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//! for processing documents across all Internet Society organizations:
77
//! IETF, IRTF, IAB, Independent Stream, IANA, and RFC Editor.
88
9+
#![forbid(unsafe_code)]
910
pub mod document;
1011
pub mod fix;
1112
pub mod organization;

crates/intsoc-fixer/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//! Internet Society documents. Uses the AutoSafe/Recommended/ManualOnly
77
//! classification from the validation framework.
88
9+
#![forbid(unsafe_code)]
910
pub mod diff;
1011
pub mod engine;
1112
pub mod generators;

crates/intsoc-git/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
//! 2. Build Simplicity: No external C library dependencies (libssh2, openssl, etc.).
1313
//! 3. Static Binary Support: Enables easy cross-compilation for verified environments.
1414
15+
#![forbid(unsafe_code)]
1516
use std::path::{Path, PathBuf};
1617
use thiserror::Error;
1718

crates/intsoc-nickel/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//! - `templates/` - Per-stream document templates
88
//! - `policies/` - Submission constraints per organization
99
10+
#![forbid(unsafe_code)]
1011
pub mod policy;
1112
pub mod render;
1213

crates/intsoc-parser/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//! Parses RFC XML v3, plain-text Internet-Drafts, and idnits output
66
//! into the unified `Document` model.
77
8+
#![forbid(unsafe_code)]
89
pub mod idnits;
910
pub mod plain_text;
1011
pub mod xml;

gui/src-tauri/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
//! 3. **Conversion**: Provides loss-less mapping between internal
1515
//! Rust enums and frontend-friendly string identifiers.
1616
17+
#![forbid(unsafe_code)]
1718
use serde::{Deserialize, Serialize};
1819
use intsoc_core::validation::{CheckCategory, CheckResult, CheckSummary, Fixability, Severity};
1920
// ... [other imports]

0 commit comments

Comments
 (0)