This is not an insurmountable task but it adds some complication. For convenience and an easier developer experience, we built the
cargo-leptos build tool.
cargo-leptos basically exists to coordinate the build process for your app, handling recompiling the server and client halves when you make changes, and adding some built-in support for things like Tailwind, SASS, and testing.
Getting started is pretty easy. Just run
cargo install cargo-leptos
And then to create a new project, you can run either
# for an Actix template cargo leptos new --git leptos-rs/start
# for an Axum template cargo leptos new --git leptos-rs/start-axum
cd into the directory you’ve created and run
cargo leptos watch
Once your app has compiled you can open up your browser to
http://localhost:3000 to see it.
cargo-leptos has lots of additional features and built in tools. You can learn more in its
But what exactly is happening when you open our browser to
localhost:3000? Well, read on to find out.