diff --git a/src/doc/rustc/src/platform-support/vxworks.md b/src/doc/rustc/src/platform-support/vxworks.md new file mode 100644 index 0000000000000..08d7ca29f7110 --- /dev/null +++ b/src/doc/rustc/src/platform-support/vxworks.md @@ -0,0 +1,46 @@ +# VxWorks + +**Tier: 3 (with Host Tools)** + +VxWorks is a real-time operating system (RTOS) developed by Wind River Systems as proprietary software. [VxWorks Datasheet](https://www.windriver.com/themes/Windriver/pdf/vxworks-7-datasheet.pdf) + +## Target Maintainers + +- B I Mohammed Abbas ([@biabbas](https://github.com/biabbas)) + +## Requirements + +Development for this target involves cross-compiling from a host environment using a VxWorks Workbench and the Wind River C++ (wr-c++) driver. + +## Building the Target + +To build Rust binaries for VxWorks, you'll need a VxWorks 7 Workbench and Board Support Package (BSP) for each target. Supported VxWorks targets include: +- aarch64-wrs-vxworks +- armv7-wrs-vxworks-eabihf +- i686-wrs-vxworks +- powerpc-wrs-vxworks +- powerpc-wrs-vxworks-spe +- powerpc64-wrs-vxworks +- x86_64-wrs-vxworks + +To enable a target for Rust (`rustc`): +```toml +[build] +build-stage = 1 +target = ["aarch64-wrs-vxworks"] +``` + +## Building Rust Programs + +Once `rustc` supports the target and necessary library artifacts are available, Rust programs can be built for VxWorks: +```sh +rustc --target aarch64-wrs-vxworks your-code.rs +``` + +## Testing + +Currently, there is no support for running the Rust compiler (`rustc`) test suite for VxWorks targets. + +## Cross-compilation toolchains and C code + +The targets do support `C` code. To build compatible `C` code, you have to use wr-c++/wr-cc with the same compiler and flags. \ No newline at end of file