GrailGUI is a prototype of a replacement for web programming (HTTP, HTML, CSS, JavaScript) and GUI programming. It includes a client graphical API, a browser implemented in C++ and OpenGL, a protocol to transmit metadata and data in binary, a language (XDL) to describe the binary data, and local storage to retain data on the client should that be necessary. Encrypted communications (equivalent of TLS) have not yet been implemented.
Currently the formatting that we do is done through a combination of manual string concatenation, sprintf, and even direct byte manipulation in the case of XDL. While C++ 20 has a standard format library written up, it is not currently implemented in GCC or Clang, leaving us unable to test it. However, the open source library fmt seems to be the repository where the std::format proposal is implemented. As such, if we add the library to our build process we can get started using std::format-style formatting. This formatting library seems to be type-safe and more memory safe than our current implementations, plus it has been shown to be faster than sprintf in testing.
From their website, it seems the fmt library can be easily added by making the library an external CMake dependency, as we have done with GLM.
Proposal:
[x] Add fmt to libraries being imported via CMake
[ ] Replace direct formatting that we do via sprintf with fmt
[ ] Replace fmt with std::format once it has been added to GCC
Will be done as a separate issue, most likely several months into the future.
Currently the formatting that we do is done through a combination of manual string concatenation, sprintf, and even direct byte manipulation in the case of XDL. While C++ 20 has a standard format library written up, it is not currently implemented in GCC or Clang, leaving us unable to test it. However, the open source library
fmt
seems to be the repository where the std::format proposal is implemented. As such, if we add the library to our build process we can get started using std::format-style formatting. This formatting library seems to be type-safe and more memory safe than our current implementations, plus it has been shown to be faster thansprintf
in testing.From their website, it seems the
fmt
library can be easily added by making the library an external CMake dependency, as we have done with GLM.Proposal:
fmt
to libraries being imported via CMakesprintf
withfmt
fmt
withstd::format
once it has been added to GCC