Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation: Extend README on how to build .wasm file #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -5,3 +5,19 @@
Markdown formatting plugin for dprint.

This uses the [pulldown-cmark](https://github.com/raphlinus/pulldown-cmark) parser for markdown.

## Building `.wasm` File as Plugin for `dprint`

If you want to build a `.wasm` file to be used as a plugin for `dprint` the following command can be used:

```
cargo build --release --target=wasm32-unknown-unknown --features="wasm"
```

The `--release` parameter is optional. The generated `.wasm` file can then be found in the target directory.

Note that this requires adding `wasm32` as a Rust target. This can be done using the following command:

```
rustup target add wasm32-unknown-unknown
```