Skip to content

rsbm/yab

Repository files navigation

Yab

Yew + Axum + blog = Yab

built with Yew and Axum.

Installation

wasm-pack

https://rustwasm.github.io/wasm-pack/installer/

cargo install wasm-pack

rollup

https://rollupjs.org/guide/en/#installation

npm install --global rollup

Build

Frontend

cd frontend
wasm-pack build --target web
rollup ./main.js --format iife --file ./pkg/bundle.js
cd ../
rm -rf static
mkdir static
cp -r ./frontend/pkg ./static/pkg
cp ./frontend/index.html ./static/index.html

Then place ./static directory along with the backend executable.

Backend

cargo build -p backend --release