Viet-Trung Luu | 3915307 | 2015-11-19 10:38:01 -0800 | [diff] [blame] | 1 | # Mojo EDK (embedder development kit) |
| 2 | |
| 3 | The Mojo EDK is a "library" that provides implementations of the basic Mojo |
| 4 | system primitives (e.g., message pipes). It is not meant for ordinary |
| 5 | applications, but for _embedders_ who in turn expose the basic Mojo primitives |
| 6 | to other applications/content. |
| 7 | |
| 8 | For example, this is used by `mojo_shell` to implement the Mojo primitives, |
| 9 | which it in turn exposes to Mojo applications, and by Flutter, which exposes |
| 10 | Mojo primitives to Flutter applications. (`mojo_shell` and Flutter are embedders |
| 11 | of the Mojo system implementation.) |
| 12 | |
| 13 | Note: The embedder API is not stable (neither at the source nor at the binary |
| 14 | level) and will evolve over time. |
| 15 | |
| 16 | ## Organization |
| 17 | |
| 18 | ### Subdirectories |
| 19 | |
| 20 | * [//mojo/edk/base_edk](base_edk): The embedder API requires various things to |
| 21 | be implemented or injected by the embedder. This contains implementations of |
| 22 | these things for use with [//base](../../base). (This may also be usable with |
| 23 | other sufficiently-similar derivatives of Chromium's |
| 24 | [//base](https://chromium.googlesource.com/chromium/src/+/master/base/).) |
| 25 | * [//mojo/edk/embedder](embedder): The header files in this directory constitute |
| 26 | the public API available to embedders. (The .cc files are private and mostly |
| 27 | serve to bridge between the public API and the private API in |
| 28 | [system](system).) |
Viet-Trung Luu | 6bcf711 | 2015-11-23 12:46:55 -0800 | [diff] [blame] | 29 | * [//mojo/edk/platform](platform): This contains platform abstractions and |
| 30 | declarations of embedder-dependent things. Some of these must be provided by |
| 31 | the embedder, either by implementing an interface or by implementing a class |
| 32 | outright. |
Viet-Trung Luu | 3915307 | 2015-11-19 10:38:01 -0800 | [diff] [blame] | 33 | * [//mojo/edk/system](system): This contains the bulk of the actual |
| 34 | implementation, and is entirely private. |
| 35 | * [//mojo/edk/system/test](system/test): This contains private test helpers used |
| 36 | by the EDK's internal tests. |
| 37 | * [//mojo/edk/test](test): In principle, this contains test helpers for use by |
| 38 | embedders (but see the **TODO** below). |
| 39 | * [//mojo/edk/util](util): This contains basic helpers built on top of the C++ |
| 40 | library and also some POSIX APIs, notably pthreads. These are used by all the |
| 41 | other parts of the EDK, and are also available for embedders to use. (Outside |
| 42 | its tests, it should not depend on other parts of the EDK.) |
| 43 | |
| 44 | ### TODO(vtl) |
| 45 | |
| 46 | * [//mojo/edk/test](test) currently contains things that aren't meant for |
| 47 | embedders. (They can't be moved to [//mojo/edk/system/test](system/test) |
| 48 | because of their dependencies, but they should be moved elsewhere instead.) |
| 49 | * There should be a "platform" directory. Many of the things in |
| 50 | [//mojo/edk/embedder](embedder) (especially in the `platform` target) should |
| 51 | be moved here (though some of the implementations should be moved to |
| 52 | [//mojo/edk/base_edk](base_edk). |
| 53 | |
| 54 | ## See also |
| 55 | |
| 56 | * [//mojo/public](../public): the Mojo public SDK |