About emweb/wt
Wt (pronounced 'witty') is an open-source C++ library for developing web applications. It provides a widget/rendering library (libwt), an HTTP/WebSockets server (libwthttp), and connectors for FastCGI (Unix), ISAPI (Windows), and a test environment. The library also includes a C++ ORM called libwtdbo with backends for PostgreSQL, SQLite3, MySQL/MariaDB, Microsoft SQL Server, and Firebird. Wt enables developers to build interactive web applications using C++, with a widget-centric API similar to desktop GUI frameworks, and supports painting to PDF and images via Haru and GraphicsMagick.
Key Features
Widget/rendering library (libwt) for building web UIs with C++
Built-in HTTP/WebSockets server (libwthttp) with async I/O
Connectors for FastCGI (Unix), ISAPI (Windows), and test environment
C++ ORM (libwtdbo) with backends for PostgreSQL, SQLite3, MySQL/MariaDB, Microsoft SQL Server, and Firebird
Support for painting to PDF (Haru) and raster images (GraphicsMagick, Direct2D on Windows)
Optional SSL and WebSockets via OpenSSL
Cross-platform: works on Unix-like systems and Windows
Pros & Cons
Pros
- High performance due to compiled C++ and async I/O
- Rich widget library for complex UI components
- Built-in ORM with multiple database backends
- Open source with permissive license
- Cross-platform support (Unix, Windows)
Cons
- Requires C++ expertise, which may be less accessible to typical web developers
- Heavy dependencies (Boost, CMake, optional libraries) increase build complexity
- Smaller community and ecosystem compared to JavaScript-based frameworks
Best For
Developing data-centric web applications with server-side logic in C++Building real-time web apps using WebSocketsCreating web UIs with a widget-based approach similar to desktop frameworksUsing C++ ORM in standalone or web applications for database access
FAQ
What are the main components of Wt?
Wt consists of libwt (widget/rendering library), libwthttp (HTTP/WebSockets server), libwtfcgi (FastCGI connector for Unix), libwtisapi (ISAPI connector for Windows), libwttest (test connector), and libwtdbo (C++ ORM) with backends for PostgreSQL, SQLite3, MySQL/MariaDB, Microsoft SQL Server, and Firebird.
What dependencies are needed to build Wt?
Building Wt from source requires CMake, Boost, and a C++ compiler (GCC, Clang, or MSVC). Optional dependencies include OpenSSL, Haru PDF library, GraphicsMagick, PostgreSQL, MySQL/MariaDB, ODBC driver, Firebird, Pango, and ZLib.
How can I report a security vulnerability in Wt?
Security vulnerabilities should be reported privately to the Wt security team at wt-security@emweb.be. Public disclosure is made in the changelog after a patch or update is released.