Skip to content

Add minimal feature search#4635

Open
kennykerr wants to merge 2 commits into
masterfrom
features
Open

Add minimal feature search#4635
kennykerr wants to merge 2 commits into
masterfrom
features

Conversation

@kennykerr

Copy link
Copy Markdown
Collaborator

Fixes: #4631

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Restores the previously removed windows-rs “feature search” by adding a metadata-driven generator that produces a self-contained static search page under web/features, and wiring up CI to keep it regenerated and deploy it via GitHub Pages (addressing #4631).

Changes:

  • Add tool_features to generate web/features/index.html from the bundled .winmd metadata, including extra required features inferred from function/method signatures.
  • Add a GitHub Pages workflow to deploy the web/ folder (serving the page at /features).
  • Extend the gen workflow matrix to include the new features tool so generated output stays up to date.

Reviewed changes

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

File Description
crates/tools/features/src/main.rs Implements the metadata scan and emits a dependency-free, inlined-index web/features/index.html.
crates/tools/features/Cargo.toml Adds the new tool_features crate configuration and dependency on windows-metadata.
.github/workflows/web.yml Deploys ./web to GitHub Pages on updates, enabling the /features endpoint.
.github/workflows/gen.yml Adds features to the tool generation matrix so CI verifies the generated page is current.

if (own) features.push(own);
if (extras) for (const ei of extras) { const f = featureOf(DATA.namespaces[ei]); if (f) features.push(f); }
const cell = features.length
? features.map(f => '<code class="feature">' + f + '</code>').join(' + ')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can this be changed to render features enclosed in ASCII double quotes ("), concatenated by , instead of +? This would enable copy-pasting the output straight into Cargo.toml, just like the previous feature search did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

windows-rs feature search?

3 participants