package mirage-types

  1. Overview
  2. Docs

MirageOS Signatures.

This module defines the basic signatures that functor parameters should implement in MirageOS to be portable.

General conventions

  • errors which application programmers are expected to handle (e.g. connection refused or end of file) are encoded as result types where Ok x means the operation was succesful and returns x and where Error e means the operation has failed with error e. The error e uses the Rresult.R.msg type for the most general error message, and possibly more specific ones depending on the interface.
  • errors which represent programming errors such as assertion failures or illegal arguments are encoded as exceptions. The application may attempt to catch exceptions and recover or simply let the exception propagate and crash the application. If the application crashes then the runtime system should output diagnostics and abort.
  • operations which perform I/O return values of type +'a io which allow the application to either wait for the I/O to be completed or leave it running asynchronously. If the I/O completes with an error then the operation may have completely failed, partially succeeded or even completely succeeded (e.g. it may only be a confirmation message in a network protocol which was missed): see individual API descriptions for details.

Release v3.10.0

module type DEVICE = Mirage_device.S

Time and clock devices

module type TIME = Mirage_time.S
module type MCLOCK = Mirage_clock.MCLOCK
module type PCLOCK = Mirage_clock.PCLOCK
module type RANDOM = Mirage_random.S

Connection between endpoints

module type FLOW = Mirage_flow.S

Console

module type CONSOLE = Mirage_console.S

Sector-addressible block devices

module type BLOCK = Mirage_block.S
module type NETWORK = Mirage_net.S
module type ETHERNET = Mirage_protocols.ETHERNET
module type IP = Mirage_protocols.IP
module type ARP = Mirage_protocols.ARP
module type IPV4 = Mirage_protocols.IPV4
module type IPV6 = Mirage_protocols.IPV6
module type ICMP = Mirage_protocols.ICMP
module type ICMPV4 = Mirage_protocols.ICMPV4
module type UDP = Mirage_protocols.UDP
module type UDPV4 = Mirage_protocols.UDPV4
module type UDPV6 = Mirage_protocols.UDPV6
module type TCP = Mirage_protocols.TCP
module type TCPV4 = Mirage_protocols.TCPV4
module type TCPV6 = Mirage_protocols.TCPV6
module type STACKV4 = Mirage_stack.V4
module type CHANNEL = Mirage_channel.S

Static Key/value store

module type KV_RO = Mirage_kv.RO
module type KV_RW = Mirage_kv.RW

Filesystem devices

module type FS = Mirage_fs.S
OCaml

Innovation. Community. Security.