From 8abe7cbf359521de5395035fdcbf08c65fb28877 Mon Sep 17 00:00:00 2001 From: Jethro Beekman Date: Mon, 29 Aug 2022 14:41:37 +0200 Subject: [PATCH 1/2] Ignore mailto links in linkchecker --- src/tools/linkchecker/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs index a7c78d80ccd76..7842611bd4ffa 100644 --- a/src/tools/linkchecker/main.rs +++ b/src/tools/linkchecker/main.rs @@ -215,6 +215,7 @@ impl Checker { || url.starts_with("ftp:") || url.starts_with("irc:") || url.starts_with("data:") + || url.starts_with("mailto:") { report.links_ignored_external += 1; return; From 0303a31c8aca33653f079b1df6adc8c83447a74d Mon Sep 17 00:00:00 2001 From: Jethro Beekman Date: Mon, 29 Aug 2022 11:59:54 +0200 Subject: [PATCH 2/2] Document x86_64-fortanix-unknown-sgx platform --- src/doc/rustc/src/SUMMARY.md | 1 + src/doc/rustc/src/platform-support.md | 2 +- .../x86_64-fortanix-unknown-sgx.md | 72 +++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 src/doc/rustc/src/platform-support/x86_64-fortanix-unknown-sgx.md diff --git a/src/doc/rustc/src/SUMMARY.md b/src/doc/rustc/src/SUMMARY.md index 4e6bc41daa712..0941f9013eed6 100644 --- a/src/doc/rustc/src/SUMMARY.md +++ b/src/doc/rustc/src/SUMMARY.md @@ -32,6 +32,7 @@ - [*-unknown-openbsd](platform-support/openbsd.md) - [\*-unknown-uefi](platform-support/unknown-uefi.md) - [wasm64-unknown-unknown](platform-support/wasm64-unknown-unknown.md) + - [x86_64-fortanix-unknown-sgx](platform-support/x86_64-fortanix-unknown-sgx.md) - [x86_64-unknown-none](platform-support/x86_64-unknown-none.md) - [Targets](targets/index.md) - [Built-in Targets](targets/built-in.md) diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index f0f57f9338672..dd856e5d78a3d 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -174,7 +174,7 @@ target | std | notes `wasm32-unknown-unknown` | ✓ | WebAssembly `wasm32-wasi` | ✓ | WebAssembly with WASI `x86_64-apple-ios` | ✓ | 64-bit x86 iOS -`x86_64-fortanix-unknown-sgx` | ✓ | [Fortanix ABI] for 64-bit Intel SGX +[`x86_64-fortanix-unknown-sgx`](platform-support/x86_64-fortanix-unknown-sgx.md) | ✓ | [Fortanix ABI] for 64-bit Intel SGX `x86_64-fuchsia` | ✓ | 64-bit Fuchsia `x86_64-linux-android` | ✓ | 64-bit x86 Android `x86_64-pc-solaris` | ✓ | 64-bit Solaris 10/11, illumos diff --git a/src/doc/rustc/src/platform-support/x86_64-fortanix-unknown-sgx.md b/src/doc/rustc/src/platform-support/x86_64-fortanix-unknown-sgx.md new file mode 100644 index 0000000000000..97b5827c1443f --- /dev/null +++ b/src/doc/rustc/src/platform-support/x86_64-fortanix-unknown-sgx.md @@ -0,0 +1,72 @@ +# `x86_64-fortanix-unknown-sgx` + +**Tier: 2** + +Secure enclaves using [Intel Software Guard Extensions +(SGX)](https://www.intel.com/content/www/us/en/developer/tools/software-guard-extensions/overview.html) +based on the ABI defined by Fortanix for the [Enclave Development Platform +(EDP)](https://edp.fortanix.com/). + +## Target maintainers + +The [EDP team](mailto:edp.maintainers@fortanix.com) at Fortanix. + +- Jethro Beekman [@jethrogb](https://github.com/jethrogb) +- Raoul Strackx [@raoulstrackx](https://github.com/raoulstrackx) +- Mohsen Zohrevandi [@mzohreva](https://github.com/mzohreva) + +## Requirements + +The target supports `std` with a default allocator. Only cross compilation is +supported. + +Binaries support all CPUs that include Intel SGX. Only 64-bit mode is supported. + +Not all `std` features are supported, see [Using Rust's +std](https://edp.fortanix.com/docs/concepts/rust-std/) for details. + +The `extern "C"` calling convention is the System V AMD64 ABI. + +The supported ABI is the +[fortanix-sgx-abi](https://edp.fortanix.com/docs/api/fortanix_sgx_abi/index.html). + +The compiler output is ELF, but the native format for the platform is the SGX +stream (SGXS) format. A converter like +[ftxsgx-elf2sgxs](https://crates.io/crates/fortanix-sgx-tools) is needed. + +Programs in SGXS format adhering to the Fortanix SGX ABI can be run with any +compatible runner, such as +[ftxsgx-runner](https://crates.io/crates/fortanix-sgx-tools). + +See the [EDP installation +guide](https://edp.fortanix.com/docs/installation/guide/) for recommendations +on how to setup a development and runtime environment. + +## Building the target + +As a tier 2 target, the target is built by the Rust project. + +You can configure rustbuild like so: + +```toml +[build] +build-stage = 1 +target = ["x86_64-fortanix-unknown-sgx"] +``` + +## Building Rust programs + +Standard build flows using `cargo` or `rustc` should work. + +## Testing + +The Rust test suite as well as custom unit and integration tests will run on +hardware that has Intel SGX enabled if a cargo runner is configured correctly, +see the requirements section. + +## Cross-compilation toolchains and C code + +C code is not generally supported, as there is no libc. C code compiled for +x86-64 in freestanding mode using the System V AMD64 ABI may work. The +[rs-libc](https://crates.io/crates/rs-libc) crate contains a subset of libc +that's known to work with this target.