/wcbot

The successor of https://github.com/Bokjan/DiaoBot.

Primary LanguageC++MIT LicenseMIT

wcbot

A brand new Group Bot (群机器人) library for WeCom (企业微信). Former version is DiaoBot.

wcbot DiaoBot
tlinux native Yes Yes
Library type Static Dynamic (SDK)
Deployment Single executable Exe + SDK dylib + user dylib
Config file JSON XML-like TFC config
I/O multiplexing libuv select() by mongoose
Parallel model Multi-threading Multi-threading
Thread model 1 main, N worker 1 acceptor, 1 cronjob, N worker
Worker model Asynchronous (state machine) Synchronous, thread-blocking
Performance High Low
Extensibility High N/A

This time, we develop wcbot from scratch. Performance and R&D efficiency are improved a lot. tlinux native means there's only a gcc 4.8.5 (C++11) provided.

Prerequisites

  • CMake 3.1 +
  • C++ compiler with C++11 support
  • libuv
  • libcurl
  • OpenSSL (libcrypto)
  • RapidJSON

Other 3rd party libraries are distributed as git submodules.

Build

Just cmake it.

Run

The final artifact is an executable (built by yourself). Assume the executable is wcbotd, and there's a config file named config.json in the same directory.

Run as daemon:

./wcbotd config.json

Don't want a daemon? Add any character(s) as the 3rd command line argument, like:

./wcbotd config.json nofork