Skip to content

web_sys fails to compile with dx serve on windows #4455

@Himmelschmidt

Description

@Himmelschmidt

Problem

dx serve fails on Windows when building WASM projects that use web-sys with many features, due to
Windows' ~32,767 character command line length limit. The error manifests as rustc failing with exit code 101. Running dx build first is a temporary workaround.

Steps To Reproduce

Steps to reproduce the behavior:

  • Create a Dioxus web project that uses web-sys with many features (or any project that results in
    hundreds of --cfg "feature=..." arguments)
  • Run dx serve --platform web on Windows
  • The build will fail during dx serve compilation when rustc is called directly with cached arguments

Expected behavior

dx serve should work on Windows just like dx build does, without hitting command line length limitations.

Screenshots

Environment:

  • Dioxus version: main
  • Rust version: 1.88
  • OS info: Windows
  • App platform: Web (Fullstack)

Questionnaire

I don't have time to fix this right now, but maybe later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions