crypto2 icon indicating copy to clipboard operation
crypto2 copied to clipboard

When will it be available on stable Rust

Open asypost opened this issue 4 years ago • 18 comments

It can only be compiled on nighltly rustc for now,when will it be available on stable Rust?

asypost avatar Dec 06 '20 05:12 asypost

  1. stdsimd: http://rust-lang.github.io/rfcs/2977-stdsimd.html
  2. llvm_asm: https://github.com/rust-lang/rust/issues/70173
    • It could be rewritten with the latest asm! feature, but it still requires nightly.

Maybe @LuoZijun could consider to implement those features with pure ASM instead. These experimental features won't be stable in the near future.

zonyitoo avatar Dec 07 '20 01:12 zonyitoo

Oh, I see.Since I am a user of ShadowSocks-Rust and I found that it use this lib which make it can only build with nightly rustc,so I am wondering if this affects the stability of ShadowSocks-Rust.

asypost avatar Dec 07 '20 02:12 asypost

Well, using nightly doesn't means unstable. Actually all releases builds are built with nightly in Docker.

But it would be better to make it build with stable Rust, or it will require code changes if these experimental features are changed.

zonyitoo avatar Dec 07 '20 03:12 zonyitoo

llvm_asm: Tracking Issue for LLVM-style inline assembly (llvm_asm) rust-lang/rust#70173 It could be rewritten with the latest asm! feature, but it still requires nightly.

Seems like asm! was stabilized and llvm_asm! will be soon removed.

Y0ba avatar Jan 13 '22 12:01 Y0ba

It should be able to build with stable rust except aarch64 platform.

zonyitoo avatar Jan 26 '22 08:01 zonyitoo

Working on stable is really great! That's a welcome change :tada:. However, we kind of need aarch64 also, and nightly is not an option.

faern avatar Feb 01 '22 14:02 faern

the asm! macro will be stable in the next Rust release (1.59). Will it be possible to make crypto2 work on stable on all platforms then? Or what is currently blocking it?

faern avatar Feb 01 '22 14:02 faern

It doesn't related to asm! macro. The SIMD intrinsic functions for aarch64 is not stablized yet. https://doc.rust-lang.org/core/arch/aarch64/index.html

zonyitoo avatar Feb 01 '22 17:02 zonyitoo

Would there be a lot of work to implement a non-simd version of the code that is active as long as a nightly feature flag is not enabled or something?

faern avatar Feb 01 '22 18:02 faern

There shouldn't be a lot of work.

zonyitoo avatar Feb 01 '22 18:02 zonyitoo

1.59 already stable

tfzxyinhao avatar Feb 26 '22 05:02 tfzxyinhao

But core::arch for aarch64 is far from stable yet.

zonyitoo avatar Feb 26 '22 06:02 zonyitoo

Is there any way to extract aes and use it separately? I need aes in my project, but I can't use crypto2 in stable channel

tfzxyinhao avatar Feb 26 '22 06:02 tfzxyinhao

Nightly is only required for aarch64 target.

zonyitoo avatar Feb 26 '22 06:02 zonyitoo

can you tell me how to do it,I'm new to rust

tfzxyinhao avatar Feb 26 '22 06:02 tfzxyinhao

crypto2 = { git = "https://github.com/shadowsocks/crypto2.git" }

Use the master branch.

zonyitoo avatar Feb 26 '22 06:02 zonyitoo

thanks for your help

tfzxyinhao avatar Feb 26 '22 06:02 tfzxyinhao

It is easier to use,May I ask which mode is the default, cfb, cbc or ctr

tfzxyinhao avatar Feb 26 '22 07:02 tfzxyinhao