about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFederico Maria Morrone <contact@morrone.dev>2024-05-11 20:51:54 +0200
committerFederico Maria Morrone <contact@morrone.dev>2024-05-11 21:37:24 +0200
commit9cf080099d230fc6602d51df37c8bbd5cf4a8e8e (patch)
tree2ae17e4fc2a852fe4c0e5eeaf30d7945b0913b52
parenta3ef01b1fc14fb4b4af00f8437c4a462db8af9ab (diff)
downloadrust-9cf080099d230fc6602d51df37c8bbd5cf4a8e8e.tar.gz
rust-9cf080099d230fc6602d51df37c8bbd5cf4a8e8e.zip
docs: Document x86_64-unknown-linux-none target
-rw-r--r--src/doc/rustc/src/SUMMARY.md1
-rw-r--r--src/doc/rustc/src/platform-support.md1
-rw-r--r--src/doc/rustc/src/platform-support/x86_64-unknown-linux-none.md40
3 files changed, 42 insertions, 0 deletions
diff --git a/src/doc/rustc/src/SUMMARY.md b/src/doc/rustc/src/SUMMARY.md
index c9c0ee4067f..c7e3293e35a 100644
--- a/src/doc/rustc/src/SUMMARY.md
+++ b/src/doc/rustc/src/SUMMARY.md
@@ -74,6 +74,7 @@
     - [wasm64-unknown-unknown](platform-support/wasm64-unknown-unknown.md)
     - [\*-win7-windows-msvc](platform-support/win7-windows-msvc.md)
     - [x86_64-fortanix-unknown-sgx](platform-support/x86_64-fortanix-unknown-sgx.md)
+    - [x86_64-unknown-linux-none.md](platform-support/x86_64-unknown-linux-none.md)
     - [x86_64-unknown-none](platform-support/x86_64-unknown-none.md)
     - [x86_64h-apple-darwin](platform-support/x86_64h-apple-darwin.md)
 - [Targets](targets/index.md)
diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md
index 764798a80e6..8adc410455e 100644
--- a/src/doc/rustc/src/platform-support.md
+++ b/src/doc/rustc/src/platform-support.md
@@ -382,5 +382,6 @@ target | std | host | notes
 [`x86_64-win7-windows-msvc`](platform-support/win7-windows-msvc.md) | ✓ |   | 64-bit Windows 7 support
 `x86_64-wrs-vxworks` | ? |  |
 [`x86_64h-apple-darwin`](platform-support/x86_64h-apple-darwin.md) | ✓ | ✓ | macOS with late-gen Intel (at least Haswell)
+[`x86_64-unknown-linux-none`](platform-support/x86_64-unknown-linux-none.md) | * |  | 64-bit Linux with no libc
 
 [runs on NVIDIA GPUs]: https://github.com/japaric-archived/nvptx#targets
diff --git a/src/doc/rustc/src/platform-support/x86_64-unknown-linux-none.md b/src/doc/rustc/src/platform-support/x86_64-unknown-linux-none.md
new file mode 100644
index 00000000000..ef8fd3aa2e3
--- /dev/null
+++ b/src/doc/rustc/src/platform-support/x86_64-unknown-linux-none.md
@@ -0,0 +1,40 @@
+# `x86_64-unknown-linux-none`
+
+**Tier: 3**
+
+Freestanding x86-64 linux binary with no depedency on libc.
+
+## Target maintainers
+
+- [morr0ne](https://github.com/morr0ne/)
+
+## Requirements
+
+This target is cross compiled and can be built from any host.
+
+This target has no support for host tools, std and alloc.
+
+## Building the target
+
+The target can be built by enabling it for a `rustc` build:
+
+```toml
+[build]
+build-stage = 1
+target = ["x86_64-unknown-linux-none"]
+```
+
+## Building Rust programs
+
+Rust does not yet ship pre-compiled artifacts for this target. To compile for
+this target, you will either need to build Rust with the target enabled (see
+"Building the target" above), or build your own copy of `core` by using
+`build-std` or similar.
+
+## Testing
+
+Created binaries will run on linux without any external requirements
+
+## Cross-compilation toolchains and C code
+
+Support for C code is currently untested