Swift is an exciting Open Source programming language developed by Apple. Swift on RISC-V is all about getting Swift onto RISC-V devices. This can be anything from small developer boards and IOT devices to high-performance cloud servers and PCs.
I am Neil Jones, the engineer responsible for the porting of Swift to RISC-V and the creator of the “Swift on RISC-V” project. Additionally, I am the creator and maintainer of the “Swift Community Apt Repository”. This includes the building of and creation of all packages hosted on this repository.
Want to install Swift on riscv64 in 3 easy steps using the Swift Community Apt Repository? Let’s dive in!
To use Swift on riscv64 you will need a riscv64 machine running a recent version of a Ubuntu or Debian-based distribution. DeepComputing’s DC-ROMA RISC-V Laptop II equipped with Ubuntu Desktop 23.10 is an excellent choice for coding and testing. I’ll be using it as the test machine.
Please note that GLibc version 2.38 or later is required and LibPython3.11 needs to be available.
Install curl

Install the Swift Community Apt Repository


A big thank you to PackageCloud for hosting the Swift Community Apt Repository.
Install Swift

Check Swift Version


In a terminal, enter the following commands:

Now Swift is saying hello to the RISC-V World!

The Swift installation has been tested on several RISC-V devices, including DC-ROMA RISC-V Laptop I and II, VisionFive2, Banana Pi, and Milk-V Pioneer. It has also been tested on Ubuntu 23.10 (mantic), Debian 13 (trixie/sid/unstable), and a few other distributions. For more test information, please visit Swift on RISC-V.
Coming next and stay tuned: Installing VSCode (VSCodium) on riscv64 and more Swift!