Skip to content

Commit bdbac4a

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 b4f6dfa commit bdbac4a

7 files changed

Lines changed: 7 additions & 0 deletions

File tree

praxis/wp_injector/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// WP Praxis Injector Library
22
// Core functionality for symbolic injection into WordPress
33

4+
#![forbid(unsafe_code)]
45
use serde::{Deserialize, Serialize};
56
use std::collections::HashMap;
67

praxis/wp_praxis_core/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#![deny(unsafe_code)]
2121
#![warn(missing_docs)]
2222

23+
#![forbid(unsafe_code)]
2324
pub mod manifest;
2425
pub mod parser;
2526
pub mod symbol;

project-wharf/bin/wharf-cli/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
//! - `wharf gen-keys` - Generate cryptographic keys (DKIM, SSH, TLS)
1616
//! - `wharf db` - Database configuration commands
1717
18+
#![forbid(unsafe_code)]
1819
use clap::{Args, Parser, Subcommand};
1920
use std::path::PathBuf;
2021
use tracing::{info, Level};

project-wharf/bin/yacht-agent/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
//! - If it crashes, the site goes offline (better than being hacked)
2121
//! - Only signed commands from the Wharf are accepted
2222
23+
#![forbid(unsafe_code)]
2324
use std::net::SocketAddr;
2425
use std::sync::Arc;
2526

project-wharf/xtask/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//! - Building the eBPF XDP firewall
88
//! - Installing the compiled eBPF object file
99
10+
#![forbid(unsafe_code)]
1011
use std::path::PathBuf;
1112
use std::process::Command;
1213

resurrect/src/socp-tui/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//! A ncurses-style dashboard for managing multiple web sites
55
//! through a centralized, security-hardened control plane.
66
7+
#![forbid(unsafe_code)]
78
mod app;
89
mod api;
910
mod ui;

sinople-theme/wasm/semantic_processor/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
//! const constructs = await processor.query_constructs();
1919
//! ```
2020
21+
#![forbid(unsafe_code)]
2122
use wasm_bindgen::prelude::*;
2223
use serde::{Deserialize, Serialize};
2324
use sophia_api::graph::Graph;

0 commit comments

Comments
 (0)