# Pre-RFC: Allow packages to specify a set of supported targets

**URL:** <https://internals.rust-lang.org/t/pre-rfc-allow-packages-to-specify-a-set-of-supported-targets/21979>\
**Category:** cargo\
**Created:** [December 6, 2024, 2:09am UTC](https://internals.rust-lang.org/t/pre-rfc-allow-packages-to-specify-a-set-of-supported-targets/21979 "2024-12-06T02:09:20Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![newpavlov](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/newpavlov/32/3290_2.png) [@newpavlov](https://internals.rust-lang.org/u/newpavlov)\
**Post date:** [December 9, 2024, 1:27pm UTC](https://internals.rust-lang.org/t/pre-rfc-allow-packages-to-specify-a-set-of-supported-targets/21979/16 "2024-12-09T13:27:18Z")

</div>

Somewhat relevant proposal (see the "Integration with Cargo.toml" section):

> [@\[Pre-Pre-RFC\] Target restriction contexts](https://internals.rust-lang.org/t/7163):
>
> The following text is braindump-like description of how I would like to see Rust work with various target options. (target\_arch, target\_feature, target\_os and [others](https://doc.rust-lang.org/reference/attributes.html#conditional-compilation)) This approach aims to provide stronger compile time guarantees compared to current cfg setups, remove most of the unsafe in the [stdsimd](https://github.com/rust-lang-nursery/stdsimd) crate and integrate target parameters closer with Cargo.toml. Also it could be useful for improving Rust [portability story](https://internals.rust-lang.org/t/a-vision-for-portability-in-rust/6719). While [RFC 2045](https://github.com/rust-lang/rfcs/pull/2045) is an important step towards [stabilization](https://github.com/rust-lang/rust/issues/48556) of SIMD, I don…

---

_[View the full topic](https://internals.rust-lang.org/t/pre-rfc-allow-packages-to-specify-a-set-of-supported-targets/21979)._
