Skip to content

Commit e4f2922

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 6b40fc6 commit e4f2922

14 files changed

Lines changed: 14 additions & 0 deletions

File tree

crates/typell-affinescript/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
//! rules.rs — AffineScript-specific QTT and refinement rules
2727
//! ```
2828
29+
#![forbid(unsafe_code)]
2930
pub mod bridge;
3031
pub mod rules;

crates/typell-betlang/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
//! Probabilistic types map to TypeLL's effect system (non-determinism effect)
1212
//! and the Ternary type maps to a refined enum type.
1313
14+
#![forbid(unsafe_code)]
1415
pub mod bridge;
1516
pub mod rules;

crates/typell-core/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
//! 6. **Sessions** — protocol duality checking
4646
//! 7. **Proofs** — obligation generation for dependent types
4747
48+
#![forbid(unsafe_code)]
4849
pub mod check;
4950
pub mod dimensional;
5051
pub mod effects;

crates/typell-eclexia/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@
3636
//! resource.rs — Eclexia-specific resource type rules
3737
//! ```
3838
39+
#![forbid(unsafe_code)]
3940
pub mod bridge;
4041
pub mod resource;

crates/typell-ephapax/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
//! discipline, with contracts (pre/post/invariant) becoming refinement
1212
//! predicates.
1313
14+
#![forbid(unsafe_code)]
1415
pub mod bridge;
1516
pub mod rules;

crates/typell-errorlang/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
//! These map to TypeLL's effect system (non-determinism, instability effects)
1414
//! and refinement types (stability score as a predicate).
1515
16+
#![forbid(unsafe_code)]
1617
pub mod bridge;
1718
pub mod rules;

crates/typell-jtv/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
//! JtV also has 7 number systems with a coercion lattice, mapped to
1212
//! named numeric types in TypeLL.
1313
14+
#![forbid(unsafe_code)]
1415
pub mod bridge;
1516
pub mod rules;

crates/typell-mylang/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
//! The AI<T> type maps to a TypeLL effect annotation, tracking which
1212
//! values in the program are AI-generated and may require validation.
1313
14+
#![forbid(unsafe_code)]
1415
pub mod bridge;
1516
pub mod rules;

crates/typell-oblibeny/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
//! to TypeLL's linear type discipline. The accountability traces (TTrace)
1212
//! map to an audit effect.
1313
14+
#![forbid(unsafe_code)]
1415
pub mod bridge;
1516
pub mod rules;

crates/typell-phronesis/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
//! These map to TypeLL's refined types (conditions as predicates) and
1212
//! effect system (actions as effects).
1313
14+
#![forbid(unsafe_code)]
1415
pub mod bridge;
1516
pub mod rules;

0 commit comments

Comments
 (0)