kesto/babyjubjub-wasm-example/wasm-pack_README.md
babyjubjub-wasm-example/wasm-pack_README.mdRaw
1<div align="center">
2
3 <h1><code>wasm-pack-template</code></h1>
4
5 <strong>A template for kick starting a Rust and WebAssembly project using <a href="https://github.com/rustwasm/wasm-pack">wasm-pack</a>.</strong>
6
7 <p>
8 <a href="https://travis-ci.org/rustwasm/wasm-pack-template"><img src="https://img.shields.io/travis/rustwasm/wasm-pack-template.svg?style=flat-square" alt="Build Status" /></a>
9 </p>
10
11 <h3>
12 <a href="https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/index.html">Tutorial</a>
13 <span> | </span>
14 <a href="https://discordapp.com/channels/442252698964721669/443151097398296587">Chat</a>
15 </h3>
16
17 <sub>Built with ๐ฆ๐ธ by <a href="https://rustwasm.github.io/">The Rust and WebAssembly Working Group</a></sub>
18</div>
19
20## About
21
22[**๐ Read this template tutorial! ๐**][template-docs]
23
24This template is designed for compiling Rust libraries into WebAssembly and
25publishing the resulting package to NPM.
26
27Be sure to check out [other `wasm-pack` tutorials online][tutorials] for other
28templates and usages of `wasm-pack`.
29
30[tutorials]: https://rustwasm.github.io/docs/wasm-pack/tutorials/index.html
31[template-docs]: https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/index.html
32
33## ๐ด Usage
34
35### ๐ Use `cargo generate` to Clone this Template
36
37[Learn more about `cargo generate` here.](https://github.com/ashleygwilliams/cargo-generate)
38
39```
40cargo generate --git https://github.com/rustwasm/wasm-pack-template.git --name my-project
41cd my-project
42```
43
44### ๐ ๏ธ Build with `wasm-pack build`
45
46```
47wasm-pack build
48```
49
50### ๐ฌ Test in Headless Browsers with `wasm-pack test`
51
52```
53wasm-pack test --headless --firefox
54```
55
56### ๐ Publish to NPM with `wasm-pack publish`
57
58```
59wasm-pack publish
60```
61
62## ๐ Batteries Included
63
64* [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) for communicating
65 between WebAssembly and JavaScript.
66* [`console_error_panic_hook`](https://github.com/rustwasm/console_error_panic_hook)
67 for logging panic messages to the developer console.
68* [`wee_alloc`](https://github.com/rustwasm/wee_alloc), an allocator optimized
69 for small code size.
70* `LICENSE-APACHE` and `LICENSE-MIT`: most Rust projects are licensed this way, so these are included for you
71
72## License
73
74Licensed under either of
75
76* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
77* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
78
79at your option.
80
81### Contribution
82
83Unless you explicitly state otherwise, any contribution intentionally
84submitted for inclusion in the work by you, as defined in the Apache-2.0
85license, shall be dual licensed as above, without any additional terms or
86conditions.