AdamNiederer / faster

SIMD for humans
Mozilla Public License 2.0
1.56k stars 51 forks source link

Can't build for nightly Rust #38

Open vidov0 opened 6 years ago

vidov0 commented 6 years ago

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.

AdamNiederer commented 6 years ago

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

vidov0 commented 6 years ago

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 commented 6 years ago

They mention your crate in the examples part ...

yhql commented 6 years ago

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

AdamNiederer commented 6 years ago

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.

vidov0 commented 6 years ago

Great news, thanks !

mati865 commented 6 years ago

@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.

prokopst commented 6 years ago

Any news?

AdamNiederer commented 6 years ago

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!

vidov0 commented 6 years ago

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

mati865 commented 6 years ago

coresimd was accidentally stabilised, it's fixed now.

ZhangHanDong commented 6 years ago
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;`?