Marine follows the layered architecture pattern allowing developers to use components with different abstraction layers to fit their purpose:
In this chapter, we briefly discuss these Marine components.
The core comprises the lower-level component of
Marine to expose the API that allows developers to
call modules as well as obtain information concerning their states such as WASI state, module interfaces (all export functions), and heap usage statistics. Internally, it interprets interface-types instructions providing module-module and module-host value passing scheme.
The runtime component compiles to Wasm and is used in marine-js as a so-called control module sharing the same code for marine and marine-js targets.
Marine extends the core component with the following features:
- can be called with json-based arguments (
- provides an internal mechanism for handling host imports
- defines three host imports for logging, call parameters, and mounted binary interface
Provides the basic Marine functionality for the browser and node.js targets. Marine-js is currently under active development and exposes only a basic core API and supports only single-module service.