Build terminal-themed web applications with Rust and WebAssembly. Powered by Ratatui.
Build terminal-themed web applications with Rust and WebAssembly. Powered by Ratatui.
Build terminal-themed web applications with Rust and WebAssembly. Powered by Ratatui.
Install cargo-generate:
cargo install cargo-generateGenerate a new project:
cargo generate ratatui/ratzillaAnd then serve the application on your browser ➡️
See templates for more information.
Add Ratzilla as a dependency in your Cargo.toml:
cargo add ratzillaHere is a minimal example:
…Add your index.html. During build, trunk will automatically inject and initialize your Rust code (compiled to
WebAssembly) as a JavaScript module.
…And then serve the application on your browser ➡️
Install trunk to build and serve the web application.
cargo install --locked trunkAdd compilation target wasm32-unknown-unknown:
rustup target add wasm32-unknown-unknownThen serve it on your browser:
trunk serveNow go to http://localhost:8080 and enjoy TUIs in your browser!
To build the WASM bundle, you can run the following command:
trunk build --releaseThen you can serve the server from the dist directory.
#!/bin/bash
set -euo pipefail
export HOME=/root
# Install Rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -t wasm32-unknown-unknown --profile minimal
source "$HOME/.cargo/env"
# Install trunk using binstall
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall --targets x86_64-unknown-linux-musl -y trunk
# Build project with trunk
trunk build --releaseThere is a Vercel deployment template available for Ratzilla here.
Thanks to Webatui projects for the inspiration.
Special thanks to:
Lastly, thanks to Ratatui for providing the core UI components.
Pull requests are welcome!
Consider submitting your ideas via issues first and check out the existing issues.
Licensed under either of Apache License Version 2.0 or The MIT License at your option.
ノ( º _ º ノ) - respect crables!
Copyright © 2025, Orhun Parmaksız
No open issues yet, or sync has not completed.