From 2e33760dafe9663efcc9cff4936f6eeec0230c52 Mon Sep 17 00:00:00 2001 From: "U. Lasiotus" Date: Fri, 17 Oct 2025 12:51:02 -0700 Subject: [PATCH] docs: update Motor OS target docs Update the docs to reflect that [Motor OS std library PR](https://github.com/rust-lang/rust/pull/147000) has been merged. --- src/doc/rustc/src/platform-support.md | 2 +- src/doc/rustc/src/platform-support/motor.md | 26 ++++++++++++++------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index 87fc404504648..4eb0dabe5952c 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -432,7 +432,7 @@ target | std | host | notes `x86_64-unknown-l4re-uclibc` | ? | | [`x86_64-unknown-linux-none`](platform-support/x86_64-unknown-linux-none.md) | * | | 64-bit Linux with no libc [`x86_64-unknown-managarm-mlibc`](platform-support/managarm.md) | ? | | x86_64 Managarm -[`x86_64-unknown-motor`](platform-support/motor.md) | ? | | x86_64 Motor OS +[`x86_64-unknown-motor`](platform-support/motor.md) | ✓ | | x86_64 Motor OS [`x86_64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 64-bit OpenBSD [`x86_64-unknown-trusty`](platform-support/trusty.md) | ✓ | | `x86_64-uwp-windows-gnu` | ✓ | | diff --git a/src/doc/rustc/src/platform-support/motor.md b/src/doc/rustc/src/platform-support/motor.md index e7aa7b23f3a54..6d44d176597d4 100644 --- a/src/doc/rustc/src/platform-support/motor.md +++ b/src/doc/rustc/src/platform-support/motor.md @@ -15,27 +15,35 @@ This target is cross-compiled. There are no special requirements for the host. Motor OS uses the ELF file format. -## Building the target +## Building the target toolchain -The target can be built by enabling it for a `rustc` build, for example: +Motor OS target toolchain can be +[built using `x.py`](https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html): + +The bootstrap file: ```toml [build] -build-stage = 2 -target = ["x86_64-unknown-motor"] +host = ["x86_64-unknown-linux-gnu"] +target = ["x86_64-unknown-linux-gnu", "x86_64-unknown-motor"] +``` + +The build command: + +```sh +./x.py build --stage 2 clippy library ``` ## Building Rust programs -Rust standard library is fully supported/implemented, but is not yet part of -the official Rust repo, so an out-of-tree building process should be -followed, as described in the -[build doc](https://github.com/moturus/motor-os/blob/main/docs/build.md). +See the [Hello Motor OS](https://github.com/moturus/motor-os/blob/main/docs/recipes/hello-motor-os.md) +example. ## Testing Cross-compiled Rust binaries and test artifacts can be executed in Motor OS VMs, -as described in e.g. +as described in the [build doc](https://github.com/moturus/motor-os/blob/main/docs/build.md) +and the [Hello Motor OS](https://github.com/moturus/motor-os/blob/main/docs/recipes/hello-motor-os.md) example.