I'm beginner in Rust and trying to understand how to prepare and safely publish project on crates.io by following command:
cargo publish
will this command send the src/ folder or everything in project root (where CLI executed from)
for example, I have .vscode, .git and other dirs there, not sure package manager will send them but anyway.
You can find out exactly what files will be included in the published package by running
cargo package --list
The rules that cargo follows to make this list are documented in The Manifest Format: The exclude and include fields. By default, Cargo will ignore the same files Git is configured to ignore (by .gitignore or otherwise), so if you have files that are in version control but are not supposed to be in the package, you might want to add them to the manifest package.exclude list, or use a package.include list.