-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
target_env collision on fortanix-sgx #57231
Comments
cc @jethrogb |
Which issues are you running into specifically? AFAIK all patches that we have submitted to crates.io crates should be generic enough that they'd work in any SGX environment, there have not been any dependencies on the Fortanix-specific In any case, I propose
Just FYI, there is no dependency on Intel's libraries whatsoever. |
IMO this is not a bug. Both projects are |
Let me clarify. When I'm using xargo to build the sysroot, libpanic_abort would be built resulting in the following error:
In my environment, Please correct me if i'm wrong. If we apply @nagisa 's solution, |
That’s a bug with how EDIT: That being said, I do agree that most of the libstd code that is for |
@nagisa Thanks for the advise. I'm working on a PR. |
Submitted PR 57243 |
|
Bound sgx target_env with fortanix as target_vendor This PR adds `target_vendor` check, as discussed in issue [57231](#57231) Signed-off-by: Yu Ding <dingelish@gmail.com>
Add essential target_vendor check for sgx As discussed in issue [57231](rust-lang/rust#57231), the current `sgx` branch only works for Fortanix's sgx platform. So the `target_vendor` should be checked here. Signed-off-by: Yu Ding <dingelish@gmail.com>
Hi there,
I'm Yu Ding from Baidu and I'm maintaining Baidu's rust-sgx-sdk. It has been open-sourced for more than 2 years and adopted by many blockchain companies. And I presented a talk on RustFest'18 Paris about this project. It shares the same goal with Fortanix's target -- fortanix-sgx, while it is significantly differs from fortanix.
Currently, my strategy is to build up the rust+sgx ecosystem on top of libcore+rustc+cargo/xargo and link Intel's SGX libraries to provide basic SGX functions. Fortanix's solution does not always depends on Intel's SGX libraries -- they re-implement many of the Intel's codes in Rust.
There is no need to discuss which is better. These two solutions differ from each other based on their different assumptions about trust. So they cannot be compared directly. And I'm pretty much happy to see that Fortanix guys are doing cool things.
The problem I want to say is that Fortanix's PR occupies 'sgx' as a target_env. This results in a disaster in my project -- I'm using 'sgx' as target_env as well. So a large amount of existing Rust+SGX projects based on rust-sgx-sdk could not be built using xargo due to the collision of
target_env
.I wonder if the built-in target could be renamed as
fortanix-sgx
or some other identifier other thansgx
. This would be very much helpful to the existing Rust-SGX ecosystem. A number of rust-sgx projects such as MIT's enigma, UC Berkeley's ekiden, are using xargo to build their Rust-SGX enclaves. As you can see that rust-sgx-sdk has 466 github stars which is more popular than Intel's SDK (395 stars).I can provide PR if needed. Thank you guys so much.
Best,
Yu
The text was updated successfully, but these errors were encountered: