Dioxus 教程- 工具集
在开始之前,请确保您已按照《入门指南》中的说明安装了所需的依赖项。
我们将主要以网页应用的形式开发HotDog,但我们仍建议您同时配置桌面和移动端开发的相关工具。
检查清单
我们在《入门指南》中已介绍了配置步骤,但首先请确认所有配置均已正确完成:
- Rust已安装
- 您已安装代码编辑器
- 已安装wasm32-unknown-unknown Rust目标
- dioxus-cli已安装且为最新版本
- 系统特定依赖项已安装
验证您的设置
在继续之前,请确保已安装dioxus-cli且为最新版本。
通过运行以下命令验证返回的版本与本指南一致(例如0.6):
dx --version
dx 命令介绍
你可以运行 dx help 查看命令列表, 它会介绍如何使用 dx 工具.
Build, Bundle & Ship Dioxus Apps
Usage: dx [OPTIONS] <COMMAND>
Commands:
build Build the Dioxus project and all of its assets
translate Translate a source file into Dioxus code
serve Build, watch & serve the Dioxus project and all of its assets
new Create a new project for Dioxus
init Init a new project for Dioxus in the current directory (by default). Will attempt to keep your project in a good state
clean Clean output artifacts
bundle Bundle the Dioxus app into a shippable object
fmt Automatically format RSX
check Check the project for any issues
run Run the project without any hotreloading
config Dioxus config file controls
help Print this message or the help of the given subcommand(s)
Options:
--verbose Use verbose output [default: false]
--trace Use trace output [default: false]
--json-output Output logs in JSON format
-h, --help Print help
-V, --version Print version
如果正确安装了dx,那我们就可以开始我们的dioxus 之旅了!