-
Notifications
You must be signed in to change notification settings - Fork 50
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
Release update fixing no_std builds #55
Comments
If you already updated num-traits with the problematic autocfg, can't you just update those again? There's nothing strictly necessary about bumping the version here, just a little extra assurance. |
@cuviper The currently published version (0.2.1) does not even use autocfg at all—it is still using the old use std::env;
use std::io::Write;
use std::process::{Command, Stdio};
fn main() {
if probe("fn main() { 0i128; }") {
println!("cargo:rustc-cfg=has_i128");
} else if env::var_os("CARGO_FEATURE_I128").is_some() {
panic!("i128 support was not detected!");
}
}
/// Test if a code snippet can be compiled
fn probe(code: &str) -> bool {
let rustc = env::var_os("RUSTC").unwrap_or_else(|| "rustc".into());
let out_dir = env::var_os("OUT_DIR").expect("environment variable OUT_DIR");
let mut child = Command::new(rustc)
.arg("--out-dir")
.arg(out_dir)
.arg("--emit=obj")
.arg("-")
.stdin(Stdio::piped())
.spawn()
.expect("rustc probe");
child
.stdin
.as_mut()
.expect("rustc stdin")
.write_all(code.as_bytes())
.expect("write rustc stdin");
child.wait().expect("rustc probe").success()
} |
Sure, but doesn't the currently published If that's not working, please share what versions you're using and the error messages. (I should publish a new version here anyway, but I won't be able to do that today.) |
num-complex 0.2.2 and 0.2.3 have been published. |
#54 was merged, which should allow for fixing no_std builds. rust-num/num-traits#115 released 0.2.8 of num-traits, fixing that. I currently cannot build no_std projects depending on
num
. Can we release a new version of num-complex that includes this change?The text was updated successfully, but these errors were encountered: