File: README.md

package info (click to toggle)
wasm-pack 0.14.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,552 kB
  • sloc: sh: 174; makefile: 119; javascript: 112; xml: 9
file content (77 lines) | stat: -rw-r--r-- 2,504 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<div align="center">

  <h1>๐Ÿ“ฆโœจ wasm-pack</h1>

  <p>
    <strong>Your favorite Rust โ†’ Wasm workflow tool!</strong>
  </p>

  <h3>
    <a href="https://drager.github.io/wasm-pack/book">Docs</a>
    <span> | </span>
    <a href="https://github.com/drager/wasm-pack/blob/master/CONTRIBUTING.md">Contributing</a>
    <span> | </span>
    <a href="https://discordapp.com/channels/442252698964721669/443151097398296587">Chat</a>
  </h3>


</div>

## About

This tool seeks to be a one-stop shop for building and working with rust-
generated WebAssembly that you would like to interop with JavaScript, in the
browser or with Node.js. `wasm-pack` helps you build rust-generated
WebAssembly packages that you could publish to the npm registry, or otherwise use
alongside any javascript packages in workflows that you already use, such as [webpack].

[webpack]: https://webpack.js.org/

![demo](demo.gif)

## ๐Ÿ”ฎ Prerequisites

This project requires Rust 1.30.0 or later.

- [Development Environment](https://drager.github.io/wasm-pack/book/prerequisites/index.html)
- [Installation](https://drager.github.io/wasm-pack/installer)

## โšก Quickstart Guide

Visit the [quickstart guide] in our documentation.

[quickstart guide]: https://drager.github.io/wasm-pack/book/quickstart.html

## ๐ŸŽ™๏ธ Commands

- [`new`](https://drager.github.io/wasm-pack/book/commands/new.html): Generate a new RustWasm project using a template
- [`build`](https://drager.github.io/wasm-pack/book/commands/build.html): Generate an npm wasm pkg from a rustwasm crate
- [`test`](https://drager.github.io/wasm-pack/book/commands/test.html): Run browser tests
- [`pack` and `publish`](https://drager.github.io/wasm-pack/book/commands/pack-and-publish.html): Create a tarball of your rustwasm pkg and/or publish to a registry

## ๐Ÿ“ Logging

`wasm-pack` uses [`env_logger`] to produce logs when `wasm-pack` runs.

To configure your log level, use the `RUST_LOG` environment variable. For example:

```
RUST_LOG=info wasm-pack build
```

[`env_logger`]: https://crates.io/crates/env_logger

## ๐Ÿ‘ฏ Contributing

Read our [guide] on getting up and running for developing `wasm-pack`, and
check out our [contribution policy].

[guide]: https://drager.github.io/wasm-pack/book/contributing.html
[contribution policy]: CONTRIBUTING.md

## ๐Ÿคนโ€โ™€๏ธ Governance

This project was started by [ashleygwilliams] and is maintained by [drager].

[ashleygwilliams]: https://github.com/ashleygwilliams
[drager]: https://github.com/drager