Install the following dependencies:
- Rust to run the application on the server
- Install the Dioxus tooling
- Install the dioxus-cli
https://github.com/DioxusLabs/dioxus/tree/master/packages/cli
cargo install dioxus-cli@0.5.0-alpha.2
- Install the
wasm32-unknown-unknown
target for Rust
rustup target add wasm32-unknown-unknown
- Create the demo-dashboard crate
Note: you may have to search to find the directory you want to cd
into.
cargo new --bin demo-dashboard
cd demo-dashboard
- Run this command to add the web renderer dependencies to the
Cargo.toml
file
cargo add dioxus@0.5.0-alpha.2 --features fullstack
Using the Dioxus Config file and the Dioxus CLI you can create a Dioxus.toml
file in the root of your project. This file will contain the configuration for the Dioxus CLI.
[application]
name = "project-name"
# Currently supported platforms: web, desktop
default_platform = "web"
[web.app]
title = "Hello"
[web.watcher]
[web.resource.dev]
- Run the application on the server
dx serve --platform fullstack
- Build the Docker image
docker build -t demo-dashboard .
- Run and test the Docker image
docker run -p 8080:8080 demo-dashboard
- Uploading the Docker image to the Docker Hub
docker tag uhstray/demo-dashboard:latest uhstray/demo-dashboard:latest
docker push uhstray/demo-dashboard:latest
- Pulling the Docker image from the Docker Hub
docker pull uhstray/demo-dashboard:latest
dx fmt
- Example Projects : https://github.com/DioxusLabs/example-projects/tree/master
- Rust : https://www.rust-lang.org/
- Dioxus : https://dioxuslabs.com/
- Dioxus CLI : https://github.com/DioxusLabs/dioxus/tree/master/packages/cli