Skip to content

Commit 5f4947f

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 46229ea commit 5f4947f

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

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};

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

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

0 commit comments

Comments
 (0)