The Rust compiler for AIX is available!
Since last Valentine's Day, you can express your love to AIX in Rust! IBM published IBM Open SDK for Rust on AIX. Here is the link to the announcement letter - https://www.ibm.com/docs/en/announcements/open-sdk-rust-aix
Prerequisites for Rust installation on AIX
You must have access to IBM Passport Advantage to get it. After you have downloaded the software bundle, transfer it to AIX. In my case, the bundle is named "Open_SDK_For_Rust_AIX_1.84_EN.tar.Z'. From the name and the announcement, I can assume that the SDK is based on Rust compiler 1.84, which is relatively new but not the latest. The latest open-source version is 1.84.1. The bundle is 660 MB in size.
The documentation for the SDK is available on the IBM's site - https://www.ibm.com/docs/en/osfroa/1.84
According to the documentation, the SDK works on AIX 7.2 TL5 SP7 or later, AIX 7.3 TL1 or later, or IBM i 7.5 PASE. IBM i guys can also profit from the compiler.
AIX installation requires 2GB RAM, 1.2GB space in /opt, and the following filesets:
- bos.adt.include
- bos.adt.libm
- bos.adt.lib
- openssl.base > 3.0.10.1002
- libc++.rte > 17.1.3.0
- libc++abi.rte > 17.1.3.0
- libunwind.rte > 17.1.3.0
Check that they are installed with a simple one-liner:
for lpp in bos.adt.include bos.adt.lib bos.adt.libm openssl.base libc++.rte libc++abi.rte libunwind.rte ; do lslpp -Lqc $lpp ; done
If a fileset is missing or outdated, install it or update it. The last three packages (libc++.rte, libc++abi.rte, libunwind.rte) are part of IBM Open XL C/C++ Runtime. You can download them from the IBM Fix Central or use the versions provided with the SDK for Rust if you don't have them. This is the link to the latest Runtime versions - https://www.ibm.com/support/pages/fix-list-xl-cc-runtime-aix
Installing Rust on AIX
Create a temporary directory for the installation and upload the SDK. You can remove the directory after the installation.
# mkdir /tmp/rust
# cd /tmp/rust
# scp myserver:/path/to/Open_SDK_For_Rust_AIX_1.84_EN.tar.Z .
Uncompress the installation bundle:
# uncompress -c *Z | tar xf -
Install the SDK filesets:
# installp -acgXYd /tmp/rust/usr/sys/inst.images all

After the installation is successfully completed, you can remove the temporary directory:
# rm -rf /tmp/rust
The SDK for Rust is now installed in /opt/IBM/RustSDK/1.84 and can be used.

There are still two more recommended steps. If you plan to use the SDK for Rust frequently, add the path to it and the path to the manpages into your profile file:
PATH=$PATH:/opt/IBM/RustSDK/1.84/bin
export PATH
MANPATH=$MANPATH:/opt/IBM/RustSDK/1.84/share/man
export MANPATH
Testing Rust on AIX
Now, we are ready to test it!
- Create a new hello world program:
cargo new hello

- change to the created directory
# cd hello
cargo run

Rust on AIX limitations
The SDK for Rust has some limitations. First, it can generate only 64-bit binaries. For most applications, this is not the biggest problem, but for system guys like me, it can be a problem. Many pieces of AIX code are 32-bit or expect a 32-bit binary. If you boot in single-user mode, you can start only 32-bit binaries by default. All LAM modules must be delivered as 32-bit and 64-bit binaries. All PAM modules are 32-bit binaries.
Another well-known limitation is that not every Rust package (crate) in the world supports AIX. The SDK's documentation includes a list of minimal versions for some packages with AIX support: https://www.ibm.com/docs/en/osfroa/1.84?topic=started-introducing-rustc-compiler. If a package you need doesn't support AIX, you must either ask the community to port it to AIX or do the port on your own.
The best news is that the Rust compiler is available on AIX now, and you can use it! If we have a large enough community, the compiler will evolve!
#IBMChampion