Skip to content

Commit 449525d

Browse files
committed
docs: Document x86_64-unknown-linux-none target
1 parent 238e86a commit 449525d

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

src/doc/rustc/src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
- [wasm64-unknown-unknown](platform-support/wasm64-unknown-unknown.md)
6969
- [\*-win7-windows-msvc](platform-support/win7-windows-msvc.md)
7070
- [x86_64-fortanix-unknown-sgx](platform-support/x86_64-fortanix-unknown-sgx.md)
71+
- [x86_64-unknown-linux-none.md](platform-support/x86_64-unknown-linux-none.md)
7172
- [x86_64-unknown-none](platform-support/x86_64-unknown-none.md)
7273
- [x86_64h-apple-darwin](platform-support/x86_64h-apple-darwin.md)
7374
- [Targets](targets/index.md)

src/doc/rustc/src/platform-support.md

+1
Original file line numberDiff line numberDiff line change
@@ -382,5 +382,6 @@ target | std | host | notes
382382
[`x86_64-win7-windows-msvc`](platform-support/win7-windows-msvc.md) | ✓ | | 64-bit Windows 7 support
383383
`x86_64-wrs-vxworks` | ? | |
384384
[`x86_64h-apple-darwin`](platform-support/x86_64h-apple-darwin.md) | ✓ | ✓ | macOS with late-gen Intel (at least Haswell)
385+
[`x86_64-unknown-linux-none`](platform-support/x86_64-unknown-linux-none.md) | * | | 64-bit Linux with no libc
385386

386387
[runs on NVIDIA GPUs]: https://github.com/japaric-archived/nvptx#targets
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# `x86_64-unknown-linux-none`
2+
3+
**Tier: 3**
4+
5+
Freestanding x86-64 linux binary with no depedency on libc.
6+
7+
## Target maintainers
8+
9+
- [morr0ne](https://github.com/morr0ne/)
10+
11+
## Requirements
12+
13+
This target is cross compiled and can be built from any host.
14+
15+
This target has no support for host tools, std and alloc.
16+
17+
## Building the target
18+
19+
The target can be built by enabling it for a `rustc` build:
20+
21+
```toml
22+
[build]
23+
build-stage = 1
24+
target = ["x86_64-unknown-linux-none"]
25+
```
26+
27+
## Building Rust programs
28+
29+
Rust does not yet ship pre-compiled artifacts for this target. To compile for
30+
this target, you will either need to build Rust with the target enabled (see
31+
"Building the target" above), or build your own copy of `core` by using
32+
`build-std` or similar.
33+
34+
## Testing
35+
36+
Created binaries will run on linux without any external requirements
37+
38+
## Cross-compilation toolchains and C code
39+
40+
Support for C code is currently untested

0 commit comments

Comments
 (0)