The CHERIoT compartment model is similar to an object-oriented model, where each compartment exposes a set of entry points (analogous to methods) that can be called by other compartments. This works well for compartmentalising a lot of libraries: just expose their public API as compartment entry points.