1+ # You must change these to your own details.
2+ [package ]
3+ name = " rust-webpack-template"
4+ description = " My super awesome Rust, WebAssembly, and Webpack project!"
5+ version = " 0.1.0"
6+ authors = [" You <you@example.com>" ]
7+ categories = [" wasm" ]
8+ readme = " README.md"
9+ edition = " 2018"
10+
11+ [lib ]
12+ crate-type = [" cdylib" ]
13+
14+ [profile .release ]
15+ # This makes the compiled code faster and smaller, but it makes compiling slower,
16+ # so it's only enabled in release mode.
17+ lto = true
18+
19+ [features ]
20+ # If you uncomment this line, it will enable `wee_alloc`:
21+ # default = ["wee_alloc"]
22+
23+ [dependencies ]
24+ # The `wasm-bindgen` crate provides the bare minimum functionality needed
25+ # to interact with JavaScript.
26+ wasm-bindgen = " 0.2.45"
27+
28+ # `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size
29+ # compared to the default allocator's ~10K. However, it is slower than the default
30+ # allocator, so it's not enabled by default.
31+ wee_alloc = { version = " 0.4.2" , optional = true }
32+
33+ # The `web-sys` crate allows you to interact with the various browser APIs,
34+ # like the DOM.
35+ [dependencies .web-sys ]
36+ version = " 0.3.22"
37+ features = [" console" ]
38+
39+ # The `console_error_panic_hook` crate provides better debugging of panics by
40+ # logging them with `console.error`. This is great for development, but requires
41+ # all the `std::fmt` and `std::panicking` infrastructure, so it's only enabled
42+ # in debug mode.
43+ [target ."cfg(debug_assertions)" .dependencies ]
44+ console_error_panic_hook = " 0.1.5"
45+
46+ # These crates are used for running unit tests.
47+ [dev-dependencies ]
48+ wasm-bindgen-test = " 0.2.45"
49+ futures = " 0.1.27"
50+ js-sys = " 0.3.22"
51+ wasm-bindgen-futures = " 0.3.22"
0 commit comments