rust Dioxus应用程序加载失败-这可能是由于Bindgen版本,dioxus-cli使用`0.2.81` Bindgen crate

bakd9h0s  于 2023-08-05  发布在  其他
关注(0)|答案(1)|浏览(137)

我决定再给予迪奥克索斯一次机会。
这一次,我尝试启动一个最近创建的Dioxus应用程序,并得到以下错误:

[WARN] Config file: `Dioxus.toml` not found; using default config.
[WARN] Config file: `Dioxus.toml` not found; using default config.
[INFO] 🚅 Running build command...
[INFO] 👑 Build done.
[WARN] failed to parse `name` custom section Invalid name type (at offset 30985979)
thread 'main' panicked at 'unknown descriptor: 72', C:\Users\asili\.cargo\registry\src\github.com-1ecc6299db9ec823\wasm-bindgen-cli-support-0.2.83\src\descriptor.rs:154:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[ERROR] 🚫 Serve startup failed: Build Failed: Bindgen build failed! 
This is probably due to the Bindgen version, dioxus-cli using `0.2.81` Bindgen crate.

字符串
这是我的货,汤姆

[package]
name = "dioxus-example"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
dioxus = "0.3.2"
dioxus-web = "0.3.2"
wasm-bindgen = "0.2.78"


main.rs

#![allow(non_snake_case)]
// import the prelude to get access to the `rsx!` macro and the `Scope` and `Element` types
use dioxus::prelude::*;

fn main() {
    // launch the web app
    dioxus_web::launch(App);
}

// create a component that renders a div with the text "Hello, world!"
fn App(cx: Scope) -> Element {
    cx.render(rsx! {
        div {
            "Hello, world!"
        }
    })
}


你有什么解决的办法吗?

eqqqjvef

eqqqjvef1#

更新dioxus cli为我工作:

cargo install dioxus-cli --force

字符串

相关问题