Add built-at-build crate - #92
Conversation
|
Thanks for the PR. I'm not entirely sure if I understand the intention of this code: Is this code supposed to be published to crates.io, for people to depend on it instead of |
Thanks for the quick response. The use case is when you want to access the info provided by The specific use case I am submitting this PR for is comparing pre-compiled static library build environments to the binary that I am actively compiling in Use Case Example
The root cause for needing this comparison is that when doing Rust <-> Rust ffi, some platforms will throw cryptic linker errors when build toolchains don't match between static libs and binaries using them. Alternate PathAn alternate option would be to include this functionality in the |
|
AFAICS the use-case here falls into the category of mad-scientist things people need to do in niche cases. Mad scientists do important science stuff as well, yet we never run out of use-cases, while having no hope for a truly transparent build system. I'd be hesitant to add an "official" crate for the sole purpose of observing that crate while building another, as 1) there will always be another use-case that is slightly different and needs another knob, 2) downstream can always add their own crate (or code-duplication) to do exactly that, and 3) there is a considerable case to be made that In that light, I'd rather
|
|
Ok, no worries. I had originally implemented this solution in my own crate and was about to hit release and realized it might be useful in this crate. I think a recipe is a great idea. I'll get this PR edited into that. Would you prefer it go in |
|
Moving |
I wanted the ability to access the built information at build time. I originally opened an issue but decided that I didn't like the struct approach and instead a dependent crate would make more sense. This way you can even get compile time checking in the build script.
I'm not married to the name of the crate or the specific implementation, I just want the feature.
Thanks!