A C++23 header-only library with the aim of providing rich cross-platform UI (Typescript based) to C++ applications with a non-invasive API.
WebFront implements the websocket protocol over an embedded Web server and provides CppToJs and JsToCpp cross functions calls with native types conversions.
WebFront webfront;
webFront.cppFunction<void, std::string>("print", [](std::string text) {
std::cout << text << '\n';
});
webFront.onUIStarted([](UI ui) {
ui.addScript("var addText = function(text, num) { "
" let print = webFront.cppFunction('print'); "
" print(text + ' of ' + num); "
"} ");
auto print = ui.jsFunction("addText");
print("Hello World", 2023);
});