Install trunk (if you havn't already)
cargo install trunk
Set rust to the nightly toolchain
Just for this project:
rustup toolchain install nightly
rustup override set nightly
For every rust project:
rustup toolchain install nightly
rustup default nightly
Make sure you've added the wasm32-unknown-unknown
target so that Rust can compile your code to WebAssembly to run in the browser.
rustup target add wasm32-unknown-unknown
Make sure you have TailwindCSS installed. You can manually run the
npx tailwindcss -i input.css -o style/output.css
command and it will ask if you want to install.
Run the development server with:
trunk serve --open
To get this up and running on a non-windows machine, edit the Trunk.toml file:
[[hooks]]
stage = "pre_build"
- command = "powershell"
+ command = "sh"
command_arguments = ["-c", "npx tailwindcss -i input.css -o style/output.css"]
Make sure you have the Vercel CLI installed
pnpm i -g vercel
Push build to vercel
NOTE: this assumes you've already run
trunk build
vercel --prod