Revert "Revert "lib""

This reverts commit aff2512a2d710c7d01c9a129940a35c7ae7b4b11.