We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
It would be great if i can still use the simd feature, but disable its functionality when not building for nightly.
The simplest way to accomplish this would be in a build script call this:
fn set_nightly_cfg() { let rustc = std::env::var("RUSTC").unwrap(); let version = std::process::Command::new(rustc) .arg("--version") .output() .unwrap(); assert!(version.status.success()); let stdout = String::from_utf8(version.stdout).unwrap(); assert!(stdout.contains("rustc")); let nightly = stdout.contains("nightly") || stdout.contains("dev"); if nightly { println!("cargo:rustc-cfg=rust_nightly"); println!("cargo::rustc-check-cfg=cfg(rust_nightly)"); } }
And simd_portable + simd featues can then be feature gated like:
#![cfg_attr(rust_nightly, feature(portable_simd))]
Unfortunately cargo has no way to enable specific features on nightly only
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
It would be great if i can still use the simd feature, but disable its functionality when not building for nightly.
The simplest way to accomplish this would be in a build script call this:
And simd_portable + simd featues can then be feature gated like:
#![cfg_attr(rust_nightly, feature(portable_simd))]
Unfortunately cargo has no way to enable specific features on nightly only
The text was updated successfully, but these errors were encountered: