• Stars
    star
    17,137
  • Rank 1,508 (Top 0.04 %)
  • Language
    C++
  • License
    Other
  • Created over 7 years ago
  • Updated 3 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Mars is a cross-platform network component developed by WeChat.

Mars

license Release Version PRs Welcome WeChat Approved WeChat Approved

(中文版本请参看这里)

Mars is a cross-platform infrastructure component developed by WeChat Mobile Team. It has been proved to be effective by billions of WeChat users.

  1. Cross platform, easy to deploy if you are developing multi-platform or multi-business application.
  2. Suitable for small amount data transmission
  3. Mobile platform friendly, low power and traffic consumption
  4. A network solution fit for mobile application

mars

  • comm: common library, including socket, thread, message queue, coroutine, etc.
  • Xlog: a reliable log component with high-performance.
  • SDT: a network detection component.
  • STN: a signaling network component, the major part of Mars.

Samples

Start with sample usage here.

Getting started

Choose Android or iOS/OS X or Windows.

Android

You can use either mars-wrapper or mars-core. We recommend you to use mars-wrapper when you just want to build a sample or demo, while mars-core is preferred to be used in your APP.

mars-wrapper

Add dependencies by adding the following lines to your app/build.gradle.

dependencies {
    compile 'com.tencent.mars:mars-wrapper:1.2.5'
}

OR

mars-core

Add dependencies by adding the following lines to your app/build.gradle.

dependencies {
    compile 'com.tencent.mars:mars-core:1.2.5'
}

OR

mars-xlog

If you just want to user xlog, add dependencies by adding the following lines to your app/build.gradle. note: xlog is included in mars-core and mars-wrapper.

dependencies {
    compile 'com.tencent.mars:mars-xlog:1.2.5'
}

If you read here, make sure you have added dependencies of mars-wrapper, mars-core or mars-xlog.

Xlog Init

Initialize Xlog when your APP starts. Remember to use an exclusive folder to save the log files, no other files are acceptable in the folder since they would be removed by the cleansing function in Xlog automatically.

When multiple processes is used in your app, make sure that each process owns its exclusive log file.

System.loadLibrary("c++_shared");
System.loadLibrary("marsxlog");

final String SDCARD = Environment.getExternalStorageDirectory().getAbsolutePath();
final String logPath = SDCARD + "/marssample/log";

// this is necessary, or may crash for SIGBUS
final String cachePath = this.getFilesDir() + "/xlog"

//init xlog
Xlog xlog = new Xlog();
Log.setLogImp(xlog);

if (BuildConfig.DEBUG) {
    Log.setConsoleLogOpen(true);
  	Log.appenderOpen(Xlog.LEVEL_DEBUG, Xlog.AppednerModeAsync, "", logPath, logFileName, 0);
} else {
    Log.setConsoleLogOpen(false);
  	Log.appenderOpen(Xlog.LEVEL_INFO, Xlog.AppednerModeAsync, "", logPath, logFileName, 0);
}

Uninitialized Xlog when your app exits

Log.appenderClose();

STN Init

If you add dependencies of mars-core to your project, you need to initialize and release STN. Initialize STN before you use it

// set callback
AppLogic.setCallBack(stub);
StnLogic.setCallBack(stub);
SdtLogic.setCallBack(stub);

// Initialize the Mars PlatformComm
Mars.init(getApplicationContext(), new Handler(Looper.getMainLooper()));

// Initialize the Mars
StnLogic.setLonglinkSvrAddr(profile.longLinkHost(), profile.longLinkPorts());
StnLogic.setShortlinkSvrAddr(profile.shortLinkPort());
StnLogic.setClientVersion(profile.productID());
Mars.onCreate(true);

BaseEvent.onForeground(true);
StnLogic.makesureLongLinkConnected();

Firstly, you should call the setCallBack interface, and secondly, the Mars.init. Then, to initialize the Mars, there is to need to strictly follow the orders of the four commands. Finally, after Mars are initialized, onForeground and makesureLongLinkConnect can be called.

Destroy STN or exit your app:

Mars.onDestroy();

Event Change

Network change:

BaseEvent.onNetworkChange()

If you add dependencies of mars-wrapper to your project, you just need initialize STN and no need uninitialized.

MarsServiceProxy.init(this, getMainLooper(),null);

No matter which way of dependencies you used, you must pay attention to these.

The state (background or foreground) of the APP is changed:

BaseEvent.onForeground(boolean);

The account of the APP is changed:

StnLogic.reset();

If you want to modify the encryption algorithm of Xlog, the packer/unpacker of longlink/shortlink, or you want to define the other components by yourself, refer here

iOS/OS X

Compile

python build_ios.py

or

python build_osx.py
  1. Add mars.framework as a dependency of your project.
  2. Rename files in mars/libraries/mars_android_sdk/jni with .rewriteme extension to .cc extension.
  3. Add header files in mars/libraries/mars_android_sdk/jni and source files from step 2 into your project.

Xlog Init

Initialize Xlog when your app starts. Remember to use an exclusive folder to save the log files, no other files are acceptable in the folder since they would be removed by the cleansing function in Xlog automatically.

NSString* logPath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingString:@"/log"];

// set do not backup for logpath
const char* attrName = "com.apple.MobileBackup";
u_int8_t attrValue = 1;
setxattr([logPath UTF8String], attrName, &attrValue, sizeof(attrValue), 0, 0);

// init xlogger
#if DEBUG
xlogger_SetLevel(kLevelDebug);
appender_set_console_log(true);
#else
xlogger_SetLevel(kLevelInfo);
appender_set_console_log(false);
#endif
XLogConfig config;
config.mode_ = kAppenderAsync;
config.logdir_ = [logPath UTF8String];
config.nameprefix_ = "Test";
config.pub_key_ = "";
config.compress_mode_ = kZlib;
config.compress_level_ = 0;
config.cachedir_ = "";
config.cache_days_ = 0;
appender_open(config);

Close xlog in function "applicationWillTerminate"

appender_close();

STN Init

Initialize STN before you use it:

- (void)setCallBack {
    mars::stn::SetCallback(mars::stn::StnCallBack::Instance());
    mars::app::SetCallback(mars::app::AppCallBack::Instance());
}

- (void) createMars {
    mars::baseevent::OnCreate();
}

- (void)setClientVersion:(UInt32)clientVersion {
    mars::stn::SetClientVersion(clientVersion);
}

- (void)setShortLinkDebugIP:(NSString *)IP port:(const unsigned short)port {
    std::string ipAddress([IP UTF8String]);
    mars::stn::SetShortlinkSvrAddr(port, ipAddress);
}

- (void)setShortLinkPort:(const unsigned short)port {
    mars::stn::SetShortlinkSvrAddr(port);
}

- (void)setLongLinkAddress:(NSString *)string port:(const unsigned short)port debugIP:(NSString *)IP {
    std::string ipAddress([string UTF8String]);
    std::string debugIP([IP UTF8String]);
    std::vector<uint16_t> ports;
    ports.push_back(port);
    mars::stn::SetLonglinkSvrAddr(ipAddress,ports,debugIP);
}

- (void)setLongLinkAddress:(NSString *)string port:(const unsigned short)port {
    std::string ipAddress([string UTF8String]);
    std::vector<uint16_t> ports;
    ports.push_back(port);
    mars::stn::SetLonglinkSvrAddr(ipAddress,ports);
}

- (void)reportEvent_OnForeground:(BOOL)isForeground {
    mars::baseevent::OnForeground(isForeground);
}

- (void)makesureLongLinkConnect {
    mars::stn::MakesureLonglinkConnected();
}

Firstly, you should call the setCallBack interface, and secondly, the Mars.init. Then, to initialize the Mars, there is to need to strictly follow the orders of the four commands. Finally, after Mars are initialized, onForeground and makesureLongLinkConnect can be called.

If you want to destroy STN or exit App:

- (void)destroyMars {
    mars::baseevent::OnDestroy();
}

Event Change

When the App's state of background or foreground is changed:

- (void)reportEvent_OnForeground:(BOOL)isForeground {
    mars::baseevent::OnForeground(isForeground);
}

Network change:

- (void)reportEvent_OnNetworkChange {
    mars::baseevent::OnNetworkChange();
}

Windows

Install Visual Studio 2015.

Compile

python build_windows.py
  1. Add mars.lib as a dependency of your project.
  2. Rename files in mars/libraries/mars_android_sdk/jni with .rewriteme extension to .cc extension.
  3. Add header files in mars/libraries/mars_android_sdk/jni and source files from step 2 into your project.

Xlog Init

Initialize Xlog when your app starts. Remember to use an exclusive folder to save the log files, no other files are acceptable in the folder since they would be removed by the cleansing function in Xlog automatically.

std::string logPath = ""; //use your log path
std::string pubKey = ""; //use you pubkey for log encrypt

// init xlog
#if DEBUG
xlogger_SetLevel(kLevelDebug);
appender_set_console_log(true);
#else
xlogger_SetLevel(kLevelInfo);
appender_set_console_log(false);
#endif
appender_open(kAppenderAsync, logPath.c_str(), "Test", 0, pubKey.c_str());

Uninitialized xlog before your app exits

appender_close();

STN Init

Initialize STN before you use it:

void setShortLinkDebugIP(const std::string& _ip, unsigned short _port)
{
	mars::stn::SetShortlinkSvrAddr(_port, _ip);
}
void setShortLinkPort(unsigned short _port)
{
	mars::stn::SetShortlinkSvrAddr(_port, "");
}
void setLongLinkAddress(const std::string& _ip, unsigned short _port, const std::string& _debug_ip)
{
	vector<uint16_t> ports;
	ports.push_back(_port);
	mars::stn::SetLonglinkSvrAddr(_ip, ports, _debug_ip);
}

void Init()
{
	mars::stn::SetCallback(mars::stn::StnCallBack::Instance());
	mars::app::SetCallback(mars::app::AppCallBack::Instance());
	mars::baseevent::OnCreate();

	//todo
	//mars::stn::SetClientVersion(version);
	//setShortLinkDebugIP(...)
	//setLongLinkAddress(...)

	mars::baseevent::OnForeground(true);
	mars::stn::MakesureLonglinkConnected();
}

Firstly, you should call the setCalBack interface, and secondly, the Mars.init. Then, to initialize the Mars, there is to need to strictly follow the orders of the four commands. Finally, after Mars are initialized, onForeground and makesureLongLinkConnect can be called.

If you want to destroy STN or exit App:

mars::baseevent::OnDestroy();

Support

Any problem?

  1. Learn more from mars/sample.
  2. Read the source code.
  3. Read the wiki or FAQ for help.
  4. Contact us for help.

Contributing

For more information about contributing issues or pull requests, see our Mars Contributing Guide.

License

Mars is under the MIT license. See the LICENSE file for details.


Mars

license Release Version PRs Welcome WeChat Approved WeChat Approved

Mars 是微信官方的跨平台跨业务的终端基础组件。

mars

  • comm:可以独立使用的公共库,包括 socket、线程、消息队列、协程等;
  • xlog:高可靠性高性能的运行期日志组件;
  • SDT: 网络诊断组件;
  • STN: 信令分发网络模块,也是 Mars 最主要的部分。

Samples

sample 的使用请参考这里

Getting started

接入 Android 或者 iOS/OS X 或者 Windows

Android

gradle 接入我们提供了两种接入方式:mars-wrapper 或者 mars-core。如果你只是想做个 sample 推荐使用 mars-wrapper,可以快速开发;但是如果你想把 mars 用到你的 app 中的话,推荐使用 mars-core,可定制性更高。

mars-wrapper

在 app/build.gradle 中添加 mars-wrapper 的依赖:

dependencies {
    compile 'com.tencent.mars:mars-wrapper:1.2.5'
}

或者

mars-core

在 app/build.gradle 中添加 mars-core 的依赖:

dependencies {
    compile 'com.tencent.mars:mars-core:1.2.5'
}

或者

mars-xlog

如果只想使用 xlog,可以只加 xlog 的依赖(mars-core,mars-wrapper 中都已经包括 xlog):

dependencies {
    compile 'com.tencent.mars:mars-xlog:1.2.5'
}

接着往下操作之前,请先确保你已经添加了 mars-wrapper 或者 mars-core 或者 mars-xlog 的依赖

Xlog Init

在程序启动加载 Xlog 后紧接着初始化 Xlog。但要注意如果你的程序使用了多进程,不要把多个进程的日志输出到同一个文件中,保证每个进程独享一个日志文件。而且保存 log 的目录请使用单独的目录,不要存放任何其他文件防止被 xlog 自动清理功能误删。

System.loadLibrary("c++_shared");
System.loadLibrary("marsxlog");

final String SDCARD = Environment.getExternalStorageDirectory().getAbsolutePath();
final String logPath = SDCARD + "/marssample/log";

// this is necessary, or may crash for SIGBUS
final String cachePath = this.getFilesDir() + "/xlog"

//init xlog
Xlog.XLogConfig logConfig = new Xlog.XLogConfig();
logConfig.mode = Xlog.AppednerModeAsync;
logConfig.logdir = logPath;
logConfig.nameprefix = logFileName;
logConfig.pubkey = "";
logConfig.compressmode = Xlog.ZLIB_MODE;
logConfig.compresslevel = 0;
logConfig.cachedir = "";
logConfig.cachedays = 0;
if (BuildConfig.DEBUG) {
    logConfig.level = Xlog.LEVEL_VERBOSE;
    Xlog.setConsoleLogOpen(true);
} else {
    logConfig.level = Xlog.LEVEL_INFO;
    Xlog.setConsoleLogOpen(false);
}

Log.setLogImp(new Xlog());

程序退出时关闭日志:

Log.appenderClose();

STN Init

如果你是把 mars-core 作为依赖加入到你的项目中的话,你需要显式的初始化和反初始化 STN

在使用 STN 之前进行初始化

// set callback
AppLogic.setCallBack(stub);
StnLogic.setCallBack(stub);
SdtLogic.setCallBack(stub);

// Initialize the Mars PlatformComm
Mars.init(getApplicationContext(), new Handler(Looper.getMainLooper()));

// Initialize the Mars
StnLogic.setLonglinkSvrAddr(profile.longLinkHost(), profile.longLinkPorts());
StnLogic.setShortlinkSvrAddr(profile.shortLinkPort());
StnLogic.setClientVersion(profile.productID());
Mars.onCreate(true);
BaseEvent.onForeground(true);

StnLogic.makesureLongLinkConnected();

初始化顺序不一定要严格遵守上述代码的顺序,但在初始化时首先要调用 setCallBack 接口 (callback 文件的编写可以参考 demo),再调用 Mars.init,最后再调用 onForeground 和 makesureLongLinkConnect,中间顺序可以随意更改。注意:STN 默认是后台,所以初始化 STN 后需要主动调用一次BaseEvent.onForeground(true)

需要释放 STN 或者退出程序时:

Mars.onDestroy();

Event Change

网络切换时:

BaseEvent.onNetworkChange()

如果你是把 mars-wrapper 作为依赖加入到你的项目中,你只需要显式的初始化 STN,不需要反初始化(因为 mars-wrapper 会进行反初始化)

MarsServiceProxy.init(this, getMainLooper(),null);

不管你是使用 mars-wrapper 还是 mars-core,你都需要特别注意以下事件:

前后台切换:

BaseEvent.onForeground(boolean);

应用的账号信息更改:

StnLogic.reset();

如果你想修改 Xlog 的加密算法或者长短连的加解包部分甚至更改组件的其他部分,可以参考这里

iOS/OS X

编译

python build_ios.py

or

python build_osx.py

把 mars.framework 作为依赖加入到你的项目中,把mars/libraries/mars_android_sdk/jni 目录的后缀名为 rewriteme 的文件名删掉".rewriteme"和头文件一起加入到你的项目中。

Xlog Init

在程序启动加载 Xlog 后紧接着初始化 Xlog。但要注意保存 log 的目录请使用单独的目录,不要存放任何其他文件防止被 xlog 自动清理功能误删。

NSString* logPath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingString:@"/log"];

// set do not backup for logpath
const char* attrName = "com.apple.MobileBackup";
u_int8_t attrValue = 1;
setxattr([logPath UTF8String], attrName, &attrValue, sizeof(attrValue), 0, 0);

// init xlogger
#if DEBUG
xlogger_SetLevel(kLevelDebug);
appender_set_console_log(true);
#else
xlogger_SetLevel(kLevelInfo);
appender_set_console_log(false);
#endif

XLogConfig config;
config.mode_ = kAppenderAsync;
config.logdir_ = [logPath UTF8String];
config.nameprefix_ = "Test";
config.pub_key_ = "";
config.compress_mode_ = kZlib;
config.compress_level_ = 0;
config.cachedir_ = "";
config.cache_days_ = 0;
appender_open(config);

在函数 "applicationWillTerminate" 中反初始化 Xlog

appender_close();

STN Init

在你用 STN 之前初始化:

- (void)setCallBack {
    mars::stn::SetCallback(mars::stn::StnCallBack::Instance());
    mars::app::SetCallback(mars::app::AppCallBack::Instance());
}

- (void) createMars {
    mars::baseevent::OnCreate();
}

- (void)setClientVersion:(UInt32)clientVersion {
    mars::stn::SetClientVersion(clientVersion);
}

- (void)setShortLinkDebugIP:(NSString *)IP port:(const unsigned short)port {
    std::string ipAddress([IP UTF8String]);
    mars::stn::SetShortlinkSvrAddr(port, ipAddress);
}

- (void)setShortLinkPort:(const unsigned short)port {
    mars::stn::SetShortlinkSvrAddr(port);
}

- (void)setLongLinkAddress:(NSString *)string port:(const unsigned short)port debugIP:(NSString *)IP {
    std::string ipAddress([string UTF8String]);
    std::string debugIP([IP UTF8String]);
    std::vector<uint16_t> ports;
    ports.push_back(port);
    mars::stn::SetLonglinkSvrAddr(ipAddress,ports,debugIP);
}

- (void)setLongLinkAddress:(NSString *)string port:(const unsigned short)port {
    std::string ipAddress([string UTF8String]);
    std::vector<uint16_t> ports;
    ports.push_back(port);
    mars::stn::SetLonglinkSvrAddr(ipAddress,ports);
}

- (void)reportEvent_OnForeground:(BOOL)isForeground {
    mars::baseevent::OnForeground(isForground);
}

- (void)makesureLongLinkConnect {
    mars::stn::MakesureLonglinkConnected();
}

初始化顺序不一定要严格遵守上述代码的顺序,但在初始化时首先要调用 setCallBack 接口 (callback 文件的编写可以参考 demo),再调用 Mars.init,最后再调用 onForeground 和 makesureLongLinkConnect,中间顺序可以随意更改。注意:STN 默认是后台,所以初始化 STN 后需要主动调用一次BaseEvent.onForeground(true)

需要释放 STN 或者退出程序时:

- (void)destroyMars {
    mars::baseevent::OnDestroy();
}

Event Change

前后台切换时:

- (void)reportEvent_OnForeground:(BOOL)isForeground {
    mars::baseevent::OnForeground(isForeground);
}

网络切换时:

- (void)reportEvent_OnNetworkChange {
    mars::baseevent::OnNetworkChange();
}

Windows

安装Visual Studio 2015

编译

python build_windows.py

把 mars.lib作为依赖加入到你的项目中,把mars/libraries/mars_android_sdk/jni 目录的后缀名为 rewriteme 的文件名删掉".rewriteme"和头文件一起加入到你的项目中。

Xlog Init

在程序启动加载 Xlog 后紧接着初始化 Xlog。但要注意保存 log 的目录请使用单独的目录,不要存放任何其他文件防止被 xlog 自动清理功能误删。

std::string logPath = ""; //use your log path
std::string pubKey = ""; //use you pubkey for log encrypt

// init xlog
#if DEBUG
xlogger_SetLevel(kLevelDebug);
appender_set_console_log(true);
#else
xlogger_SetLevel(kLevelInfo);
appender_set_console_log(false);
#endif
appender_open(kAppenderAsync, logPath.c_str(), "Test", 0,  pubKey.c_str());

在程序退出前反初始化 Xlog

appender_close();

STN Init

在你用 STN 之前初始化:

void setShortLinkDebugIP(const std::string& _ip, unsigned short _port)
{
	mars::stn::SetShortlinkSvrAddr(_port, _ip);
}
void setShortLinkPort(unsigned short _port)
{
	mars::stn::SetShortlinkSvrAddr(_port, "");
}
void setLongLinkAddress(const std::string& _ip, unsigned short _port, const std::string& _debug_ip)
{
	vector<uint16_t> ports;
	ports.push_back(_port);
	mars::stn::SetLonglinkSvrAddr(_ip, ports, _debug_ip);
}

void Init()
{
	mars::stn::SetCallback(mars::stn::StnCallBack::Instance());
	mars::app::SetCallback(mars::app::AppCallBack::Instance());
	mars::baseevent::OnCreate();

	//todo
	//mars::stn::SetClientVersion(version);
	//setShortLinkDebugIP(...)
	//setLongLinkAddress(...)

	mars::baseevent::OnForeground(true);
	mars::stn::MakesureLonglinkConnected();
}

初始化顺序不一定要严格遵守上述代码的顺序,但在初始化时首先要调用 setCallBack 接口 (callback 文件的编写可以参考 demo),再调用 Mars.init,最后再调用 onForeground 和 makesureLongLinkConnect,中间顺序可以随意更改。注意:STN 默认是后台,所以初始化 STN 后需要主动调用一次BaseEvent.onForeground(true)

需要释放 STN 或者退出程序时:

mars::baseevent::OnDestroy();

Support

还有其他问题?

  1. 参看 mars/sample
  2. 阅读 源码
  3. 阅读 wiki 或者 FAQ
  4. 联系我们。

Contributing

关于 Mars 分支管理、issue 以及 pr 规范,请阅读 Mars Contributing Guide

License

Mars 使用的 MIT 协议,详细请参考 LICENSE

More Repositories

1

weui

A UI library by WeChat official design team, includes the most useful widgets/modules in mobile web applications.
Less
27,053
star
2

wepy

小程序组件化开发框架
JavaScript
22,396
star
3

ncnn

ncnn is a high-performance neural network inference framework optimized for the mobile platform
C++
19,310
star
4

tinker

Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstall apk.
Java
17,056
star
5

MMKV

An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, and POSIX.
C++
16,913
star
6

APIJSON

🏆 零代码、全功能、强安全 ORM 库 🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构。 🏆 A JSON Transmission Protocol and an ORM Library 🚀 provides APIs and Docs without writing any code.
Java
16,681
star
7

vConsole

A lightweight, extendable front-end developer tool for mobile web page.
TypeScript
16,379
star
8

weui-wxss

A UI library by WeChat official design team, includes the most useful widgets/modules.
Less
14,966
star
9

QMUI_Android

提高 Android UI 开发效率的 UI 库
Java
14,336
star
10

rapidjson

A fast JSON parser/generator for C++ with both SAX/DOM style API
C++
13,803
star
11

secguide

面向开发人员梳理的代码安全指南
13,093
star
12

omi

Web Components Framework - Web组件框架
TypeScript
12,926
star
13

VasSonic

VasSonic is a lightweight and high-performance Hybrid framework developed by tencent VAS team, which is intended to speed up the first screen of websites working on Android and iOS platform.
Java
11,779
star
14

matrix

Matrix is a plugin style, non-invasive APM system developed by WeChat.
Java
11,417
star
15

wcdb

WCDB is a cross-platform database framework developed by WeChat.
C
10,509
star
16

xLua

xLua is a lua programming solution for C# ( Unity, .Net, Mono) , it supports android, ios, windows, linux, osx, etc.
C
9,133
star
17

libco

libco is a coroutine library which is widely used in wechat back-end service. It has been running on tens of thousands of machines since 2013.
C++
7,998
star
18

Hippy

Hippy is designed to easily build cross-platform dynamic apps. 👏
C++
7,840
star
19

Shadow

零反射全动态Android插件框架
Java
7,316
star
20

QMUI_iOS

QMUI iOS——致力于提高项目 UI 开发效率的解决方案
Objective-C
7,030
star
21

MLeaksFinder

Find memory leaks in your iOS app at develop time.
Objective-C
5,399
star
22

lemon-cleaner

腾讯柠檬清理是针对macOS系统专属制定的清理工具。主要功能包括重复文件和相似照片的识别、软件的定制化垃圾扫描、可视化的全盘空间分析、内存释放、浏览器隐私清理以及设备实时状态的监控等。重点聚焦清理功能,对上百款软件提供定制化的清理方案,提供专业的清理建议,帮助用户轻松完成一键式清理。
Objective-C
5,188
star
23

kbone

一个致力于微信小程序和 Web 端同构的解决方案
JavaScript
4,742
star
24

libpag

The official rendering library for PAG (Portable Animated Graphics) files that renders After Effects animations natively across multiple platforms.
C++
4,729
star
25

puerts

PUER(普洱) Typescript. Let's write your game in UE or Unity with TypeScript.
C++
4,661
star
26

GT

GT (Great Tit) is a portable debugging tool for bug hunting and performance tuning on smartphones anytime and anywhere just as listening music with Walkman. GT can act as the Integrated Debug Environment by directly running on smartphones.
Java
4,385
star
27

TNN

TNN: developed by Tencent Youtu Lab and Guangying Lab, a uniform deep learning inference framework for mobile、desktop and server. TNN is distinguished by several outstanding features, including its cross-platform capability, high performance, model compression and code pruning. Based on ncnn and Rapidnet, TNN further strengthens the support and performance optimization for mobile devices, and also draws on the advantages of good extensibility and high performance from existed open source efforts. TNN has been deployed in multiple Apps from Tencent, such as Mobile QQ, Weishi, Pitu, etc. Contributions are welcome to work in collaborative with us and make TNN a better framework.
C++
4,297
star
28

westore

小程序项目分层架构
JavaScript
4,216
star
29

tmagic-editor

TypeScript
4,037
star
30

wujie

极致的微前端框架
TypeScript
3,801
star
31

vap

VAP是企鹅电竞开发,用于播放特效动画的实现方案。具有高压缩率、硬件解码等优点。同时支持 iOS,Android,Web 平台。
Objective-C
3,794
star
32

phxpaxos

The Paxos library implemented in C++ that has been used in the WeChat production environment.
C++
3,301
star
33

WeFlow

A web developer workflow tool by WeChat team based on tmt-workflow, with cross-platform supported and environment ready.
JavaScript
3,224
star
34

cherry-markdown

✨ A Markdown Editor
JavaScript
3,195
star
35

weui.js

A lightweight javascript library for WeUI.
JavaScript
3,157
star
36

spring-cloud-tencent

Spring Cloud Tencent is a Spring Cloud based Service Governance Framework provided by Tencent.
Java
3,116
star
37

tencent-ml-images

Largest multi-label image database; ResNet-101 model; 80.73% top-1 acc on ImageNet
Python
3,046
star
38

tdesign

Enterprise Design System
Vue
3,010
star
39

VasDolly

Android V1 and V2 Signature Channel Package Plugin
Java
2,999
star
40

FaceDetection-DSFD

腾讯优图高精度双分支人脸检测器
Python
2,863
star
41

PhoenixGo

Go AI program which implements the AlphaGo Zero paper
C++
2,863
star
42

Tendis

Tendis is a high-performance distributed storage system fully compatible with the Redis protocol.
C++
2,837
star
43

behaviac

behaviac is a framework of the game AI development, and it also can be used as a rapid game prototype design tool. behaviac supports the behavior tree, finite state machine and hierarchical task network(BT, FSM, HTN)
C#
2,784
star
44

PocketFlow

An Automatic Model Compression (AutoMC) framework for developing smaller and faster AI applications.
Python
2,782
star
45

MSEC

Mass Service Engine in Cluster(MSEC) is opened source by QQ team from Tencent. It is a backend DEV &OPS engine, including RPC,name finding,load balance,monitoring,release and capacity management.
Java
2,745
star
46

phxsql

A high availability MySQL cluster that guarantees data consistency between a master and slaves.
C++
2,463
star
47

OOMDetector

OOMDetector is a memory monitoring component for iOS which provides you with OOM monitoring, memory allocation monitoring, memory leak detection and other functions.
Objective-C++
2,298
star
48

tsf

coroutine and Swoole based php server framework in tencent
PHP
2,179
star
49

tmt-workflow

A web developer workflow used by WeChat team based on Gulp, with cross-platform supported and solutions prepared.
CSS
2,175
star
50

Hardcoder

Hardcoder is a solution which allows Android APP and Android System to communicate with each other directly, solving the problem that Android APP could only use system standard API rather than the hardware resource of system.
C++
2,145
star
51

LKImageKit

A high-performance image framework, including a series of capabilities such as image views, image downloader, memory caches, disk caches, image decoders and image processors.
Objective-C
2,079
star
52

UnLua

A feature-rich, easy-learning and highly optimized Lua scripting plugin for UE.
C++
2,053
star
53

TubeMQ

TubeMQ has been donated to the Apache Software Foundation and renamed to InLong, please visit the new Apache repository: https://github.com/apache/incubator-inlong
2,027
star
54

ObjectDetection-OneStageDet

单阶段通用目标检测器
Python
1,962
star
55

cloudbase-framework

腾讯云开发云原生一体化部署工具 🚀 CloudBase Framework:一键部署,不限框架语言,云端一体化开发,基于Serverless 架构。A front-end and back-end integrated deployment tool. One-click deploy to serverless architecture. https://docs.cloudbase.net/framework/index
JavaScript
1,936
star
56

InjectFix

InjectFix is a hot-fix solution library for Unity
C#
1,933
star
57

TscanCode

A static code analyzer for C++, C#, Lua
C++
1,916
star
58

phxrpc

A simple C++ based RPC framework.
C++
1,905
star
59

soter

A secure and quick biometric authentication standard and platform in Android held by Tencent.
Java
1,902
star
60

phxqueue

A high-availability, high-throughput and highly reliable distributed queue based on the Paxos algorithm.
C++
1,891
star
61

plato

腾讯高性能分布式图计算框架Plato
C++
1,889
star
62

GameAISDK

基于图像的游戏AI自动化框架
C++
1,861
star
63

MedicalNet

Many studies have shown that the performance on deep learning is significantly affected by volume of training data. The MedicalNet project provides a series of 3D-ResNet pre-trained models and relative code.
Python
1,837
star
64

TSW

Tencent Server Web
TypeScript
1,802
star
65

NeuralNLP-NeuralClassifier

An Open-source Neural Hierarchical Multi-label Text Classification Toolkit
Python
1,781
star
66

QMUI_Web

An efficient front-end framework for developers building UI on the web.
JavaScript
1,719
star
67

Biny

Biny is a tiny, high-performance PHP framework for web applications
PHP
1,690
star
68

sluaunreal

lua dev plugin for unreal engine 4 or 5
C++
1,687
star
69

paxosstore

PaxosStore has been deployed in WeChat production for more than two years, providing storage services for the core businesses of WeChat backend. Now PaxosStore is running on thousands of machines, and is able to afford billions of peak TPS.
C++
1,658
star
70

Metis

Metis is a learnware platform in the field of AIOps.
Python
1,644
star
71

CodeAnalysis

Static Code Analysis - 静态代码分析
Python
1,585
star
72

TurboTransformers

a fast and user-friendly runtime for transformer inference (Bert, Albert, GPT2, Decoders, etc) on CPU and GPU.
C++
1,442
star
73

TencentOS-kernel

腾讯针对云的场景研发的服务器操作系统
1,401
star
74

nohost

基于 Whistle 实现的多账号多环境远程配置及抓包调试平台
JavaScript
1,392
star
75

TBase

TBase is an enterprise-level distributed HTAP database. Through a single database cluster to provide users with highly consistent distributed database services and high-performance data warehouse services, a set of integrated enterprise-level solutions is formed.
C
1,372
star
76

WeDemo

WeDemo为微信团队开源项目,用于帮助微信开发者完成微信登录、微信分享等功能的接入和开发。开发者可参考源代码完成开发,也可以直接将代码应用到自己的App开发中,安全、便捷地在App中实现微信分享、微信登录功能。
Objective-C
1,365
star
77

feflow

🚀 A command line tool aims to improve front-end engineer workflow and standard, powered by TypeScript.
TypeScript
1,354
star
78

GAutomator

Automation for mobile games
Objective-C
1,318
star
79

tdesign-vue-next

A Vue3.x UI components lib for TDesign.
TypeScript
1,316
star
80

flare

Flare是广泛投产于腾讯广告后台的现代化C++开发框架,包含了基础库、RPC、各种客户端等。主要特点为易用性强、长尾延迟低。
C++
1,264
star
81

TFace

A trusty face analysis research platform developed by Tencent Youtu Lab
Python
1,236
star
82

LuaPanda

lua debug and code tools for VS Code
Lua
1,219
star
83

FeatherCNN

FeatherCNN is a high performance inference engine for convolutional neural networks.
C++
1,209
star
84

tdesign-miniprogram

A Wechat MiniProgram UI components lib for TDesign.
HTML
1,084
star
85

tgfx

A lightweight 2D graphics library for rendering texts, geometries, and images with high-performance APIs that work across various platforms.
C++
1,011
star
86

TencentPretrain

Tencent Pre-training framework in PyTorch & Pre-trained Model Zoo
Python
985
star
87

RapidView

RapidView is an android ui and lightapp development framework
Java
977
star
88

FAutoTest

A UI automated testing framework for H5 and applets
Python
930
star
89

TencentKona-8

Tencent Kona is a no-cost, production-ready distribution of the Open Java Development Kit (OpenJDK), Long-term support(LTS) with quarterly updates. Tencent Kona serves as the default JDK internally at Tencent Cloud for cloud computing and other Java applications.
Java
909
star
90

tquic

A high-performance, lightweight, and cross-platform QUIC library
Rust
900
star
91

hel

A module federation SDK which is unrelated to tool chain for module consumer. 工具链无关的运行时模块联邦sdk.
JavaScript
888
star
92

tdesign-vue

A Vue.js UI components lib for TDesign.
TypeScript
872
star
93

Pebble

Pebble分布式开发框架
C++
861
star
94

mxflutter

使用 TypeScript/JavaScript 来开发 Flutter 应用的框架。
Dart
834
star
95

Face2FaceTranslator

面对面翻译小程序是微信团队针对面对面沟通的场景开发的流式语音翻译小程序,通过微信同声传译插件提供了语音识别,文本翻译等功能。
JavaScript
822
star
96

tdesign-react

A React UI components lib for TDesign.
TypeScript
787
star
97

LightDiffusionFlow

This extension is developed for AUTOMATIC1111's Stable Diffusion web UI that provides import/export options for parameters.
JavaScript
764
star
98

Real-SR

Real-World Super-Resolution via Kernel Estimation and Noise Injection
Python
753
star
99

DCache

A distributed in-memory NOSQL system based on TARS framework, support LRU algorithm and data persists on back-end database. Users can easily deploy, publish, and scale services on the web interface.
C++
746
star
100

PatrickStar

PatrickStar enables Larger, Faster, Greener Pretrained Models for NLP and democratizes AI for everyone.
Python
741
star