faster icon indicating copy to clipboard operation
faster copied to clipboard

Can't build for nightly Rust

Open vidov0 opened this issue 6 years ago • 12 comments

Hi Adam,

Your library uses stdsimd as a external dependency crate, which landed in Rust std awhile ago. It also uses an old target_feature attribute syntax that compiler complains about. Do you plan on updating your library to compile with nightly Rust any time soon ? If not, can you please advise me on how to do necessary changes in order to utilize your library, since I am fairly new to Rust.

vidov0 avatar Jun 05 '18 06:06 vidov0

I do intend to make this library compile with std::arch on nightly (and on stable as soon as cross-platform SIMD lands). I've been waiting for the cross-platform SIMD RFC to be merged (although I haven't checked in on it recently) before I continue, though.

Check the rust-2018-migration branch for a version of the library which emits fewer warnings and should compile on the current nightly.

EDIT 07/26/18: Use 0.5.0 on crates.io

AdamNiederer avatar Jun 05 '18 17:06 AdamNiederer

Hey Adam,

Stable Rust 1.27.0 with SIMD is out. Take a look at: https://blog.rust-lang.org/2018/06/21/Rust-1.27.html

vidov0 avatar Jun 22 '18 04:06 vidov0

They mention your crate in the examples part ...

vidov0 avatar Jun 22 '18 04:06 vidov0

Just for reference : https://github.com/rust-lang-nursery/stdsimd/issues/488 (stdsimd/coresimd should not be used from crates.io anymore)

yhql avatar Jun 23 '18 18:06 yhql

Quick update: As of db60c964983fd5edc58543577751d3c4e1e3a806, faster will build on 06-19 nightly. Three tests fail because of name clashes. Once those are fixed, I will merge the rust 2018 branch and release a new major version to Cargo.

Also of interest: I should be able to build it on stable if I copy stdsimd's portable vectors into the codebase.

AdamNiederer avatar Jun 24 '18 05:06 AdamNiederer

Great news, thanks !

vidov0 avatar Jun 24 '18 09:06 vidov0

@AdamNiederer note that you cannot use cargo-features = ["edition"] on stable, you will have to disable it (and rust_2018_preview) then sed away all crate:: occurrences.

mati865 avatar Jun 27 '18 08:06 mati865

Any news?

prokopst avatar Jul 25 '18 20:07 prokopst

0.5.0 should compile on the current nightly. Are you having any trouble with it?

EDIT: Oh, they removed core::simd from the standard library a few days ago. We just started compiling on master again!

AdamNiederer avatar Jul 27 '18 00:07 AdamNiederer

I've also noticed they removed core::simd - no idea why. core::simd still present in nightly-2018-07-19

vidov0 avatar Jul 27 '18 01:07 vidov0

coresimd was accidentally stabilised, it's fixed now.

mati865 avatar Jul 27 '18 07:07 mati865

Compiling faster v0.5.0
error[E0433]: failed to resolve. Maybe a missing`extern crate std;`?
  --> /Users/blackanger/.cargo/registry/src/mirrors.ustc.edu.cn-15f9db60536bad60/faster-0.5.0/src/vecs.rs:10:12
   |
10 | use crate::std::fmt::Debug;
   |            ^^^ Maybe a missing `extern crate std;`?

error[E0433]: failed to resolve. Maybe a missing`extern crate std;`?
 --> /Users/blackanger/.cargo/registry/src/mirrors.ustc.edu.cn-15f9db60536bad60/faster-0.5.0/src/iters.rs:9:12
  |
9 | use crate::std::slice::from_raw_parts;
  |            ^^^ Maybe a missing `extern cratestd;`?

error[E0433]: failed to resolve. Maybe a missing`extern crate std;`?
 --> /Users/blackanger/.cargo/registry/src/mirrors.ustc.edu.cn-15f9db60536bad60/faster-0.5.0/src/intrin/eq.rs:8:12
  |
8 | use crate::std::ops::BitXor;
  |            ^^^ Maybe a missing `extern cratestd;`?

error[E0433]: failed to resolve. Maybe a missing`extern crate std;`?
  --> /Users/blackanger/.cargo/registry/src/mirrors.ustc.edu.cn-15f9db60536bad60/faster-0.5.0/src/arch/x86/intrin/abs.rs:14:12
   |
14 | use crate::std::mem::transmute;
   |            ^^^ Maybe a missing `extern crate std;`?

ZhangHanDong avatar Oct 07 '18 14:10 ZhangHanDong