Add dedicated platform support page for Redox OS

This commit is contained in:
bjorn3 2024-06-09 15:50:58 +00:00
parent 3cddc04230
commit 742a923b28
3 changed files with 57 additions and 3 deletions

View file

@ -71,6 +71,7 @@
- [*-unknown-hermit](platform-support/hermit.md)
- [\*-unknown-netbsd\*](platform-support/netbsd.md)
- [*-unknown-openbsd](platform-support/openbsd.md)
- [*-unknown-redox](platform-support/redox.md)
- [\*-unknown-uefi](platform-support/unknown-uefi.md)
- [wasm32-wasip1](platform-support/wasm32-wasip1.md)
- [wasm32-wasip1-threads](platform-support/wasm32-wasip1-threads.md)

View file

@ -203,7 +203,7 @@ target | std | notes
`x86_64-unknown-linux-gnux32` | ✓ | 64-bit Linux (x32 ABI) (kernel 4.15, glibc 2.27)
[`x86_64-unknown-linux-ohos`](platform-support/openharmony.md) | ✓ | x86_64 OpenHarmony
[`x86_64-unknown-none`](platform-support/x86_64-unknown-none.md) | * | Freestanding/bare-metal x86_64, softfloat
`x86_64-unknown-redox` | ✓ | Redox OS
[`x86_64-unknown-redox`](platform-support/redox.md) | ✓ | Redox OS
[`x86_64-unknown-uefi`](platform-support/unknown-uefi.md) | ? | 64-bit UEFI
[^x86_32-floats-x87]: Floating-point support on `i586` targets is non-compliant: the `x87` registers and instructions used for these targets do not provide IEEE-754-compliant behavior, in particular when it comes to rounding and NaN payload bits. See [issue #114479][x86-32-float-issue].
@ -258,7 +258,7 @@ target | std | host | notes
`aarch64-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (ILP32 ABI)
[`aarch64-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | ARM64 NetBSD
[`aarch64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | ARM64 OpenBSD
`aarch64-unknown-redox` | ? | | ARM64 Redox OS
[`aarch64-unknown-redox`](platform-support/redox.md) | ✓ | | ARM64 Redox OS
`aarch64-uwp-windows-msvc` | ✓ | |
`aarch64-wrs-vxworks` | ? | |
`aarch64_be-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (big-endian, ILP32 ABI)
@ -300,7 +300,7 @@ target | std | host | notes
[`i686-unknown-hurd-gnu`](platform-support/hurd.md) | ✓ | ✓ | 32-bit GNU/Hurd [^x86_32-floats-return-ABI]
[`i686-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | NetBSD/i386 with SSE2 [^x86_32-floats-return-ABI]
[`i686-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 32-bit OpenBSD [^x86_32-floats-return-ABI]
`i686-unknown-redox` | ? | | i686 Redox OS
[`i686-unknown-redox`](platform-support/redox.md) | ✓ | | i686 Redox OS
`i686-uwp-windows-gnu` | ✓ | | [^x86_32-floats-return-ABI]
`i686-uwp-windows-msvc` | ✓ | | [^x86_32-floats-return-ABI]
[`i686-win7-windows-msvc`](platform-support/win7-windows-msvc.md) | ✓ | | 32-bit Windows 7 support [^x86_32-floats-return-ABI]

View file

@ -0,0 +1,53 @@
# `*-unknown-redox`
**Tier: 2/3**
Targets for the [Redox OS](https://redox-os.org/) operating
system.
Target triplets available so far:
- `x86_64-unknown-redox` (tier 2)
- `aarch64-unknown-redox` (tier 3)
- `i686-unknown-redox` (tier 3)
## Target maintainers
- Jeremy Soller ([@jackpot51](https://github.com/jackpot51))
## Requirements
These targets are natively compiled and can be cross-compiled. Std is fully supported.
The targets are only expected to work with the latest version of Redox OS as the ABI is not yet stable.
`extern "C"` uses the official calling convention of the respective architectures.
Redox OS binaries use ELF as file format.
## Building the target
You can build Rust with support for the targets by adding it to the `target` list in `config.toml`. In addition a copy of [relibc] needs to be present in the linker search path.
```toml
[build]
build-stage = 1
target = [
"<HOST_TARGET>",
"x86_64-unknown-redox",
"aarch64-unknown-redox",
"i686-unknown-redox",
]
```
[relibc]: https://gitlab.redox-os.org/redox-os/relibc
## Building Rust programs and testing
Rust does not yet ship pre-compiled artifacts for Redox OS except for x86_64-unknown-redox.
The easiest way to build and test programs for Redox OS is using [redoxer](https://gitlab.redox-os.org/redox-os/redoxer) which sets up the required compiler toolchain for building as well as runs programs inside a Redox OS VM using QEMU.
## Cross-compilation toolchains and C code
The target supports C code. Pre-compiled C toolchains can be found at <https://static.redox-os.org/toolchain/>.