Skip to content

dioxus-desktop: add embedded-safe "returning" launcher (avoid terminating host process on Windows) #5170

@dxvid-pts

Description

@dxvid-pts

Fixed by #5169

  • We build a Rust add-in/plugin that runs inside an existing Windows application's process.
  • We use dioxus-desktop to render UI in a child/embedded window.
  • The plugin can be enabled/disabled (loaded/unloaded) at runtime.

Problem

  • When the plugin is disabled/unloaded, we shut down the dioxus-desktop event loop (e.g. close the window / post WM_QUIT).
  • On Windows, tao::EventLoop::run ultimately calls std::process::exit(...) when the event loop exits.
  • This terminates the entire host process, even though the UI/event loop is running on a worker thread.
  • Result: disabling/unloading the plugin unexpectedly closes the host application.

Expected

  • Shutting down an embedded dioxus-desktop UI should stop only the embedded UI/event-loop thread.
  • It must not call std::process::exit or terminate the host process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions