fortanix / rust-sgx

The Fortanix Rust Enclave Development Platform
https://edp.fortanix.com
Mozilla Public License 2.0
433 stars 98 forks source link

Reduce duplication of code in provider_api.rs #532

Open vn971 opened 12 months ago

vn971 commented 12 months ago

Currently, the code in rust-lang/sys/sgx/abi/usercalls/mod.rs and in rust-sgx/intel-sgx/async-usercalls/src/provider_api.rs (https://github.com/fortanix/rust-sgx/pull/515) is almost identical for functions copy_user_buffer and string_from_bytebuffer. After the above PR gets merged, we may be interested in using the new code from inside the Rust standard library (official rust-lang repository). Note that simply making the function public may not be desirable because the code can be considered internal to the SGX platform. This decision is up for the person to pick up this issue