参考 Rust crates 大巡礼:用 dioxus 开发 WASM 前端 。
运行前记得添加 WASM 的 target。
rustup target add wasm32-unknown-unknown
尝试 Dioxus 构建 WASM 应用。
用到 Trunk 为 main 函数生成 WASM 的绑定。
以下命令会在 ./dist
目录下生成构建应用。
trunk serve
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
参考 Rust crates 大巡礼:用 dioxus 开发 WASM 前端 。
运行前记得添加 WASM 的 target。
rustup target add wasm32-unknown-unknown
尝试 Dioxus 构建 WASM 应用。
用到 Trunk 为 main 函数生成 WASM 的绑定。
以下命令会在 ./dist
目录下生成构建应用。
trunk serve