Add registry to support more separate compilation scenarios