Rust for Windows: from first program to a shell tool

11 steps · about 8 h 45 min · Intermediate

  1. The Rust Programming Language (doc, Rust Project (Klabnik and Nichols), 4 h)

    This is the official book, and it teaches ownership, structs, errors and Cargo, which every later step uses.

  2. Rust By Example (interactive, Rust Project, 1 h 30 min)

    Runnable examples reinforce the book's ideas, and you can edit and run them in the browser.

  3. Cargo Workspaces (article, The Rust Programming Language, 15 min)

    WinRust is built as one Cargo workspace with a shared crate, so you need to know how workspaces work first.

  4. Workspaces - The Cargo Book (reference, The Cargo Book, 20 min)

    This is the full reference for the shared lockfile, member crates and workspace-wide commands.

  5. Windows shell (article, Wikipedia, 15 min)

    It explains what the Windows shell is (taskbar, Start menu, Explorer, shell namespace) before you try to replace any of it.

  6. Understanding Shell Namespace Extensions (doc, Microsoft Learn, 20 min)

    It shows how Explorer presents files and folders as shell objects, which is the part a file manager replacement has to take over.

  7. Taskbar Extensions - Win32 apps (doc, Microsoft Learn, 20 min)

    It covers how taskbar buttons, groups and thumbnails behave, which any replacement taskbar has to reproduce.

  8. Rust for Windows, and the windows crate (doc, Microsoft Learn, 15 min)

    This is the official introduction to calling Windows APIs from Rust through the windows crate.

  9. Rust docs for the Windows API (reference, Microsoft (windows-docs-rs), 30 min)

    Use it to look up how each Win32 API is exposed in Rust once you start writing your own calls.

  10. $MFT (reference, Forensics Wiki, 15 min)

    It explains the NTFS Master File Table, the structure that lets a tool search every file almost instantly.

  11. Lemxy/WinRust: Windows shell replacement in Rust (repo, Lemxy (GitHub), 45 min)

    Read this real project last. It combines a Cargo workspace, a shared crate, an NTFS MFT reader and an installer. Read the README warnings before running anything, because it changes system settings.