Skip to content

Rust wasm demo project with Yew, Trunk and TailwindCSS.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

whisperpine/yew-demo

Repository files navigation

README

Rust wasm demo project built with Yew, Trunk and TailwindCSS.

Prerequisites

Rust Target

Add build support for WebAssembly platform.

rustup target add wasm32-unknown-unknown

Trunk

Trunk is a WASM web application bundler for Rust.

cargo install --locked trunk  # install trunk
trunk --help  # check if successfully installed

pnpm

pnpm is highly recommended as a replacement of npm.

Dependencies

pnpm install  # install dependencies specified in package.json

TailwindCSS

TailwindCSS is a utility-first CSS framework and the CLI is used for css generation.

# check if tailwindcss has been successfully installed
pnpm exec tailwindcss --help

Binaryen

Binaryen contains optimizer and toolchain for WebAssembly.

# check if binaryen has been successfully installed
pnpm exec wasm-opt --help

Getting Started

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.

About

Rust wasm demo project with Yew, Trunk and TailwindCSS.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks