GNUnet is organized in layers and services. Each service is composed of a main service implementation and a client library for other programs to use the service’s functionality, described by an API. Some services provide an additional command line tool to enable the user to interact with the service.
Very often it is other GNUnet services that will use these APIs to build the higher layers of GNUnet on top of the lower ones. Each layer expands or extends the functionality of the service below (for instance, to build a mesh on top of a DHT).
The main service implementation runs as a standalone process in the Operating System and the client code runs as part of the client program, so crashes of a client do not affect the service process or other clients. The service and the clients communicate via a message protocol to be defined and implemented by the programmer.