Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whisperpine/yew-demo
Rust wasm demo project with Yew, Trunk and TailwindCSS.
https://github.com/whisperpine/yew-demo
demo wasm yew
Last synced: 3 days ago
JSON representation
Rust wasm demo project with Yew, Trunk and TailwindCSS.
- Host: GitHub
- URL: https://github.com/whisperpine/yew-demo
- Owner: whisperpine
- License: apache-2.0
- Created: 2023-03-12T14:46:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-13T20:54:01.000Z (3 months ago)
- Last Synced: 2024-08-13T23:55:01.974Z (3 months ago)
- Topics: demo, wasm, yew
- Language: JavaScript
- Homepage:
- Size: 61.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# README
Rust wasm demo project built with [Yew](https://yew.rs/), [Trunk](https://trunkrs.dev/) and [TailwindCSS](https://tailwindcss.com/).
## Prerequisites
### Rust Target
Add build support for WebAssembly platform.
```sh
rustup target add wasm32-unknown-unknown
```### Trunk
[Trunk](https://trunkrs.dev/) is a WASM web application bundler for Rust.
```sh
cargo install --locked trunk # install trunk
trunk --help # check if successfully installed
```### pnpm
[pnpm](https://pnpm.io/) is highly recommended as a replacement of [npm](https://www.npmjs.com/).
## Dependencies
```sh
pnpm install # install dependencies specified in package.json
```### TailwindCSS
[TailwindCSS](https://tailwindcss.com/) is a utility-first CSS framework and the CLI is used for css generation.
```sh
# check if tailwindcss has been successfully installed
pnpm exec tailwindcss --help
```### Binaryen
[Binaryen](https://github.com/WebAssembly/binaryen) contains optimizer and toolchain for WebAssembly.
```sh
# check if binaryen has been successfully installed
pnpm exec wasm-opt --help
```## Getting Started
```sh
trunk serve # build debug version and serve locally with hot reload
trunk build --release # build release version
```## Todo
- [ ] apply trunk post hook only when build release version.