How to enable usb_gadget support to emulate a USB Mass Storage device

Traditionally, with Raspberry Pi OS, I’d be able to leverage configfs and libcomposite to open the usb_gadget tree and config from there. I haven’t found an easy way to enable in the host OS or a container to enable the mass storage gadget feature. Any thoughts?