Skip to content

Commit 5e36db8

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 142b88a commit 5e36db8

23 files changed

Lines changed: 23 additions & 0 deletions

File tree

lithoglyph/geo/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//! Geospatial extension for Lith providing spatial indexing
55
//! and queries while preserving auditability guarantees.
66
7+
#![forbid(unsafe_code)]
78
pub mod api;
89
pub mod config;
910
pub mod lithoglyph;

lithoglyph/glyphbase/server/native_rust/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// This NIF connects BEAM (Erlang/Gleam/Elixir) to Lithoglyph via the Lithoglyph C ABI.
55
// Uses CBOR-encoded binaries for efficient data transfer.
66

7+
#![forbid(unsafe_code)]
78
use rustler::{Encoder, Env, Error, ResourceArc, Term};
89

910
mod atoms {

lithoglyph/lith-http/native_rust/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// This NIF connects BEAM (Erlang/Gleam/Elixir) to Lithoglyph via the Lith C ABI.
55
// Uses CBOR-encoded binaries for efficient data transfer.
66

7+
#![forbid(unsafe_code)]
78
use rustler::{Encoder, Env, Error, ResourceArc, Term};
89

910
mod atoms {

lithoglyph/studio/src-tauri/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
66
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
77

8+
#![forbid(unsafe_code)]
89
use serde::{Deserialize, Serialize};
910

1011
// ============================================================================

verisimdb/connectors/clients/rust/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
//! - [`federation`] — Peer registration and federated cross-instance queries.
3535
//! - [`error`] — Error types and the crate-level `Result` alias.
3636
37+
#![forbid(unsafe_code)]
3738
pub mod client;
3839
pub mod types;
3940
pub mod octad;

verisimdb/debugger/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//! Status: Alpha development (v0.1.0)
55
//! Not yet functional - scaffolding only
66
7+
#![forbid(unsafe_code)]
78
fn main() {
89
eprintln!("verisimdb-debugger v0.1.0");
910
eprintln!("Status: Alpha development - not yet functional");

verisimdb/rust-core/verisim-api/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//! HTTP API server for VeriSimDB.
55
//! Exposes all database functionality via REST endpoints.
66
7+
#![forbid(unsafe_code)]
78
pub mod auth;
89
pub mod federation;
910
pub mod graphql;

verisimdb/rust-core/verisim-document/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//! Full-text search via Tantivy.
55
//! Implements Marr's Computational Level: "What text matches?"
66
7+
#![forbid(unsafe_code)]
78
use async_trait::async_trait;
89
use serde::{Deserialize, Serialize};
910
use std::collections::HashMap;

verisimdb/rust-core/verisim-drift/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//! Monitors cross-modal consistency degradation and triggers normalization.
55
//! This is the "early warning system" for data quality issues.
66
7+
#![forbid(unsafe_code)]
78
use chrono::{DateTime, Utc};
89
use prometheus::{Counter, Gauge, Registry};
910
use serde::{Deserialize, Serialize};

verisimdb/rust-core/verisim-graph/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
//!
1212
//! Implements Marr's Computational Level: "What relationships exist?"
1313
14+
#![forbid(unsafe_code)]
1415
use async_trait::async_trait;
1516
use serde::{Deserialize, Serialize};
1617
use std::collections::{HashMap, HashSet};

0 commit comments

Comments
 (0)