Software safety constrains behavior so programs avoid invalid, harmful, or erroneous outcomes. In Rust, safety centers on preventing invalid data access at compile time while preserving systems-level performance. section 1.6
Rust connects safety with several practical goals:
- Memory safety: Rust guarantees memory-safe programs and eliminates invalid-data-access bugs without runtime costs. section 1.6
- Concurrency safety: Rust prevents whole classes of errors associated with concurrent and parallel programming. section 1.12
- Operational safety: Rust adds protection to resource-constrained devices without imposing runtime costs, which matters when firmware updates are infrequent. section 1.10.4
- Zero-cost safety: compile-time checks and safety guarantees are preferred when they avoid slowing the running program. section 1.12 section 1.6.3
Choosing controlled representations
Rust can represent an integer directly, on the heap, through reference counting, or behind shared synchronization. These choices expose different semantics and runtime characteristics while retaining safety as the first priority. section 1.6.3
Figure 1.1 Rust provides both safety and control. Other languages have tended to trade one against the other.
Use the comparison figure to see safety and control treated as compatible goals rather than opposing trade-offs. section 1.6







