How to release alpha version

Hi folks,

I need to release an alpha version of the new major version of the library. New version is not good enough yet to commit to semver compatibility, but I see some users just use the master version from github. Providing alpha versions might be helpful for these people.

Cargo documentation on that matter is scarce, so I'm seeking help.

From that documentation I got that:

  • versions should be something like 3.0.0-alpha.1, 3.0.0-alpha.2, ...
  • cargo will not automatically upgrade one alpha to another alpha
  • if requested version is specified as "3", cargo will not fetch the alpha version
  • is it possible to depend on alpha version to publish a crate to crates?
  • and the important question: what will be shown on crates.io website, previous stable 2.22.2 version or the latest alpha 3.0.0-alpha.2 version?

What are the pitfalls of releasing an alpha version?

1 Like
  1. Yes
  2. Yes
  3. Yes
  4. Yes, specify the full version exactly as 3.0.0-alpha.1
  5. crates.io shows latest stable. https://lib.rs shows latest-latest.
2 Likes

If you specify your dependency like name = "3.0.0-alpha.1", cargo will select the latest stable patch (e.g. 3.0.5) or latest alpha (e.g. 3.0.0-alpha.5) with the same major and minor version if it's available. So it's better to depend on alpha versions using name = "=3.0.0-alpha.1".

4 Likes