examples/README.md
The examples in this directory are all built and tested against the current main branch.
To the extent that new features have been released or breaking changes have been made since the previous release, the examples are compatible with the main branch and not the current release.
The simplest way to get started with any example is to use the “quick start” command found in the README for each example. Most of the examples use either trunk (a simple build system and dev server for client-side-rendered apps) or cargo-leptos (a build system for server-rendered and client-hydrated apps).
You can also run any of the examples using cargo-make. Note that this is completely optional. We use it for CI, and it can be convenient for running the examples, but is not required.
Follow these steps to get any example up and running.
cd to the example you want to runcargo-make is installed (for example by running cargo install cargo-make)rustup target add wasm32-unknown-unknown was executed for the currently selected toolchain.cargo make ci to setup and test the examplecargo make start to run the examplecargo make stop to end any processes started by cargo make start.Here are a few additional notes:
cargo dependenciesMakefile.toml file must extend the cargo-make/main.toml file*-test.toml configure web testing strategiescargo make test-report to learn which examples have web testsExample projects depend on the following tools. Please install them as needed.
rustup toolchain install nightlyrustup target add wasm32-unknown-unknowncargo install --force cargo-makealias cm='cargo make' to reduce typing (Optional)cargo install trunk