Ruta graveolens  ·  notes from a language experiment  ·  cultivated since 2025

Unchecked Code

Unchecked Code

This chapter describes Rue's mechanism for low-level operations that bypass normal safety checks.

Rue provides checked blocks and unchecked functions to enable low-level memory operations while keeping such code visibly separate from normal safe code.

The operations in this chapter are the only source of undefined behavior in Rue: raw-pointer and heap intrinsics whose validity the compiler cannot check without changing a value's representation (ADR-0036). Appendix B (B.3) catalogues the specific conditions that are undefined, and B.1 places them within Rue's conformance taxonomy. Outside a checked block none of these operations is reachable, so the safe subset of Rue has no undefined behavior.

In this section