Link-time optimisation is something that application authors opt-in to, it requires no effort on the part of library authors. It was unclear of me to say "you" in that context. Rephrased: to get the fastest binary available, an application author can use LTO and that will suck in (and possibly inline) functions from all the Rust libraries that they depend on, whether or not there is
#[inline(always)] annotations in those libraries. That is,
-C lto is a little like a retroactive
#[inline] on steroids.
(In fact, AIUI, library authors cannot do anything with
-C lto: it only works when producing a final artifact, that is, a binary or static-lib.)
The compiler currently does not automatically serialize to metadata (that is, only generic,
#[inline(always)] functions are in metadata)... but, as you say, it's not explicitly disallowed.