mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
* Add links to the sidebar.
* Remove unnecessary `page-ref`s (these links are now in the sidebar).
* Small grammar/style fix.
* Fix code tabs.
* Remove {% page-ref %} uses.
* Fix some line lengths.
* Split out `custom.css` into multiple files.
* Remove duplicate titles.
1.2 KiB
1.2 KiB
| id | title |
|---|---|
| starter-templates | Starter templates |
wasm-pack
-
Minimal Template - Uses
wasm-packandrollupto build your application, and your own server to serve it. No bells or whistles here. -
Webpack Template - Uses
wasm-packand thewasm-pack-pluginfor Webpack to streamline development.
The important distinction between these templates and using cargo-web is that this approach uses a lib, not a bin crate, and the entry-point to your program is annotated with a #[wasm_bindgen] annotation.
Your Cargo.toml also should specify that your crate's type is a "cdylib".
[package]
name = "yew-app"
version = "0.1.0"
authors = ["Yew App Developer <name@example.com>"]
edition = "2018"
[lib]
crate-type = ["cdylib"]
[dependencies]
# for web_sys
yew = "0.17"
# or for stdweb
# yew = { version = "0.17", package = "yew-stdweb" }
wasm-bindgen = "0.2"
Other templates
- Parcel Template - Created by a community member and uses Parcel