Adapting examples for a new crate
⚓ Rust 📅 2025-05-23 👤 surdeus 👁️ 10Friends
Is there a generic procedure for adapting example code from the examples directory in a crate into a stand alone crate?
Specifically the application example from winit is the only Rust code I have found that will open a window on my Raspberry Pi and its tiny screen.
Naively copying examples/application.rs to main.rs in a new crate, and copying all the dependencies from winit/Cargo.toml has not come close to working.
I am wondering if there is a more general methodological method that I do not know.
3 posts - 2 participants
🏷️ rust_feed