Skip to content

Run rust code on Main thread #513

Description

@rohitsangwan01

Like the title says, is it possible to run Rust on Main thread, without blocking the UI, am trying to run Bevy from Flutter

but getting error

thread '<unnamed>' panicked at /Users/rohitsangwan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.30.9/src/platform_impl/macos/event_loop.rs:221:14:
on macOS, `EventLoop` must be created on the main thread!

Bevy using winit internally to launch a Desktop window, and it requires MainThread
Is there any way or maybe something like running rust as standalone binary and communicate over sockets ?

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