8.2版本上传
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
|
||||
- [README 中文](./README_zh.md)
|
||||
- [README English](./README.md)
|
||||
|
||||
# HybridCLR
|
||||
|
||||
[](https://github.com/focus-creative-games/hybridclr/blob/main/LICENSE)
|
||||
@@ -11,81 +7,84 @@
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
HybridCLR is a **almost perfect** full-platform native c# hot update solution for Unity with complete features, zero cost, high performance, and low memory**.
|
||||
[README 中文](./README.md) | [README English](./README_EN.md)
|
||||
|
||||
HybridCLR expands the ability of il2cpp, making it change from pure [AOT](https://en.wikipedia.org/wiki/Ahead-of-time_compilation) runtime to 'AOT+Interpreter' hybrid runtime, and then natively supports dynamic loading of assembly , so that the games packaged based on il2cpp backend can be executed not only on the Android platform, but also on IOS, Consoles and other platforms that limit JIT efficiently in **AOT+interpreter** hybrid mode, completely supporting hot updates from the bottom layer.
|
||||
[Github](https://github.com/focus-creative-games/hybridclr) | [Gitee](https://gitee.com/focus-creative-games/hybridclr)
|
||||
|
||||
HybridCLR not only supports the traditional fully interpreted execution mode, but also pioneered [Differential Hybrid Execution](https://hybridclr.doc.code-philosophy.com/en/docs/business/differentialhybridexecution) technique. That is, you can add, delete, or modify the AOT dll at will, and intelligently make the changed or newly added classes and functions run in interpreter mode, but the unchanged classes and functions run in AOT mode, so that the running performance of the hot-updated game logic basically reaches the original AOT level.
|
||||
HybridCLR是一个**特性完整、零成本、高性能、低内存**的**近乎完美**的Unity全平台原生c#热更新解决方案。
|
||||
|
||||
Welcome to embrace modern native C# hot update technology! ! !
|
||||
HybridCLR扩充了il2cpp运行时代码,使它由纯[AOT](https://en.wikipedia.org/wiki/Ahead-of-time_compilation) runtime变成AOT+Interpreter 混合runtime,进而原生支持动态加载assembly,从底层彻底支持了热更新。使用HybridCLR技术的游戏不仅能在Android平台,也能在IOS、Consoles、WebGL等所有il2cpp支持的平台上高效运行。
|
||||
|
||||
## Documentation
|
||||
由于HybridCLR对ECMA-335规范 的良好支持以及对Unity开发工作流的高度兼容,Unity项目在接入HybridCLR后,可以几乎无缝地获得C#代码热更新的能力,开发者不需要改变日常开发习惯和要求。HybridCLR首次实现了将Unity平台的全平台代码热更新方案的工程难度降到几乎为零的水平。
|
||||
|
||||
- [Official Documentation](https://hybridclr.doc.code-philosophy.com/en/docs/intro)
|
||||
- [Quickstart](https://hybridclr.doc.code-philosophy.com/en/docs/beginner/quickstart)
|
||||
- [Release Log](./RELEASELOG.md)
|
||||
欢迎拥抱现代原生C#热更新技术 !!!
|
||||
|
||||
## Features
|
||||
## 文档
|
||||
|
||||
- Features complete. A nearly complete implementation of the [ECMA-335 specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), with only a very small number of [unsupported features](https://hybridclr.doc.code-philosophy.com/en/docs/basic/notsupportedfeatures).
|
||||
- Zero learning and use costs. HybridCLR enhances the pure AOT runtime into a complete runtime, making hot update code work seamlessly with AOT code. The script class and the AOT class are in the same runtime, and you can freely write codes such as inheritance, reflection, and multi-threading (volatile, ThreadStatic, Task, async). No need to write any special code, no code generation, almost unlimited.
|
||||
- Efficient execution. Implemented an extremely efficient register interpreter, all indicators are significantly better than other hot update schemes. [Performance Test Report](https://hybridclr.doc.code-philosophy.com/en/docs/basic/performance)
|
||||
- Memory efficient. The classes defined in the hot update script occupy the same memory space as ordinary c# classes, which is far superior to other hot update solutions. [Memory and GC](https://hybridclr.doc.code-philosophy.com/en/docs/basic/memory)
|
||||
- Due to the perfect support for generics, libraries that are not compatible with il2cpp due to AOT generics issues can now run perfectly under il2cpp
|
||||
- Support some features not supported by il2cpp, such as __makeref, __reftype, __refvalue directives
|
||||
- [Differential Hybrid Execution](https://hybridclr.doc.code-philosophy.com/en/docs/business/differentialhybridexecution)
|
||||
- [官方文档](https://hybridclr.doc.code-philosophy.com/docs/intro)
|
||||
- [快速上手](https://hybridclr.doc.code-philosophy.com/docs/beginner/quickstart)
|
||||
- [商业项目案例](https://hybridclr.doc.code-philosophy.com/docs/other/businesscase)
|
||||
|
||||
## Working Principle
|
||||
## 特性
|
||||
|
||||
HybridCLR is inspired by mono's [mixed mode execution](https://www.mono-project.com/news/2017/11/13/mono-interpreter/) technology, and provides additional AOT runtimes such as unity's il2cpp The interpreter module is provided to transform them from pure AOT runtime to "AOT + Interpreter" hybrid operation mode.
|
||||
- 近乎完整实现了[ECMA-335规范](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/),只有极少量的[不支持的特性](https://hybridclr.doc.code-philosophy.com/docs/basic/notsupportedfeatures)。
|
||||
- 零学习和使用成本。对绝大多数开发者来说写代码近乎没有限制。 热更新代码与AOT代码无缝工作,可以随意写继承、**泛型**、**反射**之类的代码。不需要额外写任何特殊代码、没有代码生成
|
||||
- 完全支持多线程,包含但不限于 volatile、ThreadStatic、async Task等相关功能和特性。这是其他所有热更新方案都不支持的
|
||||
- 几乎完全兼容Unity的工作流。包括且不限于支持热更新**MonoBehaviour**、ScriptableObject、**DOTS**技术,资源上挂载的热更新脚本可以正确实例化,这是其他所有热更新方案都不支持的
|
||||
- 执行高效。实现了一个极其高效的寄存器解释器,所有指标都大幅优于其他热更新方案。[性能测试报告](https://hybridclr.doc.code-philosophy.com/docs/basic/performance)
|
||||
- 内存高效。 热更新脚本中定义的类跟普通c#类占用一样的内存空间,远优于其他热更新方案。[内存占用报告](https://hybridclr.doc.code-philosophy.com/docs/basic/memory)
|
||||
- 支持MonoPInvokeCallback,可以与native代码或者其他语言如lua、javascript、python良好交互
|
||||
- 支持PInvoke
|
||||
- 支持一些il2cpp不支持的特性,如\_\_makeref、 \_\_reftype、\_\_refvalue指令
|
||||
- 支持独创的 **Differential Hybrid Execution(DHE)** 差分混合执行技术,即可以对AOT dll任意增删改,会智能地让未改动的函数以AOT方式运行,变化或者新增的函数以interpreter模式运行,让热更新的游戏逻辑的运行性能基本达到原生AOT的水平
|
||||
- 支持**热重载**技术,可以100%卸载程序集
|
||||
- 支持动态**Hotfix**技术,可以运行过程中无感修复代码bug
|
||||
- 支持现代的dll加密技术,有效保障代码安全
|
||||
|
||||
## 支持的版本与平台
|
||||
|
||||
- 支持2019.4.x、2020.3.x、2021.3.x、2022.3.x、2023.2.x、6000.x.y 所有LTS版本
|
||||
- 支持所有il2cpp支持的平台
|
||||
- 支持团结引擎和鸿蒙平台
|
||||
|
||||
## 工作原理
|
||||
|
||||
HybridCLR从mono的 [mixed mode execution](https://www.mono-project.com/news/2017/11/13/mono-interpreter/) 技术中得到启发,为unity的il2cpp之类的AOT runtime额外提供了interpreter模块,将它们由纯AOT运行时改造为"AOT + Interpreter"混合运行方式。
|
||||
|
||||

|
||||
|
||||
More specifically, HybridCLR does the following:
|
||||
更具体地说,HybridCLR做了以下几点工作:
|
||||
|
||||
- Implemented an efficient metadata (dll) parsing library
|
||||
- Modified the metadata management module to realize the dynamic registration of metadata
|
||||
- Implemented a compiler from IL instruction set to custom register instruction set
|
||||
- Implemented an efficient register interpreter
|
||||
- Provide a large number of instinct functions to improve the performance of the interpreter
|
||||
- 实现了一个高效的元数据(dll)解析库
|
||||
- 改造了元数据管理模块,实现了元数据的动态注册
|
||||
- 实现了一个IL指令集到自定义的寄存器指令集的compiler
|
||||
- 实现了一个高效的寄存器解释器
|
||||
- 额外提供大量的instinct函数,提升解释器性能
|
||||
|
||||
## The Difference From Other C# Hot-Update Solution
|
||||
## 稳定性状况
|
||||
|
||||
HybridCLR is a native c# hot update solution. In layman's terms, il2cpp is equivalent to the aot module of mono, and HybridCLR is equivalent to the interpreter module of mono, and the combination of the two becomes a complete mono. HybridCLR makes il2cpp a full-featured runtime, natively (that is, through System.Reflection.Assembly.Load) supports dynamic loading of dlls, thereby supporting hot updates of the ios platform.
|
||||
HybridCLR已经被广泛验证是非常高效、稳定的Unity热更新解决方案,良好满足大中型商业项目的稳定和性能要求。
|
||||
|
||||
Just because HybridCLR is implemented at the native runtime level, the types of the hot update part and the AOT part of the main project are completely equivalent and seamlessly unified. You can call, inherit, reflect, and multi-thread at will, without generating code or writing adapters.
|
||||
目前已经有数千个商业游戏项目接入了HybridCLR,其中有超过千个已经在App Store和Google Player上线,仅仅iOS免费榜前500名中就有近百款使用了HybridCLR。上线的项目中包括MMORPG、重度卡牌、重度塔防之类的游戏。国内绝大多数**Top游戏公司**都已经在使用HybridCLR。
|
||||
|
||||
Other hot update solutions are independent vm, and the relationship with il2cpp is essentially equivalent to the relationship of embedding lua in mono. Therefore, the type system is not uniform. In order to allow the hot update type to inherit some AOT types, an adapter needs to be written, and the type in the interpreter cannot be recognized by the type system of the main project. Incomplete features, troublesome development, and low operating efficiency.
|
||||
可查看我们已知的头部公司中使用HybridCLR并且已经上线的[项目列表](https://hybridclr.doc.code-philosophy.com/docs/other/businesscase)。
|
||||
|
||||
## Supported Versions And Platforms
|
||||
## 支持与联系
|
||||
|
||||
- Support 2019.4.x, 2020.3.x, 2021.3.x, 2022.3.x full series of LTS versions. The `2023.2.0ax` version is also supported, but not released to the public.
|
||||
- Supports all il2cpp supported platforms
|
||||
- 官方1群(3000人):651188171(满)
|
||||
- 新手1群(3000人):428404198(满)
|
||||
- 新手2群(2000人):680274677(满)
|
||||
- 新手3群(2000人):**920714552(推荐)**
|
||||
- discord频道 `https://discord.gg/BATfNfJnm2`
|
||||
- 商业合作邮箱: business#code-philosophy.com
|
||||
- [商业化支持](https://hybridclr.doc.code-philosophy.com/docs/business/intro)
|
||||
|
||||
## Stability Status
|
||||
## 关于作者
|
||||
|
||||
HybridCLR has been widely verified as a very efficient and stable solution for hot update of Unity.
|
||||
**walon** :**Code Philosophy(代码哲学)** 创始人
|
||||
|
||||
The official versions of **extremely stable** 1.x, 2.x, and 3.x are currently released, which are sufficient to meet the stability requirements of large and medium-sized commercial projects.
|
||||
At present, at least thousands of commercial game projects have been integrated, and hundreds of them have been launched on both ends. The online projects include MMORPG, heavy card, heavy tower defense and other games. **Most top game companies** (such as Tencent and NetEase) are already using HybridCLR.
|
||||
毕业于清华大学物理系,2006年CMO金牌,奥数国家集训队成员,保送清华基科班。专注于游戏技术,擅长开发架构和基础技术设施。
|
||||
|
||||
You can read the [game projects in top game companies](https://hybridclr.doc.code-philosophy.com/en/docs/other/businesscase) those are using HybridCLR and has been launched.
|
||||
|
||||
## Support And Contact
|
||||
|
||||
- Official 1 group: 651188171 (full)
|
||||
- Novice QQ group 1: 428404198 (full)
|
||||
- Novice QQ group 2: **680274677 (recommended)**
|
||||
- discord channel [https://discord.gg/BATfNfJnm2](https://discord.gg/BATfNfJnm2)
|
||||
- Business cooperation email: business#code-philosophy.com
|
||||
- [Commercial Support](https://hybridclr.doc.code-philosophy.com/en/docs/business/intro)
|
||||
|
||||
## About The Author
|
||||
|
||||
**walon** : Founder of **Code Philosophy (code philosophy)**
|
||||
|
||||
Graduated from the Department of Physics of Tsinghua University, won the CMO gold medal in 2006, a member of the National Mathematical Olympiad Training Team, and was recommended to Tsinghua University for basic courses. Focus on game technology, good at developing architecture and basic technical facilities.
|
||||
|
||||
## License
|
||||
## license
|
||||
|
||||
HybridCLR is licensed under the [MIT](https://github.com/focus-creative-games/hybridclr/blob/main/LICENSE) license
|
||||
|
||||
Reference in New Issue
Block a user