inefficient approach to looking up documentation for rust crates
Resolved 💬 3 comments Opened Mar 28, 2025 by max-sixty Closed May 31, 2025
an observation, rather than a bug, no need to leave the issue open
claude code seems to use overly human approaches to looking at docs, which are quite inefficient in time & likelihood of success. specifically here it:
- uses
cargo doc -p chumsky --open, which opens a web browser — claude can't see the browser! - uses web fetch, when it could look at the code in the cargo registry[^1] path on disk. since rust keeps all dependencies in the project's path. (from an IDE, tracing a symbol, would navigate to the dependency in
target, for example)
⏺ Web Fetch(url: "https://github.com/zesterer/chumsky/blob/v0.10.0/examples/paren_lang.rs", prompt: "Find an example of how to use Stream::from_iter in Chumsky 0.10, …
specifically looking for how the end-of-input marker is handled.")
⎿ Success
⏺ Web Fetch(url: "https://github.com/zesterer/chumsky/blob/master/examples/json.rs", prompt: "Find an example of how to use Stream in Chumsky 0.10, specifically looking for…
how to properly create a stream from a collection of items.")
⎿ Success
⏺ Let's look at the definition of Stream to understand how to use it properly:
⏺ Bash(cd /Users/maximilian/workspace/prql/.worktrees/chumsky && cargo doc -p chumsky --open)…
...
Opening /Users/maximilian/workspace/prql/.worktrees/chumsky/target/doc/chumsky/index.html
[^1]: though this has a different problem (it looked in the registry in a later session): because it's outside the project path, claude asks each time it wants to read a small snippet of a file... looks like it doesn't honor the Read permissions. could we enable access to that by default?
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗