Ultimaker Cura is a commercial product (and a good one, I use it myself for FDM printing), so the libraries are almost certainly Ultimaker IP and not in the public domain. To acquire them, you would have to talk directly to Ultimaker and ask them - but if they do release them, I wouldn't be at all surprised if there was a significant cost involved.
It's not trivial to generate gcode from an STL: the later is a series of low level instructions to the machine: "stop feed", "move here", "start feed", "move here", "move here", "move here", "move here", "lift this much", "move here", "move here", "move here" ... whereas STL is a list of triangles which make up the surfaces of a 3D object and has nothing to do with the actual machine instructions - hence the existence of tools like Cura!
In fact, STL files can feed different apps - Cura for FDM, and LycheeSlicer for SLA printers. The product of the latter is not gcode at all, but a series of pictures to be displayed on an LDC panel to block UV radiation for curing bits which aren't part of the model!
There are a few open source STL to gcode converters:
stl to gcode open source - Google Search[
^] but how good the results are I have no idea given that Cura is free with most printers.