Rex Standard Library

Rex Standard Library is a custom library written in C++, based on the C++ Standard Library that comes with every major compiler. It is mainly used in the Rex Engine but you can use it for any C++ projects you like as a replacement for the C++ standard library.

You can find the source code of this project here

Motivation

Most games get developed on Windows machines, and most people who don't work at a company with pre existing code have to use the C++ standard library. the one that comes with MSVC, the default compiler with Visual Studio, is very hard to read and debug.

Another reason why I started developing my own standard library is because the C++ standard library is stuck with choices made decades ago that have proven to be bad. (eg. std::vector) Some of these decisions have also hurt performance and they can't change them. And if there's one things game developers want, it's performance.

That's why I started writing my own, to resolve the performance issues in the existing C++ standard library that comes with MSVC. I know that other compiler have their own standard library implementations, but not all of them are compatible with each other, meaning that if I wanted to have a cross platform project, sooner or later I had to use the MSVC C++ standard library which I know is slow.

Lastly I also treat it as an experiment to break the dependency on the C standard library. A lot of C code is hidden behind a library, which means this cannot get inlined, which again hurts performance. C also doesn't support function overloading, meaning a lot of similar functions are created (eg. abs, labs, llabs), Rex Standard Library uses C++ overloading support to simplify coding and improve the functions where possible.

Supported headers

  • Utilities Library

    • chrono
    • functional
    • initializer_list
    • optional
    • source_location
    • type_traits
    • utility
  • Numeric Limits

    • cfloat
    • cinttypes
    • climits
    • cstdint
    • limits
  • Error Handling

    • assert
  • Strings Library

    • cctype
    • format
  • Containers

    • array
    • vector
  • Numerics Library

    • numbers
  • Input/Output Library

    • ios
    • iosfwd
    • iostream
    • istream
    • ostream
    • streambuf

Partially supported headers

  • Utilities Library

    • cstddef
    • cstdlib
    • ctime
  • Dynamic Memory Management

    • memory
  • Strings Library

    • cstring
  • Containers Library

    • forward_list
    • list
    • map
    • multi_map
    • set
    • unordered_set
  • Iterator Library

    • iterator
  • Algorithm Library

    • algorithm
  • Numerics Library

    • numeric
    • cmath
    • ratio

Not supported headers

  • Utilities Library

    • csetjmp
    • csignal
    • cstdarg
  • Utilities Library

    • any
    • bitset
    • compare
    • expected
    • typeindex
    • typeindex
    • variant
    • version
  • Dynamic Memory Management

    • memory_resource
    • new
    • scoped_allocator
  • Numeric Limits

    • stdfloat
  • Error Handling

    • cerrno
    • exception
    • stacktrace
    • stdexcept
    • system_error
  • Strings Library

    • charconv
    • cuchar
    • cwchar
    • cwctype
  • Containers Library

    • deque
    • flat_map
    • flat_set
    • mdspan
    • queue
    • span
    • stack
  • Iterators Library

    • ranges
    • generator
  • Ranges Library

    • ranges
    • generators
  • Algorithms Library

    • execution
  • Numerics Library

    • bit
    • cfenv
    • complex
    • random
    • valarray
  • Localization Library

    • clocale
    • locale
  • Input/Library Output

    • cstdio
    • fstream
    • iomanip
    • print
    • spanstream
    • sstream
    • syncstream
  • Filesystem Library

    • filesystem
  • Regular Expressions Library

    • regex
  • Atomic Operations Library

    • atomic
  • Thread support library

    • barrier
    • condition_variable
    • future
    • latch
    • mutex
    • semaphore
    • shared_mutex
    • stop_token
    • thread
  • Concepts Library

    • concepts
  • Coroutines Library

    • coroutines