Install Swift on RISC-V in Just Three Steps!

Author: Neil Jones
August 28, 2024

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!

Prerequisites

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.

Step One

Install curl

Step Two

Install the Swift Community Apt Repository

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

Step Three

Install Swift

Check Swift Version

A Quick Hello World

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!

RECENT BLOG

OpenSouthCode 2026: Growing the Linux App Ecosystem Together with RISC-V
June 30, 2026
DC-ROMA RISC-V Mainboard III Draws Strong Interest at RISC-V Summit Europe
June 15, 2026
COMPUTEX 2026 & RISC-V Taipei Day: Showcasing the Future of RISC-V Computing
June 9, 2026