Publish to crates.io

The crates/publish folder contains a placeholder crate, so that the book could be located when searching on crates.io.

  • cargo update if necessary
  • Go to crates.io, sign in, and create an API token in Account Settings > API Tokens.
  • Use cargo login to save the token in $CARGO_HOME/credentials.toml.
  • cd crates/publish
  • cargo build --locked --release
  • cargo clippy
  • cargo run --release
  • cargo doc
  • Review cargo package --list
  • cargo package
  • Review the packaging output in /cargo-target-rust_howto/target/package.
  • When ready, cargo publish --dry-run; cargo publish