Improved instrucitons on how to compile to wasm

This commit is contained in:
Syrus Akbary
2021-06-21 21:42:09 -07:00
parent 45053d6832
commit 90f8f4ba7a
2 changed files with 19 additions and 1 deletions

View File

@@ -10,6 +10,9 @@ license = "MIT"
readme = "README.md"
edition = "2018"
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
# executor = "0.8.0"
wasm-bindgen = { version = "0.2.74" }
@@ -36,4 +39,3 @@ maintenance = { status = "actively-developed" }
default = ["wat", "std"]
std = []
core = []

View File

@@ -42,6 +42,22 @@ Wasmer has the following configuration flags:
* `wat` (enabled by default): It allows to read WebAssembly files in their text format.
*This feature is normally used only in development environments*
# Build
You can use `wasm-pack` to build wasmer-js:
```
wasm-pack build --release
```
> The provided `wasmer_js.wasm` file should weight around 75kB when optmized via `wasm-opt` and stripped via `wasm-strip`, so it's relatively slim.
# Test
```
wasm-pack test --node
```
---
Made with ❤️ by the Wasmer team, for the community