All News | Boards | Chips | Devices | Software | LinuxDevices.com Archive | About | Contact | Subscribe
Follow LinuxGizmos:
Twitter Facebook Pinterest RSS feed
*   get email updates   *

Swift on RISC-V: Launch of New Toolchain for RISC-V Hardware

Jun 30, 2024 — by Giorgio Mendoza 290 views

The Swift programming community has taken a major step forward by introducing the first Swift toolchain for RISC-V hardware, designed to work with platforms like the VisionFive 2 single-board computer.

As RISC-V’s open-source instruction set architecture gains traction, the introduction of diverse new devices in 2023—from compact system-on-chip boards to robust workstations—highlights the growing need for major programming languages and development tools to support this architecture.

— ADVERTISEMENT —


According to the Swift forum, these are the primary objectives of Swift on RISC-V:

  • Set up and maintain a continuous integration build server for Swift development and testing on RISC-V.
  • Contribute to the Swift project by identifying and fixing RISC-V compatibility issues through feedback and pull requests.
  • Modify the Swift toolchain for the riscv64 architecture on Debian and Ubuntu operating systems.
  • Release Swift packages and libraries for riscv64 to enhance hardware functionality, including GPIO support on the VisionFive 2 board.

Significant milestones reached by June 2023 include:

  • Establishing GitHub organizations and repositories dedicated to Swift on RISC-V.
  • Creating a Docker-based environment for compiling and testing Swift on riscv64.
  • Acquiring and integrating VisionFive 2 boards through the RISC-V Developer Boards program.

June 2024 Update: First Release of Swift 5.10.1

In a notable update, June 2024 witnessed the inaugural release of Swift 5.10.1 tailored for RISC-V platforms, marking a critical development for the Swift community. This version is specifically designed for riscv64 devices like the VisionFive 2 board and is available on the GitHub repository ‘swift-riscv/swift-riscv64’.

Release Highlights

The newly released Swift version 5.10.1, labeled as swift-5.10.1-RELEASE, targets riscv64-unknown-linux-gnu. It represents a comprehensive Swift toolchain, facilitating both installation and usage on riscv64 hardware. Developers interested in exploring this release should note that it is currently not production-ready and may contain unexpected bugs. For example, there are several known issues with the current release:

  • The Swift REPL and scripting functionalities are not operational.
  • Usage of macros is unavailable as the toolchain was built with bootstrapping turned off.
  • Compiling and running Swift code requires additional flags such as -Xlinker -latomic.

For installation, the release is available as both .tar.gz and .deb package files. The simplest method to install Swift is by downloading the .deb package and using the system’s apt installer. For those without direct access to riscv64 hardware, a Docker image is available to simulate the environment.

Future development will concentrate on Swift version 5.10.1, with older versions discontinued due to viability issues. Additionally, the project has launched a new initiative, Patches to Upstream, to manage and track upstream patches submitted to Swift and supporting projects.

Swift – RISC-V logos
(click image to enlarge)

Included in this release is a special riscv64 version of the Vapor Toolbox, enhancing development capabilities for those using the Swift framework on RISC-V hardware. The announcement also mentioned that they will be receiving a new Pioneer Box 13 which will reduce build times and increase productivity.

Further information

The official Swift announcement and detailed history of the Swift on RISC-V project can found here.

(advertise here)


PLEASE COMMENT BELOW

Please comment here...