Skip to content

Migrate from legacy winapi crate to official windows crate #10

@fasuizu-br

Description

@fasuizu-br

Description

The project uses winapi = "0.3" for Windows API bindings. The winapi crate is no longer actively maintained — the Rust Windows ecosystem has migrated to the official windows crate maintained by Microsoft.

Other projects in the risoflora organization (e.g., system_shutdown) have already migrated to windows = "0.62".

Current

[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3", features = ["winuser"] }

Suggested migration

[target.'cfg(windows)'.dependencies]
windows = { version = "0.62", features = ["Win32_UI_Input_KeyboardAndMouse"] }

The API calls (SendInput, GetKeyState, etc.) have direct equivalents in the windows crate with improved type safety.

Benefits

  • Active maintenance and security updates from Microsoft
  • Better type safety (HRESULT handling, strong types)
  • Consistent with the rest of the risoflora ecosystem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions