apache / apache/teaclave-sgx-sdk
Porting Third Party Crates
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 268
- PR merge metrics
- No merged PRs in 30d
Description
I was wondering what is required to use a third party crate with this sdk.
For example wasmer-runtime.
I know that there exists a repo with forked crates, but I wanted to know if it was possible to do the porting myself.
When I try to use Wasmer inside an enclave I get the duplicate lang item errors:
```
error: duplicate lang item in crate `std` (which `wasmer_runtime` depends on): `f32_runtime`.
|
= note: first defined in crate `sgx_tstd` (which `sgx_addition` depends on).
error: duplicate lang item in crate `std` (which `wasmer_runtime` depends on): `f64_runtime`.
|
= note: first defined in crate `sgx_tstd` (which `sgx_addition` depends on).
error: duplicate lang item in crate `std` (which `wasmer_runtime` depends on): `panic_impl`.
|
= note: first defined in crate `sgx_tstd` (which `sgx_addition` depends on).
error: duplicate lang item in crate `std` (which `wasmer_runtime` depends on): `begin_panic`.
|
= note: first defined in crate `sgx_tstd` (which `sgx_addition` depends on).
error: duplicate lang item in crate `std` (which `wasmer_runtime` depends on): `oom`.
|
= note: first defined in crate `sgx_tstd` (which `sgx_addition` depends on).
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing repository of forked crates and the sgx_tstd and sgx_addition dependencies mentioned in the error. Reproduce the wasmer_runtime integration inside an enclave and investigate the duplicate lang item failures. Done would be a documented, confirmed procedure for porting a third-party crate, or a clear explanation of why this integration is unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- security
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100