Skip to content

Commit

Permalink
docs: Document x86_64-unknown-linux-none target
Browse files Browse the repository at this point in the history
  • Loading branch information
morr0ne committed May 11, 2024
1 parent a3ef01b commit 9cf0800
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/doc/rustc/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
40 changes: 40 additions & 0 deletions src/doc/rustc/src/platform-support/x86_64-unknown-linux-none.md
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9cf0800

Please sign in to comment.