Currently developers need to specify both a generator rule definition and a library definition to define and build a library out of an IDL definition. We want to give developers the freedom to do this so they can group together IDLs into a single library target when optimal, but in most cases it's fine to just have one IDL generator per library.
The other motivation for this is that separating the two makes the deps situation complicated. If a user wants to depend on the header the user needs to put the idl gen reference in the hdrs section, but if they want to depend on a cc file they'd put it in the deps section. We want users to usually default to just putting dependencies in the deps field and avoid spreading around header-only references.
Create an interface for developers that both instantiates an idl_generator and a mongo_cc_library, ex:
def idl_library(a, b, c, d):
idl_generator(a, b)
mongo_cc_library(c, d)