Develop web applications in C++

Wt is a web GUI library in modern C++. Quickly develop highly interactive web UIs with widgets, without having to write a single line of JavaScript. Wt handles all request handling and page rendering for you, so you can focus on functionality.

Why choose Wt?

You don't want to focus on details like request handling or page rendering. You want your application to continue to work even when JavaScript is unavailable. You just want to write your web application in C++ without sacrificing interactivity. Wt allows you to focus on functionality and create highly interactive, secure, and future proof applications quickly.

Save Time

Save Time

Wt handles all the nitty-gritty of requests and responses and client-side JavaScript, and allows you to focus on functionality in pure C++.

Built to Maintain

Built to Maintain

Wt's widget abstraction represents HTML elements as C++ objects, allowing them to be easily composable and extendable.

Future Proof

Future Proof

Stay up to date with the latest web technologies without changing your code, thanks to Wt's stable API.

Secure

Secure

Wt is designed to be resilient against the most common types of exploits: SQL injection, XSS and CSRF vulnerabilities.

Contact us for more information
or a personalised quotation

Features

Wt has a lot to offer. It includes the essential basic widgets and building blocks to build web applications, but also offers built-in security, PDF rendering, a 2D and 3D painting system, an object-relational mapping library, a charting library, and an authentication framework. You can see the full list of features here, but here's a short overview:


Widget library

Many widgets are included in Wt. For every HTML element there's a corresponding widget. These widgets can emit signals when interacted with, so you can write web applications like desktop applications. Check out the widget gallery for an overview of the widgets that Wt has to offer.


Server side, client optimized

Wt employs a signal-slot system. Instead of worrying about the sending of Ajax requests and serving of pages, you can simply connect the click of a button to a callback function on the server. Take a look at this example in the widget gallery. Wt will use whatever technology available for communication: Ajax or WebSockets, but will fall back on full HTML page loads when JavaScript is unavailable. This makes Wt applications accessible to any browser or web crawler.


Built-in security

Wt automatically protects against misuse by only allowing visible and enabled widgets to be interacted with. This also helps to avoid CSRF attacks, which are doubly avoided because Wt does not store session information in cookies. By using the widget abstraction, Wt discourages the inserting of raw HTML into a web page, preventing XSS attacks. Wt::Dbo prevents SQL injection by encouraging the use of prepared statements when accessing the database. Wt also includes an authentication and registration system with support for OAuth providers like Google, Facebook, and OpenID Connect.


PDF rendering

Create PDFs and render HTML as PDF with Wt's PDF rendering system. Check out PDF rendering in the widget gallery.


2D and 3D painting system

Use a single 2D drawing API with many backends (PNG, JPEG, SVG, HTML canvas, VML, and PDF) so you only need to write your drawing code once to support any web browser and save to many formats. Write server-side (OpenGL) and client-side (WebGL) 3D graphics with a uniform API. Wt's 2D and 3D charting libraries were built on top of this graphics API. Check out the examples in the widget gallery.


Object relational mapping library

Map classes in C++ to tables in your database with Wt::Dbo, an ORM that only requires pure C++, and does not rely on preprocessor magic or code generation. Get a taste for Wt::Dbo with the introductory tutorial.

Latest News

Wt & JWt 4.11.0

(J)Wt 4.11.0 is a major release. That focuses on authentication and WebSockets.

First Wt is now able to support MFA in its authentication system. It is easily enabled with a single call to AuthService::setMfaProvider(). By default an implementation for TOTP is included. This offers a way to enable an additional layer of security for your applications. Instead of remembering a single password, users can be made to enter a short code that changes often, as an additional authentication step. Developers are also able to implement this feature in any way they see fit via the interface AbstractMfaProcess. A couple examples are provided in the source code, and the authentication tutorial.

This is for Wt alone, no for JWt:

If you like using WebSockets, there is good news! Wt was already able to communicate with its server over WebSockets. This was, however, limited to only its communication for updates regarding its framework. Now you are able to use them in whatever custom way you see fit. Developers can set up endpoints (both session-private or public) that listen to incoming requests. The browser (or another client) can then use those endpoints to connect to said resource. A connection has now been established, and messages can be send back and forth.

Here are the links:

Binary builds for Windows are available on the GitHub releases page.

Some users of (J)Wt