# Search Rustdoc

> Search dependency documentation by building rustdoc locally and grepping HTML files. Use when you need to find functions, types, method signatures, or usage patterns from Rust dependencies like wgpu, prost, naga_oil, or any crate in the project. Use when this capability is needed.

- Skill: `tomevault-io/search-rustdoc` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/search-rustdoc`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/search-rustdoc/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/search-rustdoc

---


# Search Rust Dependency Documentation

Use this skill to find API details, function signatures, and usage patterns from project dependencies when docs.rs is insufficient or you need to search across multiple crates.

## Step 1: Build Documentation

Build docs for the workspace and all dependencies:

```bash
# Do not pass --open to cargo doc!
cargo doc --workspace
```

This generates HTML documentation in `target/doc/`. Each crate gets its own subdirectory.

## Step 2: Search the Generated Docs

The docs are HTML files. Use grep to search:

```bash
# Search for a function name
grep -r "fn create_buffer" target/doc/wgpu/

# Search for a struct
grep -r "struct Device" target/doc/wgpu/

# Search for a pattern across all deps
grep -rh "compile_protos" target/doc/ --include="*.html" | head -50

# Find methods on a type
grep -r "impl.*Queue" target/doc/wgpu/
```

## Step 3: Read Specific Documentation

Documentation files follow predictable paths:

| What | Path |
|------|------|
| Crate root | `target/doc/<crate>/index.html` |
| Module | `target/doc/<crate>/<module>/index.html` |
| Struct | `target/doc/<crate>/struct.<Name>.html` |
| Enum | `target/doc/<crate>/enum.<Name>.html` |
| Function | `target/doc/<crate>/fn.<name>.html` |
| Trait | `target/doc/<crate>/trait.<Name>.html` |
| All items | `target/doc/<crate>/all.html` |

## Tips

- HTML contains full docstrings — search for text you'd see on docs.rs
- Use `--include="*.html"` to skip source maps and JS files
- Crate names use underscores: `wgpu_core`, `prost_build`
- The `all.html` file lists every public item in a crate

---
> Source: [feilkin/onyxia](https://github.com/feilkin/onyxia) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-07-02 -->

