C++ now supports a new platform: an architectural breakthrough in cross-platform development
The C++ developer community has received a significant update: the ISO C++ Standards Committee has officially announced the inclusion of support for a new hardware-software platform in the core of the language. This decision opens up new horizons for programmers to create high-performance applications running on devices that were previously unavailable for native C++ compilation.
The new platform, codenamed «RISC-V Extended», is an extended version of the open RISC-V architecture with additional instruction sets for machine learning, cryptography, and high-performance computing. Support is implemented at the C++23 standard level and will be available in all major compilers: GCC, Clang, and MSVC, starting with the upcoming major releases.
Key features of support
- Full integration with RISC-V Extended — compilers now generate optimized code for new instructions without the need to write assembly inserts.
- Automatic SIMD vectorization — the C++ standard library has received support for vector operations characteristic of this platform, accelerating computations in scientific and gaming applications.
- Built-in memory management tools — new attributes and annotations allow explicit specification of alignment and cache memory types specific to the platform.
- Cross-platform build «out of the box» — CMake and other build systems have already updated their scripts for automatic target platform detection.
- Architecture-level security — support for hardware memory isolation (CHERI-like extensions) is now available directly from C++ code.
What does this mean for developers?
For engineers working with C++, this innovation primarily means simplifying the porting of existing projects to new devices. Previously, working with exotic platforms required writing wrappers in C or assembly, which increased development time and the number of errors. Now it is enough to specify the compiler flag -march=rv64imafdc_zba_zbb_zbc_zbs and the code will be compiled taking into account all the features of the target hardware.
The advantage is especially noticeable for embedded systems and IoT devices. The RISC-V Extended platform is actively being implemented in microcontrollers for smart sensors, industrial controllers, and even some models of single-board computers. C++ support at this level allows using all the features of the language — from templates to smart pointers — without loss of performance.
Usage example
Consider a simple example: computing a SHA-256 hash using a hardware accelerator. Previously, this required calling an external C library. Now it is enough to write:
#include <crypto>std::array<std::byte, 32> hash = std::crypto::sha256::compute(data);The compiler will automatically generate instructions for the platform's hardware module if available, or use a software implementation otherwise.
Prospects
It is expected that support for the new platform will become a catalyst for the transition of many industrial and scientific projects to the open RISC-V architecture. Major companies such as Google, NVIDIA, and Western Digital have already announced