C+- is a subset of C++ that enables smaller binaries and reduces dependencies. This repo serves as a project base.
- Custom/slimmed down std lib with essentials (
slimstd) - malloc provided
new/new[]/delete/delete[] - Smaller binaries vs normal c++ compiled programs (with similar linkage)
- Programs only linked against libc (if not statically compiled)
- Classes
- Constructors/destructors & RAII
- virtual functions
- Iterators
- Templates (with support of reflection, see
type_traits.h)
- RTTI; Cannot
dynamic_castor calltypeid() - Exceptions; need to perform alternative error strategies
- C++ normal stdlib; need to reimplement common data structures
- build example with:
zig build - run example with:
zig build run - build release with:
zig build -Drelease-fast=trueorzig build -Drelease-small=true - cross compile/retarget with:
- default but with gnu linkage:
zig build -Dtarget=native-native-gnu - default but with musl:
zig build -Dtarget=native-native-musl - full triple:
zig build -Dtarget=x86_64-linux-musl
- default but with gnu linkage:
Zig tip - print out available targets with zig targets (WARNING: Large output)