Skip to content

Conversation

@hughsie
Copy link
Member

@hughsie hughsie commented Dec 15, 2025

Type of pull request:

@hughsie hughsie marked this pull request as ready for review December 15, 2025 18:32
@hughsie hughsie requested a review from hssinf as a code owner December 15, 2025 18:32
@hughsie hughsie requested review from Copilot and djasa December 18, 2025 21:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the QSI Dock plugin's C header definitions to Rust format. The migration converts enums and structs from C to Rust, following fwupd's pattern of using Rust for structure definitions while maintaining C compatibility through generated headers.

Key changes:

  • Converted FuQsiDockFirmwareIdx, FuQsiDockCmd1, FuQsiDockCmd2Cmd, FuQsiDockCmd2Spi enums from C to Rust
  • Converted FuQsiDockIspVersionInMcu struct from C to Rust
  • Updated meson.build to include Rust code generation
  • Removed the old C header file fu-qsi-dock-common.h

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
plugins/qsi-dock/meson.build Added rustgen.process() for the new Rust file
plugins/qsi-dock/fu-qsi-dock.rs New Rust file containing migrated enums and struct definitions
plugins/qsi-dock/fu-qsi-dock-mcu-device.c Updated include from fu-qsi-dock-common.h to fu-qsi-dock-struct.h (generated), updated constant references
plugins/qsi-dock/fu-qsi-dock-common.h Deleted - replaced by Rust definitions

@hughsie hughsie force-pushed the hughsie/rustgen-qsi branch from 185fb24 to b03c208 Compare December 19, 2025 10:03
Copy link
Collaborator

@djasa djasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hughsie hughsie merged commit 86d67a8 into main Dec 19, 2025
23 checks passed
@hughsie hughsie deleted the hughsie/rustgen-qsi branch December 19, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants