tauri-apps / tauri-apps/tauri-docs
[docs] Issue with `cargo add` Command for Tauri Plugin Installation
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 1.1k
- Forks
- 887
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 48
Description
Hi,
I encountered a cargo error while trying to install a Tauri plugin in my project following the manual setup guide.
The original command I used was:
cargo add tauri-plugin-autostart --target 'cfg(any(target_os = "macos", windows, target_os = "linux"))'
This resulted in an error. However, when I modified the command to:
cargo add tauri-plugin-autostart --target 'cfg(any(target_os = "macos", target_os = "windows", target_os = "linux"))'
The issue was resolved, and the error disappeared.
It seems there’s a syntax inconsistency causing the problem. Could this be clarified in the documentation to prevent similar issues for other users?
Thank you!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the manual setup guide section that documents installing the Tauri plugin with cargo add. Compare the documented target expression with the working command reported here, then update the example so the Windows target syntax is explicit and verify the guide no longer shows the failing form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100