Adapting examples for a new crate

⚓ rust    📅 2025-05-23    👤 surdeus    👁️ 4      

surdeus

Warning

This post was published 37 days ago. The information described in this article may have changed.

Friends

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

Read full topic

🏷️ rust_feed