apache / incubator-teaclave-sgx-sdk

Apache Teaclave (incubating) SGX SDK helps developers to write Intel SGX applications in the Rust programming language, and also known as Rust SGX SDK.
https://teaclave.apache.org
Apache License 2.0
1.17k stars 264 forks source link

Request update for rust nightly version #386

Open Darm0n opened 2 years ago

Darm0n commented 2 years ago

The current version is Rust nightly-2020-10-25 is very old, I faced some problems compiling other libraries with rust sgx SDK project. Can you please support the more recent rust version?

haerdib commented 2 years ago

We're facing the same issue when upgrading to nightly-2022-02-02:

error[E0432]: unresolved import `core::prelude::v1::llvm_asm`
  --> /home/.cargo/git/checkouts/incubator-teaclave-sgx-sdk-f208006cdf70a903/08264d6/sgx_tstd/src/prelude/v1.rs:49:64
   |
49 |     format_args_nl, include, include_bytes, include_str, line, llvm_asm, log_syntax, module_path,
   |                                                                ^^^^^^^^ no `llvm_asm` in `prelude::v1`

error[E0432]: unresolved import `core::time::FromSecsError`
  --> /home/.cargo/git/checkouts/incubator-teaclave-sgx-sdk-f208006cdf70a903/08264d6/sgx_tstd/src/time.rs:61:9
   |
61 | pub use core::time::FromSecsError;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ no `FromSecsError` in `time`

error[E0432]: unresolved import `core::llvm_asm`
   --> /home/.cargo/git/checkouts/incubator-teaclave-sgx-sdk-f208006cdf70a903/08264d6/sgx_tstd/src/lib.rs:298:88
    |
298 |     env, file, format_args, format_args_nl, include, include_bytes, include_str, line, llvm_asm,
    |                                                                                        ^^^^^^^^ no `llvm_asm` in the root

error[E0412]: cannot find type `FromSecsError` in module `core::time`
   --> /home/.cargo/git/checkouts/incubator-teaclave-sgx-sdk-f208006cdf70a903/08264d6/sgx_tstd/src/error.rs:573:28
    |
573 | impl Error for core::time::FromSecsError {}
    |                            ^^^^^^^^^^^^^ not found in `core::time`

error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> /home/.cargo/git/checkouts/incubator-teaclave-sgx-sdk-f208006cdf70a903/08264d6/sgx_tstd/src/panicking.rs:546:29
    |
546 |             let panicinfo = PanicInfo::internal_constructor(message, location);
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -------  -------- supplied 2 arguments
    |                             |
    |                             expected 3 arguments
    |
note: associated function defined here
   --> /home/.rustup/toolchains/nightly-2022-02-02-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/panic_info.rs:45:12
    |
45  |     pub fn internal_constructor(
    |            ^^^^^^^^^^^^^^^^^^^^

error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> /home/.cargo/git/checkouts/incubator-teaclave-sgx-sdk-f208006cdf70a903/08264d6/sgx_tstd/src/panicking.rs:552:20
    |
552 |     let mut info = PanicInfo::internal_constructor(message, location);
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -------  -------- supplied 2 arguments
    |                    |
    |                    expected 3 arguments
    |
note: associated function defined here
   --> /home/.rustup/toolchains/nightly-2022-02-02-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/panic_info.rs:45:12
    |
45  |     pub fn internal_constructor(
    |            ^^^^^^^^^^^^^^^^^^^^
volcano0dr commented 2 years ago

I will upgrade the rust version for the SDK as soon as possible.I plan to upgrade to rust-nightly-2022-02-23.

clangenb commented 2 years ago

This toolchain is still quite old, is there a blocker for never releases?

hiroki-chen commented 2 years ago

Also found it necessary to upgrade to a newer version of toolchain because we are using cargo extensions which were built with a newer nightly Rust toolchain but the current SDK library is incompatible with newer toolchain (e.g., nightly-2022-08-25) :(

volcano0dr commented 2 years ago

@hiroki-chen Thank you for using teaclave-sgx-sdk. I plan to upgrade the Rust toolchain this month.

hiroki-chen commented 2 years ago

@hiroki-chen Thank you for using teaclave-sgx-sdk. I plan to upgrade the Rust toolchain this month.

Glad to hear this! Thank you for your efforts.

haerdib commented 2 years ago

Is there any update on the rust-toolchain upgrade? We're also blocked because of a recently stabilized feature bool::then_some in rust 1.62 in June.

hiroki-chen commented 2 years ago

@haerdib Hi there, I have forked teaclave-rust-sgx-sdk v2.0.0 and tried to update it to nightly-2022-08-30. Some updates may be hacky so I am not sure whether this works for you, but this suits my project well. The link is here. Perhaps you could use this version as an alternative SDK in your development environment for the time being? If it does not work, we may still need to wait for the upstream update :(

volcano0dr commented 2 years ago

@haerdib @hiroki-chen Sorry for the delay in updating rust-toolchain, because I have no more free bandwidth recently. I created the v1.1.6-testing branch, which supports rust-nightly-2022-10-22 and bump version to 1.1.6. I also updated the v2.0.0-previewbranch.

hiroki-chen commented 2 years ago

@volcano0dr Thank you for the update!

clangenb commented 2 years ago

Thanks a lot! Would you mind sharing the process on how you perform this update? Then we could try helping out if you lack time the next time.

volcano0dr commented 2 years ago

@clangenb Of course, I can share the upgrade process. Also, I would like to know if you are working on SDK v1.1.xor v2 now?

clangenb commented 2 years ago

Currently, we are working with v1.1.x, but at some point we will probably migrate. Are you planning to maintain v2 only at some point?

volcano0dr commented 2 years ago

I will continue to maintain v1.1.xfor a while, but as the v2 version stabilizes, I will consider pushing preview-v2.0.0 as master. Migrating to v2 may take some effort. A major change in v2 is that there is no need to modify the third-party crate, which can save a lot of maintenance costs.

clangenb commented 2 years ago

Yes, I must admit I wasn't aware of the v2.0.0 branch until recently, but it sounds very tempting. :) We are going productive soonish; hence we can only afford to migrate if it is stable. However, reduced maintenance cost is definitely something we are looking forward to. :)

volcano0dr commented 2 years ago

Once v2 is stable, I can help you with the migration if you need it.

volcano0dr commented 2 years ago

As far as I know, Baidu's team has already migrated Teaclave FaaS to SDK v2. So I think v2 will be stable soon in the near future.

clangenb commented 2 years ago

Alright, we will look into this soon! Thanks!

mssun commented 2 years ago

@clangenb Hi, there are still some missing parts to merge version 2. I would be grateful if you would help us.

clangenb commented 2 years ago

We haven't started to have a look at v2 yet. How would you like us to contribute?