1. A complementary metal oxide semiconductor (CMOS) circuit with integrated functional devices, comprising: a) a substrate having CMOS devices; b) a wiring layer disposed on the CMOS devices, wherein the wiring layer includes electrically conductive wiring and a dielectric layer; c) a first attachment layer bonded to the dielectric layer; d) a bottom surface of a first functional device disposed on and directly contacting the first attachment layer; e) an electrical connection between the electrically conductive wiring and the functional device, f) a metallization layer which creates the electrical connection between the electrically conductive wiring and the functional device and wherein said metallization layer is directly connected to said functional device and said electrically conductive wiring, wherein said metallization layer is located on top of said functional device and is also located on top of said electrically conductive wiring, and wherein the entire functional device is embedded within the first attachment layer.