Mojo is a layered system for programs to interact with the “system”. The system should be compared to a microkernel-based operating system. That is, most system services are provided via IPC (interprocess communication), especially via message passing, with other Mojo programs.
Broadly speaking, there are the following layers to Mojo:
At the lowest layer, Mojo provides a “raw” API for interacting with the system, which should be fairly minimal due to the microkernel-like nature of the system.
Mojo is intended to be language-agnostic. It should be possible to write programs in many different languages, which interact with other Mojo programs (possibly written in different languages). As such there is no single Mojo system API: some things that may be required for one language may simply be inappropriate for another. (Indeed, there may even be multiple versions of “the” Mojo system API even for a single language.)
Due to the nature of the system, there is a common thread among the Mojo system APIs provided to different languages, namely IPC. It is desirable to provide low-level access to IPC (e.g., sending/receiving messages at the byte level), so that programs written in a given programming language have “first-class” access to the basic communication primitives.
All that said, at the lowest level, the Mojo system API for native programs is intended to be complete, in the sense that it is the only API that is used to interact with the operating system (defining this API is a work in progress). Thus it must include basic mechanisms for memory management, thread creation/destruction, synchronization, etc.
As hinted at above, “Mojom” itself consists of several layers:
TODO(vtl)
TODO(vtl)
TODO(vtl)