rsbm / yab

yew + axum + blog = yab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

yew + axum + blog = yab


Languages

Language:Rust 77.4%Language:Dockerfile 14.4%Language:Shell 3.5%Language:HTML 2.6%Language:JavaScript 2.2%