We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
The example only shows "linux", but what values are set on other platforms?
How can I check what's my platform's name according to Rust?
Is there a way to target all Unix platforms? (OS X, FreeBSD, etc.)
Is there a way to target x86 and ARM?
The text was updated successfully, but these errors were encountered:
This seems to be documented under Reference/conditional compilation. Looks like you'd use:
#[cfg(any(target_os = "linux", target_os = "freebsd"))] fn needs_linux_or_freebsd() {}
How nesting is applied isn't completely clear though it states you can.
Sorry, something went wrong.
Ah, target_family looks like what you need.
target_family
f3f947c
No branches or pull requests
The example only shows "linux", but what values are set on other platforms?
How can I check what's my platform's name according to Rust?
Is there a way to target all Unix platforms? (OS X, FreeBSD, etc.)
Is there a way to target x86 and ARM?
The text was updated successfully, but these errors were encountered: