rust-windowing / winit

Window handling library in pure Rust
https://docs.rs/winit/
Apache License 2.0
4.86k stars 909 forks source link

Bring back the nice examples back in v0.29.x #3935

Closed Nekomaru-PKU closed 1 month ago

Nekomaru-PKU commented 1 month ago

Description

I've noticed that back in v0.29.x, we have up to 39 examples under examples/ demonstrating various usages of winit, but after the huge API change in v0.30, we have only 6 in current master. I'm more than willing to help with bringing the lost examples back, which may help newcomers to get familiar with this outstanding crate more smoothly.

I'm mainly a Windows developer with a MacBook aside, so I'll check on these two platforms before appending any commit to a pull request. However I may need help to make sure the examples that I rewrite are error-free on other platforms.

Relevant platforms

No response

kchibisov commented 1 month ago

half of them were broken, part moved to docs, and whatever left shows conceptually different aspects, like run methods, etc. Having example for each window method call made no sense and they were never updated, so they are all in window.rs now and doc comments.

I'd accept a rename of window.rs to app.rs and adding window.rs which is like in docs for lib.rs + softbuffer basic drawing, but that's about it.

Nekomaru-PKU commented 1 month ago

That sounds reasonable. I'll close this issue. Thanks for your comment!