DioxusLabs / DioxusLabs/dioxus

Counter example fails to load js when the project name is non-ascii

Open
#5,093 4 comments 0 reactions 0 assignees View on GitHub
bug fullstack
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

**Problem**

I don't know if it is caused by my Linux environment, because it is very simple case, I totally copy demo from guide doc.
but click on buttons has no effect.
While back to dioxus 0.6.3 + dioxus-cli 0.7.2 can work. (dioxus0.7.0 may also work)

here is the code
`// main.rs
#[cfg(test)]
mod tests;
mod components;

use components::*;
use purple_star::*;
// use libs::*;
use once_cell::sync::OnceCell;
use std::collections::HashMap;
use std::sync::{Arc, RwLock};
use dioxus::prelude::*;

// const CSS: Asset = asset!("/assets/main-d2ee087f.css");
const CSS: Asset = asset!("/assets/main.css");

fn main() {
println!("Hello, world!");
// Init logger
// dioxus::logger::init(Level::INFO).expect("failed to init logger");
dioxus::launch(Demo);
}

#[component]
fn Demo() -> Element {
let mut count = use_signal(|| 0);

rsx! {
h1 { "High-Five counter: {count}" }
button { onclick: move |_| count += 1, "Up high!" }
button { onclick: move |_| count -= 1, "Down low!" }
}
}
`
this is cargo.toml
`[package]
name = "紫微斗数"
version = "0.1.0"
edition = "2024"

[lib]
name = "purple_star"

[dependencies]
num_enum = "0.7.4"
once_cell = "1.21.3"
paste = "1.0.15"
strum = { version = "0.27.2", features = ["derive"] }
strum_macros = "0.27.2"
dioxus = { version = "0.7.2", features = ["fullstack", "logger" , "router"] }
serde_json = "1.0.145"
wasm-bindgen = "0.2.106"
web-sys = "0.3.83"
serde = { version = "1.0.228", features = ["derive"] }

[features]
default = ["desktop"]
web = ["dioxus/web"]
desktop = ["dioxus/desktop"]
mobile = ["dioxus/mobile"]

[profile]

[profile.wasm-dev]
inherits = "dev"
opt-level = 1

[profile.server-dev]
inherits = "dev"

[profile.android-dev]
inherits = "dev"
`
rustc --version
rustc 1.94.0-nightly (ba2142a19 2025-12-07)

**Steps To Reproduce**
dx serve --platform web

Steps to reproduce the behavior:

-
-
-

**Expected behavior**

**Screenshots**

**Environment:**

- Dioxus version:
- Rust version:
- OS info:
- App platform:

**Questionnaire**

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with the shown cargo.toml and main.rs using `dx serve --platform web`, keeping the non-ASCII project name and checking the browser output. Compare the generated web assets and behavior with Dioxus 0.6.3/CLI 0.7.2, then verify that the counter buttons respond when the JavaScript loads correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
build-system, frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.