An experimental successor to C++
open sourceApache-2.0 WITH LLVM-exceptionfree
Carbon is an experimental successor language to C++, designed for performance matching C++ through LLVM and for seamless, bidirectional interoperability with existing C++ code, so one library in a C++ stack can move to Carbon without porting the rest. It has a modern generics system with fully type-checked definitions, opt-in templates for C++ interop, and a planned incremental path to a memory-safe subset, with migration tools to translate idiomatic C++ into Carbon. It's not ready for use: the compiler and toolchain are under development, with nightly builds and an online playground on Compiler Explorer while the project works towards its 0.1 release. Apache-2.0 with LLVM Exceptions.
Libraries for C++
View 40 more
- Tink
- qpdf
- llama.cpp
- BugSnag
- Adobe PDF Library
- Apache Casbin
- NVIDIA Dynamo-Triton
- OpenTelemetry
- OpenFeature
- Firebase Cloud Messaging
- LevelDB
- Apache OpenDAL
- V8
- Apryse SDK (WebViewer)
- Valhalla
- ONNX Runtime
- RE2
- ICU4X
- Wasmtime
- ALTCHA
- Firebase Authentication
- dora
- Open Source Routing Machine (OSRM)
- RocksDB
- TensorFlow
- MLX
- JavaScriptCore
- GoogleTest
- Apache Arrow
- Faiss
- NW.js
- JSON for Modern C++
- libpcap
- APT
- Pipecat
- ModSecurity
- Socket.IO
- openFrameworks
- Tesseract
- spdlog
Browse all of them: 58 libraries, 12 frameworks, 15 APIs.
Problems it solves
- our huge C++ codebase is hard to evolve and I want a modern language that can call it directly
- move one C++ library at a time to a safer language without rewriting the whole application
- C++ templates give awful error messages and I want generics that are checked up front
- a successor to C++ that keeps its performance and works with our existing build system
- follow an experimental systems language designed for migrating away from C++
Features
- bidirectional interoperability with C++
- performance matching C++ through LLVM
- checked generics with opt-in templates
- planned automated migration from C++
- nightly toolchain builds and a Compiler Explorer playground
Limitations
- Experimental and not ready for use: there is no 0.1 release yet, only nightly toolchain builds.1
- Nightly builds are available only for limited platforms, such as recent Ubuntu Linux.1
- C++ interop is still being built: the toolchain doesn't yet support calling most C++ APIs.1
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what Carbon does.
- Zig A general-purpose programming language and toolchain for maintaining robust, optimal and reusable software
- Rust A language empowering everyone to build reliable and efficient software.
- C# A modern, open-source programming language
- Swift A general-purpose programming language that's approachable for newcomers and powerful for experts
- Nim Efficient, expressive, elegant
- C++ A general-purpose programming language with a bias towards systems programming
