From ed9d5f66f35a9f95d6dde672fdc714e6dda1b984 Mon Sep 17 00:00:00 2001 From: Luke Wagner Date: Fri, 12 Jun 2015 09:41:02 -0500 Subject: Split doc into sections --- Portability.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/Portability.md b/Portability.md index 04fecb0..e83e24d 100644 --- a/Portability.md +++ b/Portability.md @@ -4,6 +4,8 @@ WebAssembly's [binary format](BinaryEncoding.md) is designed to be executable efficiently on a variety of operating systems and instruction set architectures, [on the Web](Web.md) and [off the Web](NonWeb.md). +## Execution + Execution environments which, despite [limited, local, non-determinism](Nondeterminism.md), don't offer the following characteristics may be able to execute WebAssembly modules @@ -38,15 +40,20 @@ characteristics: * An execution environment which offers forward progress guarantees to all threads of execution (even when executing in a non-parallel manner). +## API + WebAssembly does not specify any APIs or syscalls, only an [import mechanism](MVP.md#modules) where the set of available imports is defined by the host environment. In a [Web](Web.md) environment, functionality is accessed through the Web APIs defined by the -[Web Platform](https://en.wikipedia.org/wiki/Open_Web_Platform). Non-Web -environments can choose to implement standard Web APIs, standard non-Web APIs -(e.g. POSIX), or invent their own. Portability at the C/C++ level can, however, -still be achieved by programming to a standard API (e.g., POSIX) and relying -on the compiler and/or libraries to map the standard interface to the host -environment's available imports either -at compile-time (via `#ifdef`) or run-time (via [feature detection](FeatureTest.md) -and [dynamic loading](MVP.md#modules)). +[Web Platform](https://en.wikipedia.org/wiki/Open_Web_Platform). +[Non-Web](NonWeb.md) environments can choose to implement standard Web APIs, +standard non-Web APIs (e.g. POSIX), or invent their own. + +## Source-level + +Portability at the C/C++ level can be achieved by programming to +a standard API (e.g., POSIX) and relying on the compiler and/or libraries to map +the standard interface to the host environment's available imports either at +compile-time (via `#ifdef`) or run-time (via [feature detection](FeatureTest.md) +and dynamic [loading](MVP.md#modules)/[linking](FutureFeatures.md#dynamic-linking)). -- cgit v1.2.3