rust-sgx | The Fortanix Rust Enclave Development Platform
kandi X-RAY | rust-sgx Summary
kandi X-RAY | rust-sgx Summary
The Fortanix Rust EDP is the preferred way to write Intel SGX enclaves from scratch. Looking for the in-enclave source code? Check out the rust-lang/rust repository.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rust-sgx
rust-sgx Key Features
rust-sgx Examples and Code Snippets
Community Discussions
Trending Discussions on rust-sgx
QUESTION
I am trying to use the Fortanix SGX framework to run libdvdcss in an enclave, but having problems with the linker.
I created a simple FFI wrapper around libdvdcss which works fine when executing it normally on Linux (without SGX and with libdvdcss installed globally). It does not work when I run it with the target x86_64-fortanix-unknown-sgx
as specified on the Getting started page, because the linker complains about many missing symbols, especially about malloc
etc.
From what I understand, the issue is that there is no libc in SGX, therefore I need to include rs-libc
manually, which is basically a libc to use in SGX. The rs-libc
crate contains C, ASM and also some Rust code (mostly for malloc
). Thus my Cargo.toml:
ANSWER
Answered 2021-Dec-01 at 04:41Adding an extern crate rs_libc;
to your crate's root should do the trick. It is mandatory that a dependency declared with extern crate
must be given to the linker. In rust 2018 and above, an appropriate declaration is implicitly added to your crate by the compiler if and only if you use one or more of that crate's symbols (rust 2015 requires the extern crate
be added explicitly). See the section in the rust reference for more information.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rust-sgx
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page