Get started
Install Tatzel and create your first page.
This page illustrates the installation experience the project could provide. Exact package names and commands should be finalized with the first public release.
Prototype documentation: commands below communicate the intended workflow and are not yet guaranteed to match the repository.
Requirements
- A C++23-capable compiler
- CMake 4.0 or newer
- Git for source-based installation
- A modern browser with WebSocket support
Add Tatzel with CMake
The intended path is a normal CMake dependency, keeping setup close to the rest of a native project.
include(FetchContent)
FetchContent_Declare(
Tatzel
GIT_REPOSITORY https://github.com/Noxagonal/Tatzel.git
GIT_TAG main
)
FetchContent_MakeAvailable(Tatzel)
target_link_libraries(MyApp PRIVATE Tatzel::Tatzel)Build from source
git clone https://github.com/Noxagonal/Tatzel.git
cd Tatzel
cmake -S . -B build
cmake --build buildA future release could also provide install rules, versioned archives, and package-manager recipes.
Create a first page
#include <Tatzel/App.hpp>
int main()
{
tatzel::App app;
app.RegisterPage("/", [](auto ui)
{
ui.Heading("My first Tatzel page");
ui.Paragraph("The application logic remains in C++.");
});
return app.Run();
}Build and run
cmake -S . -B build
cmake --build build
./build/MyAppOpen the printed local address in a browser. During development, the executable serves the static client and manages live page sessions.
Continue to samples