# Making profiles more flexible and useful?

**URL:** <https://internals.rust-lang.org/t/making-profiles-more-flexible-and-useful/23673>\
**Category:** cargo\
**Created:** [November 1, 2025, 4:53am UTC](https://internals.rust-lang.org/t/making-profiles-more-flexible-and-useful/23673 "2025-11-01T04:53:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![epage](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/epage/32/3171_2.png) [@epage](https://internals.rust-lang.org/u/epage)\
**Post date:** [November 1, 2025, 11:40am UTC](https://internals.rust-lang.org/t/making-profiles-more-flexible-and-useful/23673/2 "2025-11-01T11:40:10Z")

</div>

Yes, what is currently provided does not give sufficient flexibility.

The fundamental problem with profile names is, outside of built-in names, the user can define whatever they want and using them would need ecosystem wide conventions.

What CAD97 said in the other thread (detect settings within a profile rather than the profile itself) has recently been discussed by the Cargo team and it is their official stance on how this problem should be solved. So now we just need custom settings.

We have unstable support for [profile rustflags](https://doc.rust-lang.org/cargo/reference/unstable.html#profile-rustflags-option) but that will likely stay permamently unstable.

As I mentioned in the other thread, [Pre-RFC: Mutually-excusive, global features](https://internals.rust-lang.org/t/pre-rfc-mutually-excusive-global-features/19618) is most likely the path forward for this.

References

- [Expose profile name to build.rs / program at runtime · Issue #11054 · rust-lang/cargo · GitHub](https://github.com/rust-lang/cargo/issues/11054#issuecomment-2634231798)

---

_[View the full topic](https://internals.rust-lang.org/t/making-profiles-more-flexible-and-useful/23673)._
