-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cfg(wasm)
unifying target_arch="wasm32"
and target_arch="wasm64"
#83879
Comments
@rfcbot fcp merge |
target_arch="wasm32"
and target_arch="wasm64"
cfg(wasm)
unifying target_arch="wasm32"
and target_arch="wasm64"
Related: rust-lang/stdarch#974 |
Based on discussions on Zulip, it sounds like we don't want to have this be insta-stable. However, I do think we want to have Gathering consensus on adding a feature-gated @rfcbot merge |
Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
I'd like to note that having bare aliases like this can be confusing for some users. I occasionally run into users who get tripped up by unix/windows, and don't understand why other things like |
@ehuss I would be in favor of adding aliases for other common cases, to make them simpler to write and simpler to read. |
I agree that they look easier to read (and are more aesthetically pleasing), but I am concerned that they are harder to understand, especially when they are "common" exceptions. Users sometimes learn by looking at existing code to build their mental model of how things work (instead of reading or remembering documentation), and when they try to apply their mental model to new situations (like writing I don't want to oversell my objection here. It is very difficult to predict how well users will understand a concept like this. I can just say that there are some users who struggle with the current system caused by "unix" and "windows", and I am concerned this may contribute to more confusion. Adding more aliases may make it even harder to understand when the thing you want to match on isn't part of that blessed set of aliases. |
One thing to note specifically in the case of wasm is that wasm32 and wasm64 are not actually separate architectures, it is just a weird abstraction in llvm to represent wasm memory64 types. I would like to provide a very ergonomic way for the rust ecosystem to quickly coalesce on wasm-supporting crates targeting the wasm architecture without having to write out All that being said, I'm fine with other solutions besides the specific |
…-Simulacrum Remove the insta-stable `cfg(wasm)` The addition of `cfg(wasm)` was an oversight on my end that turns out to have a number of downsides: * It was introduced as an insta-stable addition, forgoing the usual staging mechanism we use for potentially far-reaching changes; * It is a breaking change for people who are using `--cfg wasm` either directly or via cargo for other purposes; * It is not entirely clear if a bare `wasm` cfg is a right option or whether `wasm` family of targets are special enough to warrant special-casing these targets specifically. As for the last point, there appears to be a fair amount of support for reducing the boilerplate in specifying architectures from the same family, while ignoring their pointer width. The suggested way forward would be to propose such a change as a separate RFC as it is potentially a quite contentious addition. cc rust-lang#83879 `@devsnek`
@rfcbot reviewed Speaking personally, I am so happy I can write 'unix' vs 'windows', and I would be very happy to be able to type 'wasm'. |
An update on the current state: We have removed the |
@nagisa should we cancel the FCP and close? |
Yeah.
…On Tue, 13 Apr 2021, 20:00 Niko Matsakis, ***@***.***> wrote:
@nagisa <https://github.com/nagisa> should we cancel the FCP and close?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#83879 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFFZUX2OCRA3YH3HHF2OILTIR2ERANCNFSM42MT6XCQ>
.
|
@rfcbot fcp cancel |
@nikomatsakis proposal cancelled. |
In #80525 we added to nightly a
cfg(wasm)
which is set when either wasm32 or wasm64 targets are used. We don't have top-level cfg values for other architectures in a similar situation, only for windows vs unix which is set based on the OS.This ended up being an insta-stable addition due to oversight of mine.
This issue is in order to gather consensus from T-lang members that we do indeed want this
cfg
. I will make myself a note to either remove thiscfg
or put it behind a feature gate before the next nightly->beta rollover that happens on May 6th if such consensus is not gathered.Zulip discussion
PR adding the cfg
The text was updated successfully, but these errors were encountered: