Skip to content

Commit e77b2ff

Browse files
authored
Update README with new flag (bytecodealliance#583)
1 parent 585e495 commit e77b2ff

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ $ echo '{ "n": 2, "bar": "baz" }' | wasmtime index.wasm
144144
{"foo":3,"newBar":"baz!"}%
145145
```
146146

147+
If you have a lot of JavaScript and you want to reduce compile times, try using the `--no-source-compression` flag. It will skip compressing the JavaScript source code when generating the Wasm module but will result in the Wasm module being larger.
148+
149+
```bash
150+
javy compile index.js -o destination/index.wasm --no-source-compression
151+
```
152+
147153
### Exporting functions
148154

149155
To export exported JavaScript functions, you can pass a WIT file and WIT world when running `javy compile`. Only ESM exports are supported (that is, Node.js/CommonJS exports are _not_ supported). For each exported JavaScript function, Javy will add an additional function export to the WebAssembly module. Exported functions with arguments and generators are not supported. Return values will also be dropped and not returned. The Wasm module generated is a core Wasm module, **not** a Wasm component.

0 commit comments

Comments
 (0)