Skip to content

Commit 40868b7

Browse files
Merge pull request #435 from RunanywhereAI/shubham/upgrade-cpp
upgrading cpp
2 parents 0dc46c1 + 632d08a commit 40868b7

18 files changed

Lines changed: 33 additions & 33 deletions

File tree

Playground/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ A complete on-device voice AI pipeline for Linux (Raspberry Pi 5, x86_64, ARM64)
4242
- **Large Language Model** — Qwen2.5 0.5B Q4 via llama.cpp (fully local)
4343
- **Text-to-Speech** — Piper Lessac Medium neural TTS
4444

45-
**Requirements:** Linux (ALSA), x86_64 or ARM64, CMake 3.16+, C++17
45+
**Requirements:** Linux (ALSA), x86_64 or ARM64, CMake 3.16+, C++20
4646

4747
## swift-starter-app
4848

@@ -94,4 +94,4 @@ A hybrid voice assistant that combines on-device AI inference with cloud LLM rea
9494
- **Barge-in Support** — Wake word during TTS playback cancels speech and re-listens
9595
- **Waiting Chime** — Earcon feedback while waiting for cloud response
9696

97-
**Requirements:** Linux (ALSA), x86_64 or ARM64, CMake 3.16+, C++17
97+
**Requirements:** Linux (ALSA), x86_64 or ARM64, CMake 3.16+, C++20

Playground/linux-voice-assistant/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ project(linux-voice-assistant
3131
DESCRIPTION "Linux Voice Assistant using RunAnywhere Commons"
3232
)
3333

34-
set(CMAKE_CXX_STANDARD 17)
34+
set(CMAKE_CXX_STANDARD 20)
3535
set(CMAKE_CXX_STANDARD_REQUIRED ON)
3636

3737
# =============================================================================

Playground/linux-voice-assistant/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ linux-voice-assistant/
5656

5757
- Linux (Raspberry Pi 5, Ubuntu, Debian, etc.)
5858
- CMake 3.16+
59-
- C++17 compiler (g++ or clang++)
59+
- C++20 compiler (g++ or clang++)
6060
- ALSA development headers: `sudo apt install libasound2-dev`
6161

6262
### Build and Run

Playground/openclaw-hybrid-assistant/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.16)
22
project(openclaw-hybrid-assistant VERSION 0.1.0 LANGUAGES CXX)
33

4-
set(CMAKE_CXX_STANDARD 17)
4+
set(CMAKE_CXX_STANDARD 20)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
66

77
# =============================================================================

sdk/runanywhere-commons/.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ SpacesInSquareBrackets: false
9090

9191
# C/C++ specific
9292
Language: Cpp
93-
Standard: c++17
93+
Standard: c++20
9494

9595
# Penalties (for line breaking decisions)
9696
PenaltyBreakBeforeFirstCallParameter: 19

sdk/runanywhere-commons/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
## C++ Specific Rules
1313

14-
- C++17 standard required
14+
- C++20 standard required
1515
- Google C++ Style Guide with project customizations (see `.clang-format`)
1616
- Run `./scripts/lint-cpp.sh` before committing
1717
- Use `./scripts/lint-cpp.sh --fix` to auto-fix formatting issues

sdk/runanywhere-commons/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ option(RAC_BUILD_SERVER "Build OpenAI-compatible HTTP server (runanywhere-server
4646
# C++ CONFIGURATION
4747
# =============================================================================
4848

49-
set(CMAKE_CXX_STANDARD 17)
49+
set(CMAKE_CXX_STANDARD 20)
5050
set(CMAKE_CXX_STANDARD_REQUIRED ON)
5151
set(CMAKE_CXX_EXTENSIONS OFF)
5252
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
@@ -434,7 +434,7 @@ if(RAC_PLATFORM_ANDROID)
434434
endif()
435435

436436
set_target_properties(rac_commons PROPERTIES
437-
CXX_STANDARD 17
437+
CXX_STANDARD 20
438438
CXX_STANDARD_REQUIRED ON
439439
CXX_EXTENSIONS OFF
440440
)

sdk/runanywhere-commons/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ RunAnywhere Commons is the shared C++ layer that sits between platform SDKs (Swi
3232

3333
### Design Principles
3434

35-
- **C++ Core, C API Surface** - C++17 internally, pure C API for FFI compatibility
35+
- **C++ Core, C API Surface** - C++20 internally, pure C API for FFI compatibility
3636
- **Vtable-Based Polymorphism** - No C++ virtual inheritance at API boundaries
3737
- **Priority-Based Dispatch** - Service providers register with priority; first capable handler wins
3838
- **Lazy Initialization** - Services created on-demand, not at startup
@@ -173,7 +173,7 @@ printf("Transcription: %s\n", result.text);
173173
### Prerequisites
174174

175175
- **CMake** 3.22 or higher
176-
- **C++17** compatible compiler (Clang, GCC)
176+
- **C++20** compatible compiler (Clang, GCC, MSVC)
177177
- **Platform-specific**: Xcode 15+ (iOS/macOS), Android NDK r25+ (Android)
178178

179179
### Quick Start

sdk/runanywhere-commons/src/backends/llamacpp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ target_link_libraries(rac_backend_llamacpp PUBLIC
203203
)
204204

205205
set_target_properties(rac_backend_llamacpp PROPERTIES
206-
CXX_STANDARD 17
206+
CXX_STANDARD 20
207207
CXX_STANDARD_REQUIRED ON
208208
CXX_EXTENSIONS OFF
209209
)

sdk/runanywhere-commons/src/backends/onnx/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ else()
218218
endif()
219219

220220
set_target_properties(rac_backend_onnx PROPERTIES
221-
CXX_STANDARD 17
221+
CXX_STANDARD 20
222222
CXX_STANDARD_REQUIRED ON
223223
CXX_EXTENSIONS OFF
224224
)

0 commit comments

Comments
 (0)