external_eventloop_async sample fails to compile: no method named `as_raw_fd` found for struct `EventLoop`
- Dominant language
- Rust
- Stars
- 30.6k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
**Describe the bug**
In the new "external_eventloop_async" [example](https://github.com/emilk/egui/blob/main/examples/external_eventloop_async/src/app.rs#L30), the [winit integration struct](https://github.com/emilk/egui/blob/4c04996a72e6dbff67db5cca6bee3682952dfc3e/crates/eframe/src/native/winit_integration.rs#L41) in the "eframe" crate appears to be missing a method, `as_raw_fd`, as the compiler complains:
> no method named `as_raw_fd` found for struct `EventLoop` in the current scope
method not found in `EventLoop`
**To Reproduce**
Steps to reproduce the behavior:
1. Clone the latest main branch
1. Change target OS restriction (I'm on a Mac, so I just swapped `linux` with `macos`)
1. `cargo build` and `cargo run --features="linux-example"` the example
**Expected behavior**
Successful compilation.
**Desktop (please complete the following information):**
- OS: MacOS
Contributor guide
Research direction
Start with examples/external_eventloop_async/src/app.rs and the EventLoop integration in crates/eframe/src/native/winit_integration.rs. Reproduce the failure with the reported cargo build and cargo run --features="linux-example" commands after checking the platform restriction. Done means the external_eventloop_async example compiles successfully on the affected platform.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100