Skip to content

Commit 285b66c

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 6f402dd commit 285b66c

14 files changed

Lines changed: 14 additions & 0 deletions

File tree

bots/accessibilitybot/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
//! - **Language** (3.1.1/3.1.5): Language attribute and reading level
2323
//! - **CSS** (1.4.4/1.4.12): CSS accessibility best practices
2424
25+
#![forbid(unsafe_code)]
2526
pub mod analyzers;
2627
pub mod fleet;
2728
pub mod report;

bots/cipherbot/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
//! - Protocol: QUIC + HTTP/3 + IPv6 (IPv4 disabled)
2525
//! - Fallback: SPHINCS+ for all hybrid PQ systems
2626
27+
#![forbid(unsafe_code)]
2728
pub mod analyzers;
2829
pub mod cli;
2930
pub mod fleet;

bots/finishingbot/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
//!
1313
//! Part of the Hyperpolymath Gitbot Fleet.
1414
15+
#![forbid(unsafe_code)]
1516
pub mod analyzers;
1617
pub mod config;
1718
pub mod error;

bots/glambot/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
//!
1313
//! Part of the Hyperpolymath Gitbot Fleet.
1414
15+
#![forbid(unsafe_code)]
1516
pub mod analyzers;
1617
pub mod config;
1718
pub mod error;

bots/rhodibot/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//! All webhook inputs are validated via the [`sanitize`] module before
1111
//! being used in API calls or markdown output. Tokens are never logged.
1212
13+
#![forbid(unsafe_code)]
1314
pub mod config;
1415
pub mod fleet;
1516
pub mod github;

bots/seambot/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//! Seambot is a governor and auditor, not a designer. It ensures that
88
//! declared seams remain explicit, stable, and correctly exercised over time.
99
10+
#![forbid(unsafe_code)]
1011
use anyhow::Result;
1112
use clap::{Parser, Subcommand};
1213
use std::path::PathBuf;

bots/sustainabot/crates/sustainabot-cli/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//! Ecological and economic code analysis tool.
77
//! Built with Eclexia principles - proving resource-aware design works.
88
9+
#![forbid(unsafe_code)]
910
use anyhow::Result;
1011
use clap::{Parser, Subcommand};
1112
use std::fs;

bots/sustainabot/crates/sustainabot-eclexia/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
//!
1010
//! Both backends implement the same `PolicyEngine` trait.
1111
12+
#![forbid(unsafe_code)]
1213
use anyhow::{Context, Result};
1314
use std::path::Path;
1415
use sustainabot_metrics::{AnalysisResult, ResourceProfile};

bots/sustainabot/crates/sustainabot-fleet/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//! Publishes ecological and economic analysis findings to the shared context
77
//! layer for consumption by other bots in the fleet.
88
9+
#![forbid(unsafe_code)]
910
use anyhow::Result;
1011
use gitbot_shared_context::{BotId, Context, Finding, Severity};
1112
use std::path::{Path, PathBuf};

bots/sustainabot/crates/sustainabot-metrics/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//! Core data types for ecological and economic code analysis.
77
//! Inspired by Eclexia's resource-aware design principles.
88
9+
#![forbid(unsafe_code)]
910
use serde::{Deserialize, Serialize};
1011
use std::ops::{Add, Mul};
1112

0 commit comments

Comments
 (0)