Skip to content

target_env collision on fortanix-sgx #57231

Closed
@dingelish

Description

@dingelish

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 than sgx. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions