GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Categories
  • Newsletter
  • Submit
  • Login
  • Awesome C++
  • Networking

This view

  • Original page
  • New address

GeezerVison is showing cpp.libhunt.com — verdigris Alternatives - C++ Networking | LibHunt

  • Subscribe
  • Submit
  • Categories
  • About
  • Login

verdigris

Qt without moc: set of macros to use Qt without needing moc

woboq logo
woboq.com    Source Code    Changelog
Suggest Changes
Take the C++ Developer Survey - About 6 minutes on the tools, libraries and AI you use with C++. You get the results by email. Take the survey »
Popularity
4.4
Stable
Activity
3.0
Growing
Stars 671
Watchers 38
Forks 59
Last Commit about 1 year ago

Description

This (header-only) library can be used to create an application using Qt, without the need of the moc (MetaObject Compiler). It uses a different set of macro than Qt and templated constexpr code to generate the QMetaObject at compile-time. It is entirely binary compatible with Qt.

Blog post presenting the project: https://woboq.com/blog/verdigris-qt-without-moc.html (2016)

Blog post with some implementation details: https://woboq.com/blog/verdigris-implementation-tricks.html (2018)

Browse code online: https://code.woboq.org/woboq/verdigris

Travis: Appveyor:

Programming language: C++
License: GNU Lesser General Public License v3.0 only
Tags: Networking     Tools     C++14     Qt    
Latest version: v1.3

verdigris alternatives and similar libraries

Based on the "Networking" category.
Alternatively, view verdigris alternatives based on common mentions on social networks and blogs.

  • libcurl

    9.8 9.9 L2 verdigris VS libcurl
    A command line tool and library for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, MQTTS, POP3, POP3S, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET, TFTP, WS and WSS. libcurl offers a myriad of powerful features
    curl logo
  • Muduo

    9.6 0.7 L4 verdigris VS Muduo
    Event-driven network library for multi-threaded Linux server in C++11
    chenshuo logo
  • SaaSHub - Software Alternatives and Reviews

    SaaSHub helps you find the best software and product alternatives
    Promo www.saashub.com
    SaaSHub Logo
  • KCP

    9.5 7.2 verdigris VS KCP
    :zap: KCP - A Fast and Reliable ARQ Protocol
    skywind3000 logo
  • uWebSockets

    9.5 8.5 verdigris VS uWebSockets
    Simple, secure & standards compliant web server for the most demanding of applications
    uNetworking logo
  • cpp-httplib

    9.4 9.7 verdigris VS cpp-httplib
    A C++ header-only HTTP/HTTPS server and client library
    yhirose logo
  • µWebSockets

    9.4 verdigris VS µWebSockets
    Tiny WebSockets
  • C++ Workflow

    9.3 7.1 verdigris VS C++ Workflow
    C++ Parallel Computing and Asynchronous Networking Framework
    sogou logo
  • Mongoose

    9.3 9.6 L3 verdigris VS Mongoose
    Embedded web server, with TCP/IP network stack, MQTT and Websocket
    cesanta logo
  • POCO

    9.1 9.7 L2 verdigris VS POCO
    The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
    pocoproject logo
  • C++ REST SDK

    8.9 1.2 L1 verdigris VS C++ REST SDK
    DISCONTINUED. The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
    microsoft logo
  • Proxygen

    8.9 9.7 L4 verdigris VS Proxygen
    A collection of C++ HTTP libraries including an easy to use HTTP server.
    meta logo
  • WebSocket++

    8.8 0.0 L2 verdigris VS WebSocket++
    C++ websocket client/server library
    zaphoyd logo
  • cpr

    8.6 7.4 L2 verdigris VS cpr
    C++ Requests: Curl for People, a spiritual port of Python Requests.
    libcpr logo
  • libwebsockets

    8.4 10.0 L2 verdigris VS libwebsockets
    canonical libwebsockets.org networking library
    warmcat logo
  • nghttp2

    8.3 9.6 L1 verdigris VS nghttp2
    nghttp2 - HTTP/2 C Library and tools
    nghttp2 logo
  • RakNet

    8.3 0.0 verdigris VS RakNet
    DISCONTINUED. RakNet is a cross platform, open source, C++ networking engine for game programmers.
    facebookarchive logo
  • Boost.Beast

    8.1 8.0 verdigris VS Boost.Beast
    HTTP and WebSocket built on Boost.Asio in C++11
    boostorg logo
  • boost.beast(new repo)

    8.1 8.0 verdigris VS boost.beast(new repo)
    HTTP and WebSocket built on Boost.Asio in C++11
    boostorg logo
  • evpp

    7.9 0.0 verdigris VS evpp
    A modern C++ network library for developing high performance network services in TCP/UDP/HTTP protocols.
    Qihoo360 logo
  • Simple-Web-Server

    7.7 0.0 L4 verdigris VS Simple-Web-Server
    DISCONTINUED. A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio. Created to be an easy way to make REST resources available from C++ applications.
  • wdt

    7.6 4.2 verdigris VS wdt
    DISCONTINUED. Warp speed Data Transfer (WDT) is an embeddedable library (and command line tool) aiming to transfer data between 2 systems as fast as possible over multiple TCP paths.
    facebookarchive logo
  • PcapPlusPlus

    7.6 9.2 verdigris VS PcapPlusPlus
    PcapPlusPlus is a multiplatform C++ library for capturing, parsing and crafting of network packets. It is designed to be efficient, powerful and easy to use. It provides C++ wrappers for the most popular packet processing engines such as libpcap, Npcap, WinPcap, DPDK, AF_XDP, WinDivert and PF_RING.
    seladb logo
  • cpp-netlib

    6.9 3.0 L2 verdigris VS cpp-netlib
    The C++ Network Library Project -- cross-platform, standards compliant networking library.
    cpp-netlib logo
  • netcode.io

    6.9 8.8 verdigris VS netcode.io
    Secure client/server protocol for multiplayer games built on top of UDP
    mas-bandwidth logo
  • Restbed

    6.8 9.0 L4 verdigris VS Restbed
    Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++ applications.
    Corvusoft logo
  • libquic

    6.7 0.0 verdigris VS libquic
    QUIC, a multiplexed stream transport over UDP
    devsisters logo
  • Onion

    6.7 2.0 L4 verdigris VS Onion
    C library to create simple HTTP servers and Web Applications.
    davidmoreno logo
  • dotenv-linter

    6.4 7.5 verdigris VS dotenv-linter
    ⚡️Lightning-fast linter for .env files. Written in Rust 🦀
    dotenv-linter logo
  • Silicon

    6.2 0.0 L4 verdigris VS Silicon
    A high performance, middleware oriented C++14 http web framework please use matt-42/lithium instead
    matt-42 logo
  • Dyad.c

    6.2 0.0 L3 verdigris VS Dyad.c
    DISCONTINUED. Asynchronous networking for C
  • D++

    5.9 8.7 verdigris VS D++
    C++ Discord API Bot Library - D++ is Lightweight and scalable for small and huge bots!
    brainboxdotcc logo
  • Simple-WebSocket-Server

    5.7 0.0 L4 verdigris VS Simple-WebSocket-Server
    DISCONTINUED. A very simple, fast, multithreaded, platform independent WebSocket (WS) and WebSocket Secure (WSS) server and client library implemented using C++11, Boost.Asio and OpenSSL. Created to be an easy way to make WebSocket endpoints in C++.
  • RESTinio

    5.6 5.8 verdigris VS RESTinio
    Cross-platform, efficient, customizable, and robust asynchronous HTTP(S)/WebSocket server C++ library with the right balance between performance and ease of use
    Stiffstream logo
  • nanoMODBUS

    5.5 6.0 verdigris VS nanoMODBUS
    A compact MODBUS RTU/TCP C library for embedded/microcontrollers
    debevv logo
  • libhttpserver

    5.4 9.6 verdigris VS libhttpserver
    C++ library for creating an embedded Rest HTTP server (and more)
    etr logo
  • IXWebSocket

    5.1 7.8 verdigris VS IXWebSocket
    websocket and http client and server library, with TLS support and very few dependencies
    machinezone logo
  • Seasocks

    4.9 7.3 verdigris VS Seasocks
    Simple, small, C++ embeddable webserver with WebSockets support
    mattgodbolt logo
  • Tufão

    4.8 0.0 L2 verdigris VS Tufão
    An asynchronous web framework for C++ built on top of Qt
    vinipsmaker logo
  • curlcpp

    4.8 3.9 verdigris VS curlcpp
    An object oriented C++ wrapper for CURL (libcurl)
    JosephP91 logo
  • nope.c

    4.6 0.0 L1 verdigris VS nope.c
    WAFer is a C language-based software platform for scalable server-side and networking applications. Think node.js for C programmers.
    riolet logo
  • net_skeleton

    4.5 0.0 L3 verdigris VS net_skeleton
    Async non-blocking multi-protocol networking library for C/C++
    cesanta logo
  • mailio

    4.2 7.1 verdigris VS mailio
    mailio is a cross platform C++ library for MIME format and SMTP, POP3, IMAP protocols. It is based on the standard C++ 17 and Boost library.
    karastojko logo
  • netLink

    3.4 4.8 L1 verdigris VS netLink
    Socket and Networking Library using msgpack.org[C++11]
    Lichtso logo
  • Boost.Http

    3.2 0.0 verdigris VS Boost.Http
    Embeddable C++ HTTP server
    BoostGSoC14 logo
  • bredis

    2.9 0.0 verdigris VS bredis
    Boost::ASIO low-level redis client (connector)
    basiliscos logo
  • tntnet

    2.8 4.7 L1 verdigris VS tntnet
    Tntnet is a web application server for web applications written in C++.
    maekitalo logo
  • Breep

    2.8 0.0 verdigris VS Breep
    C++ peer to peer library, built on the top of boost
    Organic-Code logo
  • QuantumGate

    2.6 0.0 verdigris VS QuantumGate
    QuantumGate is a peer-to-peer (P2P) communications protocol, library and API written in C++.
    kareldonk logo
  • Barracuda App Server

    2.5 8.0 verdigris VS Barracuda App Server
    Embedded Web Server Library with Integrated Lua Scripting Engine
    RealTimeLogic logo
  • LiteNetLib++

    1.6 2.3 verdigris VS LiteNetLib++
    C++ lightweight and easy to use reliable UDP library for games
    Revan600 logo

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.

Do you think we are missing an alternative of verdigris or a related project?

Add another 'Networking' Library

Popular Comparisons

  • verdigris
    vs
    libcurl
  • verdigris
    vs
    Muduo
  • verdigris
    vs
    boost.beast(new repo)
  • verdigris
    vs
    Barracuda App Server
  • verdigris
    vs
    Dyad.c

README

About

This (header-only) library can be used to create an application using Qt, without the need of the moc (MetaObject Compiler). It uses a different set of macro than Qt and templated constexpr code to generate the QMetaObject at compile-time. It is entirely binary compatible with Qt.

Blog post presenting the project: https://woboq.com/blog/verdigris-qt-without-moc.html (2016)

Blog post with some implementation details: https://woboq.com/blog/verdigris-implementation-tricks.html (2018)

Browse code online: https://code.woboq.org/woboq/verdigris

Travis: Travis Build Status Appveyor: Appveyor Build Status

Documentation

For an introduction, see the tutorial.cpp. See also a more detailed documetation of the macros in the source code.

Status

Almost all features of Qt are working. The Qt test have been ported.

Features that are not yet working:

  • Q_PLUGIN_METADATA: This would require compiling to the Qt's binary json. Out of scope for now.
  • QMetaMethod::tag(): Not yet implemented, could be supported if needed, but is not really needed for anything. (not even tested by Qt's auto test)
  • Q_ENUM: Working, but requires to repeat the name of every enum value. Could be improved.

New features compared to Qt with moc:

  • Support for templated QObject.
  • Support for QObject nested in another class.

How to Use

The library consist of only two headers files. You can either copy these header files in your project, or adjust the include paths so that the compiler finds them. You will find the headers in the 'src/' sub-directory. Also make sure to set your compiler in, at least, C++14 mode. With qmake, you can do that with CONFIG += c++14.

Tested with Qt >= 5.5. Need a compiler that can do C++14 relaxed constexpr such as GCC 5.1 or Clang 3.5, or MSVC 2017

Translations

When running lupdate, add the argument -tr-function-alias Q_DECLARE_TR_FUNCTIONS+=W_OBJECT to avoid the warning that your class are not using the Q_OBJECT macro.

Correspondance Table

This table show the correspondence between Qt macro and Verdigris macro:

Qt macro Use the Verdigris macro instead
Q_OBJECT W_OBJECT(MyClass) ... W_OBJECT_IMPL(MyClass)
public slots: void mySlot(int x); void mySlot(int x); W_SLOT(mySlot)
signals: void mySignal(int x); void mySignal(int x) W_SIGNAL(mySignal,x)
Q_PROPERTY(int myProperty WRITE setProp READ getProp NOTIFY propChanged) W_PROPERTY(int, myProperty WRITE setProp READ getProp NOTIFY propChanged)
Q_GADGET W_GADGET(MyClass) ... W_GADGET_IMPL(MyClass)
Q_INVOKABLE void myFunction(int foo); void myFunction(int foo); W_INVOKABLE(myFunction)
Q_INVOKABLE MyClass(int foo); MyClass(int foo); W_CONSTRUCTOR(int)
Q_CLASSINFO("foo", "bar") W_CLASSINFO("foo", "bar")
Q_DECLARE_INTERFACE(MyInterface, "my.interface") ... Q_INTERFACE(MyInterface) Q_DECLARE_INTERFACE(MyInterface, "my.interface") ... W_INTERFACE(MyInterface)
Q_NAMESPACE W_NAMESPACE(MyNs) ... W_NAMESPACE_IMPL(MyNs)
Q_ENUM/Q_FLAG/Q_ENUM_NS/Q_FLAG_NS W_ENUM/W_FLAG/W_ENUM_NS/W_FLAG_NS

Who uses Verdigris ?

  • Ossia Score, an interactive intermedia sequencer. (github) It uses Verdigris in productions. Verdigris allowed ossia score to use template with their QObject's, and solve some trouble with the build system.
  • ISOTRONIC GmbH, a provider for visual inspection QA systems for automatic glass vial manufacturing, uses Verdigris in production:

    The transition from standard Qt affected more than 100 source code files and was done in not much more than a day. The reason for the switch was to be able to use a build system that has no interface for Qt's MOC process. In the rare cases of questions or problems the Verdigris team was quick and competent in resolving the issues. After more than 6 months of real-world experience we are still very happy with that decision.

  • If you are using Verdigris and want to appear here, please open an issue, or a pull request

Context

The macros were inspired by CopperSpice. The template code was based on previous work: https://woboq.com/blog/reflection-in-cpp-and-qt-moc.html

Differences with CopperSpice:

  1. Contrary to CopperSpice, this is not a fork of Qt, but just an alternative set of macro to define Qt objects and signals and slot in a way that is binary compatible with Qt, but does not require moc. This is to be used with the normal Qt. CopperSpice being an entire fork of Qt, it has more differences with Qt and is not kept up to date with all the new features coming in Qt.
  2. The QMetaObject is built at compile time in the read only section (like what moc does). CopperSpice builds it at run-time when the library is loaded. So CopperSpice takes more memory and load slower.
  3. With CopperSpice, you cannot declare your slot within the class definition.
  4. CopperSpice uses __LINE__ in its macro making it impossible to declare several things in one line or to declare objects or properties from macros.
  5. The usability of some macro was (in our opinion) improved.
  6. The additional Q_OBJECT_IMPL

Licence

Like Qt, this library is under the dual licence LGPLv3 and GPLv2. Being header-only, this removes many of the obligations of the LGPLv3.

If you have any questions or remark please email [email protected]

Do not miss the trending, libraries, news and articles with our weekly report.

Awesome C++ is part of the LibHunt network. Terms. Privacy Policy.

(CC)
BY-SA
Spin The Wheel Of Names for a cryptographically secure random name picker.
Schedule a when to meet poll.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.