wafer - to - wafer bonding using , e . g ., solder metal bonding , glass bonding or polymer bonding is improved by profiling one or both of the wafer surfaces being bonded to define microstructures therein . profiling means providing other than the conventional planar bonding surface to define cavities therein . the bonding material fills the cavities in the microstructures . for instance , a system of ridges and trenches are microstructures that increase the surface area of the wafers to which the bonding material can adhere . use of the key - hole shaped or diamond - shaped profile having a negative slope at the trench interior substantially increases the bonding force . where electrical leads feed through a bond , the seal to the bond at that point is improved by either using lengthened feedthroughs which extend the length of a substantial portion of the bond or by use of doped conductive wafer regions rather than metallized feedthroughs . in some cases the bonded surfaces include spacers which define a precisely defined distance between the two wafers , thus providing an exactly specified thickness of the bonding material . in some cases the edges of the bonded assembly are sealed by a sealant which extends through narrow capillary spaces between the two bonded wafers , thus hermetically sealing together the two wafers .