Implement "lib register" API