[Open-source] C++ Toolbox, a comprehensive Linux application software development tool library and run-time framework.

Open SourceProcess Management
2026-06-28 03:04 2 次浏览 • 0 次下载 0KB
[Open-source] C++ Toolbox, a comprehensive Linux application software development tool library and run-time framework.

1. Project Overview

C++ Toolbox, a complete Linux application software development tool library and run-time framework. It has communication libraries (TCP/UDP/serial port), HTTP, thread pool, timer pool, coroutine, log, command terminal, state machine, behavior tree, etc. very practical development components. It also has a complete and practical start-up framework. It can let application developers be liberated from implementation details, focus on functional logic.

2. Open Source License

Licensed under MIT

3. Screenshots

Module dependencies

Module pruning

Open the config.mk file, and you can disable the modules you don't need by commenting them out, but be aware of the dependencies between modules.app_y += xxxComment out the modules you don't need, but be aware of the dependencies between modules.

4. Feature Overview

Module Introduction

  • base, base library, including log printing, common tools, etc.
  • util, utility library, may be used in business code, contains PidFile,Serializer,ArgumentParser,StateMachine,TimeCounter etc.
  • event, event library, implements Fd, Timer, Signal three kinds of event-driven;
  • log, log output library, implemented terminal, syslog, file form log output;
  • eventx, event extension library, includes ThreadPool thread pool module, used for handling blocking transactions; TimerPool timer pool module;
  • network, network library, implemented serial port, terminal, UDP, TCP communication modules;
  • http, HTTP library, based on network, implemented HTTP server and client modules;
  • coroutine, coroutine library, well-known, asynchronous framework not convenient for handling sequential business, coroutine compensates;
  • mqtt, MQTT client library;
  • terminal, terminal, similar shell command terminal, can implement runtime interaction with program;
  • main, application program framework, implemented complete program startup process and framework, let developers only care about business code;
  • alarm, alarm module, implemented 4 common alarms: CRON alarm, single alarm, weekly cycle alarm, working day alarm;
  • flow, action module, solved the difficulty of executing sequential actions in asynchronous mode;

5. Tech Stack

cpp-tbox, full name: C++ Treasure Box, C++ development treasure box, based on event service type application development library.

applicable environment

  • Linux environment, mainly for service type applications;
  • C++11 and above.

External library dependencies

Library name

Dependency modules

Description

Installation method

googletest

All modules

Unit test. If unit testing is not performed, it can be ignored.

sudo apt install google-mock

libevent

event

Not dependent by default, dependent when WITH_LIBEVENT is enabled in event/config.mk

sudo apt install libevent-dev

libev

event

Not dependent by default, dependent when WITH_LIBEV is enabled in event/config.mk

sudo apt install libev-dev

mosquitto

mqtt

MQTT library

sudo apt install libmosquitto-dev

nlohmann/json

main

Used as configuration data

Download json_fwd.hpp and json.hpp to the header file directory, such as: /usr/local/include/nlohmann/

Installation command

System

Installation command

Ubuntu/Debian

apt install -y g++ make google-mock libevent-dev libev-dev libmosquitto-dev

If you build

Enter the top-level directory of cpp-tbox and execute the command:

STAGING_DIR=$HOME/.local make modules RELEASE=1

After completion, all header files are exported to $HOME/.local/include/All library files are output to $HOME/.local/lib/If you do not specify the STAGING_DIRparameter, it defaults to .staging。

In your own project's Makefile, you need to add the following content:

CXXFLAGS += -I$(HOME)/.local/include
LDFLAGS += -L$(HOME)/.local/lib -ltbox_xxxxx

Then you can use the components of tbox.

#1
资源直链https://gitee.com/cpp-master/cpp-tbox
去下载
星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare