2460: Added Wasmer Js API r=syrusakbary a=syrusakbary
<!--
Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test:
https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests
-->
# Description
This PR adds support for compiling Wasmer into JS/Wasm via wasm-bindgen, so 3rd party dependencies can use Wasmer to target the web also.
Things working:
* [x] Type introspection: we have to decide how to do it, either run our own parser on the data or rely on the future APIs for introspect Wasm types (this APIs are yet available in the browser, but a proposal is on the way: [wasm-js-types proposal](https://github.com/WebAssembly/js-types)).
* [x] Wasm-pack wasmer-js tests
* [x] Assert 0 warnings in lint
* [x] Allow for custom JS errors (via `RuntimeError`)
* Externals
* [x] Functions with and without Environments
* [x] Native functions
* [x] Dynamic functions
* [x] Memory
* [x] Globals
* [x] Tables
# Review
- [ ] Add a short description of the change to the CHANGELOG.md file
Co-authored-by: Syrus Akbary <me@syrusakbary.com>
This is the first alpha release of `1.0.0`: expect breaking changes.
The version suffix `alpha01.0` was chosen so that we can ship updates
that automatically update with the latter number and can prevent
auto-updates by incrementing the former number (which is not actually
a number as far as semver is concerned).
Also because crates.io sorts versions lexicographically, it will
display the wrong readme if we get to alpha10, so we pad with an extra
0 just in case we need more than 9 releases of alpha.