How long does setting-type joint compound have to dry before priming?
It depends on thickness, temperature and humidity. Most of the time, overnight is sufficient.  Latex primers are more forgiving of any subsurface moisture.

I have a moisture content meter I use after water damage repairs.  Interior MC should be under 15%, exterior under 25%.

You would want a full dry before sealing with a shellac or oil based primer.
Blistering would be the likely result otherwise.