V0.4
:- WIPREY_FetchV4
:- 1.Scout
, 2.Submodule
, 3.ZipLinks
, 4.Clone/Fetch
😊- WIP: StackTrace on Crash / Signal Handler /
google breakpad
+boost stacktrace
+StackWalker
+google crashpad
+sentry
+raygun
+BugSnag
+RollBar
V0.3
:- DONE.install
:- it's a Folder forlib-REY_LoggerNUtils.lib
& "external libraries" installation.forge
:- 😉 a new idea for external-library management- added
.forge/CMakeFiles/REY_FetchV2_fmt.cmake
- added
.forge/CMakeFiles/REY_FetchV3.cmake
V0.2
:- Prefix_Tag:- 😢 REFACTORED ["amVK" --> "REY"]V0.1
:- Initial Commit: moving from [GIST ---> GITHUB]V0.1beta
:- https://gist.github.com/REYNEP/14a628ab270cae461a926ba212226492
// ---------- example. 1 ----------
#include "REY_Logger.hh"
int main(void) {
REY_LOG("Hello, World!");
}
// ---------- example. 2:- you also got access to `fmt` 😄 ----------
#include <fmt/core.h>
int main(void) {
fmt::print("Hello, World!\n");
return 0;
}
/** cmake configure --> will automatically Fetch / Build / Link / IncludePath of `fmt`
* https://github.com/fmtlib/fmt */
// ---------- example. 3 ----------
// TBA
It's basically automatically handled 😉:-
git clone https://github.com/REYNEP/REY_LoggerNUtils <path>
# or
git add submoule https://github.com/REYNEP/REY_LoggerNUtils <path>
Way 1
# Open `REY_LoggerNUtils` in VSCODE
# F1 > CMake: Configure
# F1 > CMake: Build
# F1 > CMake: Install [Default Folder:- REY_LoggerNUtils/.install]
# You can optinally take a glimpse @ "REY_LoggerNUtils/CMakeLists.txt" 😜
# for better understanding.... it's pretty small
Way 2:- add these in your CMakeLists.txt
# add_subdirectory( <path/to/REY_LoggerNUtils> )
# target_link_libraries( <your_target_name> REY_LoggerNUtils )
Way 3:- REY_FetchV4
# copy:- `REY_FetchV4.cmake`
#`REY_FetchV4_X_RESET.cmake`
#`REY_FetchV4_X.REY_LoggerNUtils.cmake`
#`REY_FetchV4.REY_LoggerNUtils.cmake`
into wherever you keep your CMakeFiles
# include(REY_FetchV4.REY_LoggerNUtils.cmake) in your CMakeLists.txt
Way 4:- Meson & Premake Support [TBA]
Way 5:- Ninja/MakeFiles + Python Downloader Script [TBA]
# --------------------
# OUTPUT Options:-
# Library Name:- REY_LoggerNUtils
Usage:- target_link_libraries(<target_name> REY_LoggerNUtils)
#
# Possible Untested Output Options:- [Might Not Work, cz of SCOPE Limitations]
${fmt::fmt} ---------> this is a "Target"
# this is How you use it:-
target_link_libraries(idk fmt::fmt)
target_include_directories(idk PUBLIC fmt::fmt)
# --------------------
-
assuming that you did
add_subdirectory(REY_LoggerNUtils)
in your CMakeLists.txt -
fmt
:- automatically "Fetched" --> Built --> "PUBLIC linked toREY_LoggerNUtils
"- "PUBLIC" Linked:-
- i.e.
fmt
will be available to you too - i.e. You can just
#include <fmt/core.h>
- &
fmt
will be automatically linked as you are linkingREY_LoggerNUtils
in CMAKE
- i.e.
Official Repo
:- https://github.com/fmtlib/fmtWhat is it?
:- https://github.com/fmtlib/fmt?tab=readme-ov-file#examplesCMake / Using
:- https://fmt.dev/11.1/get-started/CheatSheet / Code Examples
:- https://hackingcpp.com/cpp/libs/fmt.html
- "PUBLIC" Linked:-
-
.forge
:-lib-REY_LoggerNUtils.lib
will be INSTALLED herefmt
will be fetched here & installed here- I store/fetch/modify/custom-build External Libraries in here
- For the whole idea, check:- https://github.com/REYNEP/REY_LoggerNUtils/tree/main/.forge
-
google breakpad
:- [StackTracer on Crash]- very hard to build on windows.
- However I found a really cool & nice wiki & how-to about it
- https://github.com/d1vanov/quentier/wiki/Building-and-installation-of-Quentier's-dependencies#building-google-breakpad
- Took me Half an hour to find this guide & finally fkin build this shit
- However I found a really cool & nice wiki & how-to about it
- Building Google Breakpad on Windows:- d1vanov's wiki on github
- BREAKPAD vs CRASHPAD
Official Repo
:- https://chromium.googlesource.com/breakpad/breakpadWhat is it?
:- https://chromium.googlesource.com/breakpad/breakpad/+/HEAD/docs/breakpad.pngCMake / Using
:- d1vanov's wiki on githubCheatSheet / Code Examples
:- Mozilla Intro, linux [starter-guide], mac, windows, processor-design, detes on stack-tracing, chatgptDocumentation
:- HEAD/docs
- very hard to build on windows.
-
REY_Logger.hh
is lightweight- No
#include <cstdlib>
or#include <iostream>
- All
#include
was done inside#ifdef REY_LOGGER_IMPLEMENTATION
- Actual Implementations compiled by:-
REY_Logger.cpp
- Actual Implementations compiled by:-
- So this is basically like a standalone
~500Lines
of code- even if you
#include REY_Logger.hh
in 1000s of files....- REY_Logger:- 500Lines / file
- std::iostream:- ~20,000-50,000 Lines / file
- even if you
- No
-
So we basically had to make a lightweight wrapper around
std::cout
- class REY_Logger
malloc()
-->REY_malloc()
memcpy()
-->REY_memcpy()
REY_Utils::merge_sort
is still template based....- also
REY_memcpy
is used inREY_ArrayDYN<T>::resize
-
License:- Boost License