diff options
| author | Derek Schuff <dschuff@chromium.org> | 2015-08-26 15:05:59 -0700 |
|---|---|---|
| committer | Derek Schuff <dschuff@chromium.org> | 2015-08-26 15:05:59 -0700 |
| commit | 10831da363f3ebef3cfeb1d775b972d50b96e9f6 (patch) | |
| tree | 2d0a20dec21ee07f66a2dabd9d390271b046adf8 /DynamicLinking.md | |
| parent | ce509cdb9ec33fc439e389c82dffc1e641c1925d (diff) | |
| download | nanowasm-design-10831da363f3ebef3cfeb1d775b972d50b96e9f6.tar.gz | |
Fix typo in DynamicLinking.md file name
Diffstat (limited to 'DynamicLinking.md')
| -rw-r--r-- | DynamicLinking.md | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/DynamicLinking.md b/DynamicLinking.md new file mode 100644 index 0000000..675471f --- /dev/null +++ b/DynamicLinking.md @@ -0,0 +1,34 @@ +# Dynamic linking + +Dynamic loading of code is in [the MVP](MVP.md) in the form of +[modules](Modules.md), but all loaded modules have their own separate +[linear memory](AstSemantics.md#linear-memory) and cannot share +[function pointers](AstSemantics.md#calls). Dynamic linking will allow +developers to share memory and function pointers between WebAssembly +dynamic libraries. + +WebAssembly will support both load-time and run-time (`dlopen`) dynamic linking +of libraries. + +Dynamic linking is especially useful when combined with a Content Distribution +Network (CDN) such as [hosted libraries][] because the library is only ever +downloaded and compiled once per user device. It can also allow for smaller +differential updates, which could be implemented in collaboration with +[service workers][]. + +We would like to standardize a single [ABI][] per source language, allowing for +WebAssembly libraries to interface with each other regardless of compiler. While +it is highly recommended for compilers targeting WebAssembly to adhere to the +specified ABI for interoperability, WebAssembly runtimes will be ABI agnostic, +so it will be possible to use a non-standard ABI for specialized purposes. + +Although dynamic linking is not part of the MVP, it has significant implications +on many aspects of the design that do impact the MVP, such as the way linear +memory is managed, how module imports and exports are specified, and how globals +and function pointers work. Therefore we want to have some viable ideas to +ensure we don't standardize a design that unnecessarily complicates the design +or implementation of dynamic linking. + + [hosted libraries]: https://developers.google.com/speed/libraries/ + [service workers]: https://www.w3.org/TR/service-workers/ + [ABI]: https://en.wikipedia.org/wiki/Application_binary_interface |
