C++ officially supports a new platform: what has changed

Online Python Trainer for Beginners

Learn Python easily without overwhelming theory. Solve practical tasks with automatic checking, get hints in Russian, and write code directly in your browser — no installation required.

Start Course

C++ expands horizons: official support for a new platform



The C++ developer community has received an important update: the international ISO C++ standardization committee and leading compiler vendors (GCC, Clang, MSVC) have announced full official support for a new hardware-software platform. We are talking about the RISC-V platform — an open instruction set architecture (ISA) that is rapidly gaining popularity in embedded systems, IoT devices, and even server solutions.



Previously, RISC-V support in C++ existed in an experimental mode, but now it is included in the main compiler releases and officially documented in the C++23 standard. This means developers can write C++ code for RISC-V without using third-party patches and beta versions of tools.



What does this mean for developers?



  • Full standard library: Now all containers, algorithms, and input/output streams from the STL work on RISC-V natively, without emulation.
  • Architecture optimization: Compilers have received new optimization flags that take into account the features of the RISC-V pipeline (for example, support for vector instruction extensions).
  • Memory safety: Support for protection mechanisms such as CFI (Control Flow Integrity) and Shadow Stacks for RISC-V has been implemented.
  • Ready ecosystem: Integration with popular build systems (CMake, Meson) and package managers (vcpkg, Conan) for RISC-V.


Practical use cases



The new support opens the door for projects that previously required complex porting. Here are a few scenarios:



  • Development of embedded systems based on RISC-V microcontrollers (e.g., SiFive or ESP32-C3) using C++20/23.
  • Creation of high-performance edge devices with machine learning in C++ for RISC-V.
  • Porting existing cross-platform applications (games, graphics editors) to devices with RISC-V.


Technical details for developers



To get started with C++ on RISC-V, simply install the current version of the compiler:



  • GCC 13+ — added full support for the C++23 standard for RISC-V (previously only C++17 was available).
  • Clang 16+ — included RISC-V support in libc++ and improved code generation for vector extensions.
  • MSVC — currently supports RISC-V only through cross-compilation (starting from Visual Studio 2022 17.8).


Basic example of building a program:



// hello.cpp#include <iostream>int main() {    std::cout << "Hello RISC-V from C++!" << std::endl;    return 0;}// Compilation: riscv64-unknown-linux-gnu-g++ -std=c++23 hello.cpp -o hello


Impact on the C++ ecosystem



RISC-V support is not just another compiler backend. It is a step towards diversifying hardware platforms, reducing dependence on x86 and ARM. For educational projects such as PythonLib, this means that learning C++ can now be done in the context of modern open-source architectures. This is especially relevant for courses on systems programming, robotics, and driver development.

Recommended Libraries