This is a Client-Side-Rendered App showing how it's possible to interact with Keplr and Secret from WebAssembly, using the Leptos framework.
If you don’t already have it installed, you can install Trunk by running
cargo install trunk
To use nightly Rust, you can run
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
Trunk handles the Tailwind build step. Include a line like this in your index.html
head:
<link data-trunk rel="tailwind-css" href="input.css" />
Start a development server at 127.0.0.1:8080:
trunk serve
# or start the server and open the app in a new browser tab
trunk serve --open
To create a production version of your app:
trunk build --release --public-url "https://kent-3.github.io/secret-leptos/"
trunk build
will create a number of build artifacts in a dist/
directory.
Publishing dist
somewhere online should be all you need to deploy your app.
This should work very similarly to deploying any JavaScript application.