Mage Compilation