GithubHelp home page GithubHelp logo

numendacil / cpp-mirai-client Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 6.45 MB

mirai-api-http的C++封装

Home Page: https://numendacil.github.io/cpp-mirai-client

License: GNU Affero General Public License v3.0

CMake 1.99% C++ 98.01%
mirai cplusplus-17 mirai-api-http qqbot

cpp-mirai-client's Introduction

cpp-mirai-client

UnitTest Status FOSSA Status AGPLv3.0 License Project Version C++ Version

关于本项目

cpp-mirai-client 是一个基于 miraimirai-api-http 的跨平台C++机器人框架。

本项目在一定程度上参考了 cyanray/mirai-cpp 项目,您也可以考虑使用该项目进行C++ QQ机器人的开发。

当前适配的 mirai-api-http 版本: v2.9.1

安装要求

本项目使用CMake进行项目构建,要求CMake版本3.16以上。编译器需要支持C++17标准,目前已在最新版本的GCC、Clang与MSVC 编译器下测试通过。

使用cpp-mirai-client只需要将整个仓库克隆或下载到你的项目子目录中,并在项目的CMakeList.txt中添加

add_subdirectory(/path/to/cpp-mirai-client)
set(MIRAI_BUILD_UNIT_TESTS OFF CACHE BOOL "Build UnitTests" FORCE)
target_link_libraries(your_target_name PRIVATE cpp-mirai-client::cppmirai)

即可。

也可以通过 cppmirai-template 模板直接生成一个基础的程序框架

项目依赖

cpp-mirai-client 使用了以下第三方项目,可在 cmake/externals.cmake 文件内找到

  1. machinezone/IXWebSocket websocket and http client and server library, with TLS support and very few dependencies
  2. yhirose/cpp-httplib A C++ header-only HTTP/HTTPS server and client library
  3. nlohmann/json JSON for Modern C++
  4. marzer/tomlplusplus Header-only TOML config file parser and serializer for C++17
  5. google/googletest GoogleTest - Google Testing and Mocking Framework

其中 google/googletest 仅用于测试,实际使用时将忽略。 这些项目将自动通过 CMake 中的 FetchContent 下载并编译, 你也可以单独安装这些第三方库,cpp-mirai-client会自动使用 find_package 来找到对应的文件。所有依赖均为私有依赖,仅用于编译,使用cpp-mirai-client 时不需要链接这些第三方库。

本项目的文档生成使用了 Doxygenjothepro/doxygen-awesome-css

Read Next: 快速入门

cpp-mirai-client's People

Contributors

numendacil avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.