What is the consequences if you do or don't share the source code? You need to be a responsible person for what you have done. Is it useful besides your current lab? Do you want to keep it for patent or future business of your own? Are you allowed to do anything with it for private purpose? There are have to be a good reason for you to share or not share the source code. There are ton's of free source code in the world just because they can't sell it for money but it's beneficial to people. And how big is the library and how hard and how much effort do you have to put in to build this library?
If it is not part of your job and nobody should expect you giving them anything.