Wireless ad hoc networks were extensively studied in the past given their potential for scalability, ease of deployment, and suitability for scenarios where no infrastructure is available. Considering the recent relevance of applications, particularly in the Internet of Things (IoT) and edge computing domains, revisiting these networks becomes a necessity, as to develop novel distributed applications. Distributed applications are highly complex as they require multiple services and abstractions supported by a wide range of distributed protocols, specially in such adverse domains. To simplify the development of applications in ad hoc networks, in this paper we present Yggdrasil, a novel framework and middleware specifically tailored for the development and execution of distributed applications and associated protocols using commodity devices in such networks. Yggdrasil provides a simple yet effective development environment, which is achieved by combining an event driven programming model with a multi-threaded execution environment that shield the programmer from concurrency issues. A fully functional prototype was developed in C and experimentally evaluated using a fleet of 24 Raspberry Pis.