New api: generate mappings from a descriptor object

Not ready to merge
Don't link, this is a private repo ;)