File tree Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -142,21 +142,16 @@ Make sure the crate's tests pass:
142
142
$ cargo test
143
143
```
144
144
145
- Build Rust crate as a ` . wasm` file :
145
+ Ensure that you have the following wasm post-processing tools installed :
146
146
147
- ```
148
- $ cd source-map-mappings- wasm-api/
149
- $ cargo build --release --target wasm32-unknown-unknown
150
- ```
147
+ - ` wasm-nm ` : https://github.com/fitzgen/wasm-nm
148
+ - ` wasm-gc ` : https://github.com/alexcrichton/wasm-gc
149
+ - ` wasm-snip ` : https://github.com/fitzgen/wasm-snip
150
+ - ` wasm-opt ` : https://github.com/WebAssembly/binaryen
151
151
152
- The resulting ` wasm ` file will be located at
153
- ` source-map-mappings-c-api/target/wasm32-unknown-unknown/release/source_map_mappings.wasm ` .
154
-
155
- Finally, to minimize its size, run ` wasm-gc ` on it and output the minimified
156
- ` .wasm ` file into this library's ` lib/mappings.wasm ` :
152
+ Build Rust crate as a ` .wasm ` file:
157
153
158
154
```
159
- $ cargo install --git https://github.com/alexcrichton/wasm-gc # If you don't already have it.
160
- $ wasm-gc target/wasm32-unknown-unknown/release/source_map_mappings.wasm \\
161
- /path/to/mozilla/source-map/lib/mappings.wasm
155
+ $ cd source-map-mappings-wasm-api/
156
+ $ ./build.py -o path/to/source-map/lib/mappings.wasm
162
157
```
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Run a local webserver from the root of the repository:
10
10
11
11
```
12
12
$ cd source-map/
13
- $ python -m SimpleHTTPServer
13
+ $ python2 -m SimpleHTTPServer # or `python3 -m http.server`
14
14
```
15
15
16
16
Open
You can’t perform that action at this time.
0 commit comments