windows-drivers-rs icon indicating copy to clipboard operation
windows-drivers-rs copied to clipboard

[cargo-wdk] Clarify terminology in Readme

Open krishnakumar4a4 opened this issue 7 months ago • 5 comments

Rust has its own meaning to the terms package, crate & workspace. WDR has domain terms like package & project used in different contexts. Package has become an overloaded term that is used to indicate final driver package as well as used in the context of packaging flow. So, it's best to clarify in the Readme explicitly, the terms we plan to use and their meaning in the WDR context.

krishnakumar4a4 avatar May 21 '25 06:05 krishnakumar4a4

We could add a Terminology section in the README explaining how we use these terms and then ensure they are used consistently across the code base.

gurry avatar May 21 '25 06:05 gurry

From our discussion yesterday, I think our current thinking is to continue using Package for Cargo packages and use Driver Package for the collection of files that cargo-wdk spits out for Windows to install

wmmc88 avatar May 30 '25 22:05 wmmc88

May I propose using the term "crate" for cargo packages? Some reasons to support that:

  • "crate" is already used interchangeably with "package" in the Rust community. It is in fact more common than "package" in my experience. The main Rust registry for example is called crates.io not packages.io.
  • We too use that term in our repo .e.g. the folder containing all the cargo packages is called "crates" not "packages".
  • Currently we don't have any cargo package containing multiple crates. We might have one in the future but even then I don't think using the term "crate" will cause much confusion.

Once we go with "crate" then "package" becomes available for Windows driver packages and it will be super clear what these terms mean.

gurry avatar Jun 19 '25 08:06 gurry

Cargo pretty much universally refers to it as Packages: https://doc.rust-lang.org/cargo/commands/cargo-build.html#package-selection

This would be especially confusing because of cargo package selection. to build a single package rn you do cargo build --packages <package name>. Making it cargo wdk build have a different param name would be odd

wmmc88 avatar Jun 19 '25 18:06 wmmc88

Those are valid points as well. Let's have a think when we implement this issue.

gurry avatar Jun 20 '25 09:06 gurry