-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
I'm looking at options for embedding source tree metadata into Rust binaries, and CLAP_LONG_VERSION from shadow-rs seems to do the job well.
However, the second project I tried it on is https://github.com/cubing/twsearch/ , which is much slower in debug mode and therefore requires developing using release mode. Unfortunately:
| Mode | without shadow-rs |
with shadow-rs |
|---|---|---|
| debug (incremental) | 1.37s | 2.15s |
| debug (no-op) | 0.38s | 0.38s |
| release (incremental) | 5.45s | 6.13s |
| release (no-op) | 0.34s | 🚨 6.25s |
We do have some situations where we expect the no-op compilation to be fast, and we can't really handle an extra 6 seconds for that.
Is there a simple way to skip the compilation if the following hold?
- The commit hash is unchanged.
- The build time is within, say… one hour of the previously used time?
Rounding down to the nearest hour would also work, and perhaps avoid implying extra precision for incremental compiles.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels