While it is impossible to detect API changes related to semantic differences, it is usually possible to identify whether a public API changed or not, e.g. via function signature or changes to an Enum variants.
Does anyone knows about a tool or binary that, given e.g. two git commit hashes of a repo, automatically detects / reports public API changes between them?
This would be really cool to build changelogs, and also as part of labeling issues e.g. on github.
wrt to the integration tests, is that the general recommendation, to ensure that only the public API is accessible to the tests (and thus also catch regressions on the API)?
An minor pain point I have atm is the re-compilation of the library when a test is changed. Moving some tests out of the lib files would also aleviate this, right?
I wouldn't call it a general recommendation, but rather my personal preferred testing style. I've found that testing at the boundaries maximizes both the reliability and maintainability of the test suite.
An minor pain point I have atm is the re-compilation of the library when a test is changed. Moving some tests out of the lib files would also aleviate this, right?
Right! Even moving the tests to an out-of-line #[cfg] mod tests; module will help somewhat. Although, if the library itself feels slow to compile, it probably makes sense to work on compile times a bit -- to make an end application pleasant to compile, all libraries it uses should compile very fast, as an app usually uses a lot of libs.