more
This commit is contained in:
parent
52641fcece
commit
24131bdb9e
1 changed files with 6 additions and 10 deletions
16
Technology
16
Technology
|
@ -130,16 +130,12 @@ AES128-CBC). The TLS handshake performance is equal with OpenSSL.
|
|||
|
||||
### Dependency management
|
||||
|
||||
OCaml has a unique module system. A module specifies abstract datatypes
|
||||
and functions, and each module can have multiple implementations. Modules can
|
||||
take other modules as parameters, the module system is a complete programming
|
||||
language, evaluated at compile time.
|
||||
MirageOS uses this module system to adapt the unikernel to the compilation target.
|
||||
It defines modules for all operating system services, such as the console, the
|
||||
network stack, the random number generator. For each service, an implementation
|
||||
can be provided depending on the compilation target (UNIX process or virtual
|
||||
machine). On UNIX, the sockets API is used as the networking stack. On a
|
||||
virtual machine, the TCP/IP stack in OCaml is being used.
|
||||
MirageOS leverages OCaml's unique module system, a programming language evaluated at compile time, to adapt the unikernel to the compilation target.
|
||||
In MirageOS, each operating system service, such as the console, the
|
||||
network stack, the random number generator, is a module on its own.
|
||||
There are multiple implementations for each service.
|
||||
An example is that on UNIX the sockets API of the host is used as networking stack. On a
|
||||
unikernel, the TCP/IP stack natively implemented in OCaml is used.
|
||||
|
||||
A MirageOS developer does not need to reason about compilation targets, just about the
|
||||
module interface.
|
||||
|
|
Loading…
Reference in a new issue