You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: use webassembly-loader internally
* ci: lock Rust version to 1.28.0
* test: reconfigure due to integration and lockup
♦️ rename .babelrc to babel.config.js to make babel respect node_modules/
♦️ force jest to use "module" instead of "main" in package.json when doing import/require for some packages
♦️ remove use of #[wasm_import_module] macro since Rust v1.28 not support it
* docs: update README due to loader integration
Copy file name to clipboardExpand all lines: README.md
+16-20Lines changed: 16 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,6 @@
8
8
</div>
9
9
10
10
[![npm][npm]][npm-url]
11
-
[![node][node]][node-url]
12
11
[![size][size]][size-url]
13
12
[![npm][npm-download]][npm-url]
14
13
[![deps][deps]][deps-url]
@@ -28,6 +27,20 @@ This is a rollup plugin that loads Rust code so it can be interop with Javascrip
28
27
29
28
## Requirements
30
29
30
+
<ul>
31
+
<li>Node v8 or later</li>
32
+
<li>Rollup v0.64 or later</li>
33
+
<li><details>
34
+
<summary>Rust v1.28.0 with wasm32-uknown-unknown installed</summary>
35
+
36
+
```console
37
+
rustup default 1.28.0
38
+
rustup target add wasm32-unknown-unknown
39
+
```
40
+
41
+
</details></li>
42
+
</ul>
43
+
31
44
This module requires a minimum of Node v8.9.0, Rollup v0.64.0, and Rust in [nightly channel][].
32
45
33
46
## Getting Started
@@ -89,17 +102,7 @@ And run `rollup` via your preferred method.
89
102
<details>
90
103
<summary><b><code>export</code></b></summary>
91
104
92
-
- Type: `string`
93
-
- Default: `promise`
94
-
- Expected value:
95
-
-`buffer` will export wasm code as [Buffer][]
96
-
-`module` will export wasm code as [WebAssembly.Module][]
97
-
-`instance` will export wasm code as [WebAssembly.Instance][]
98
-
-`async` will [instantiate][webassembly.instantiate] wasm code asynchronously, return promise of both [WebAssembly.Module][] and [WebAssembly.Instance][]
99
-
-`async-module` will [compile][webassembly.compile] wasm code asynchronously, return promise of [WebAssembly.Module][]
100
-
-`async-instance` will [instantiate][webassembly.instantiate] wasm code asynchronously, return promise of [WebAssembly.Instance][]
101
-
102
-
How wasm code would be exported. (see [examples](#examples))
105
+
How wasm code would be exported. This options is identical with [option `export` in webassembly-loader][webassembly-loader]. (see [examples](#examples))
0 commit comments