Skip to content

Commit a5d77d8

Browse files
committed
Update rebuilding lib/mappings.wasm instructions
1 parent 86d105b commit a5d77d8

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,21 +142,16 @@ Make sure the crate's tests pass:
142142
$ cargo test
143143
```
144144

145-
Build Rust crate as a `.wasm` file:
145+
Ensure that you have the following wasm post-processing tools installed:
146146

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
151151

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:
157153

158154
```
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
162157
```

0 commit comments

Comments
 (0)