This site is being rebuilt and some pages are out of date. For current details, write to [email protected]. This notice goes away when the rebuild is done.

No analytics unless you allow it, no tracking. This site keeps in your browser the language you pick, the theme, its colour, which site you chose, the currency on the pricing page and that you closed this notice; signing in adds session cookies. The legal page has the details.

Sign in

Radar · Rust · Archive · Week 30 · Jul 20 – 26, 2026

winit now has comprehensive cross‑platform drag‑and‑drop support

Nice to knowtooling

What changed
winit now exposes most drag‑and‑drop APIs across platforms.
Production impact
The source does not say.
Try it
Add winit = "0.29" to a Cargo project and experiment with the new drag‑and‑drop callbacks.
Source
this-week-in-rust.org/blog/2026/07/22/this-week-in-rust-661/

Understand it, then run it

Run it now

Todayrust
// This program demonstrates the drag‑and‑drop feature that will be available
// once the winit change ships.  Since the current Rust 1.98.1 release does not
// include the new API, the program simply prints a message explaining the
// intended usage.

fn main() {
    println!("winit now exposes comprehensive drag‑and‑drop support across platforms.");
    println!("Once the change is available, you can create a window and register a drop handler like this:");
    println!("    let window = WindowBuilder::new().build(&event_loop).unwrap();");
    println!("    window.set_drag_and_drop(true);");
    println!("    // Handle DropEvent in the event loop.");
}

What it printed when we ran it on Rust 1.98.1 (edition 2024)

winit now exposes comprehensive drag‑and‑drop support across platforms.
Once the change is available, you can create a window and register a drop handler like this:
    let window = WindowBuilder::new().build(&event_loop).unwrap();
    window.set_drag_and_drop(true);
    // Handle DropEvent in the event loop.

Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.

Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed