The nuts and bolts of AirPrint are CUPS (linux printer server) plus Avahi (mDNS infrastructure, known in Apple land as Rendevous). My recollection is that to get my USB printer to AirPrint, I only needed to install the CUPS and Avahi packages, and then things magically worked. YMMV.
I have it running right now. My old school LaserJet 1320 is wireless on my home network. It's connected to a Raspberry Pi Zero W.
As someone mentioned, it's basically CUPS and Avahi. I've set it up years ago and it just runs.
The only thing that sucks is that printing from an iPhone takes about 5 minutes because of all the processing on the RPi. I suppose using a higher end RPi would fix that, but I like the small form factor. Printing from a PC is instant.
Not quite Chromecast functionality, but there is a similar project from Balena that adds Spotify Connect, Airplay, and Bluetooth to a speaker using a Raspberry Pi