The nervous system, especially the human brain, is characterized by its highly complex network topology. The neurodevelopment of some of its features has been described in terms of dynamic optimization rules. We discuss the principle of adaptive rewiring, i.e., the dynamic reorganization of a network according to the intensity of internal signal communication as measured by synchronization or diffusion, and its recent generalization for applications in directed networks. These have extended the principle of adaptive rewiring from highly oversimplified networks to more neurally plausible ones. Adaptive rewiring captures all the key features of the complex brain topology: it transforms initially random or regular networks into networks with a modular small-world structure and a rich-club core. This effect is specific in the sense that it can be tailored to computational needs, robust in the sense that it does not depend on a critical regime, and flexible in the sense that parametric variation generates a range of variant network configurations. Extreme variant networks can be associated at macroscopic level with disorders such as schizophrenia, autism, and dyslexia, and suggest a relationship between dyslexia and creativity. Adaptive rewiring cooperates with network growth and interacts constructively with spatial organization principles in the formation of topographically distinct modules and structures such as ganglia and chains. At the mesoscopic level, adaptive rewiring enables the development of functional architectures, such as convergent-divergent units, and sheds light on the early development of divergence and convergence in, for example, the visual system. Finally, we discuss future prospects for the principle of adaptive rewiring.