版本历史¶
Version 1.3.2¶
Bugfix: Fix sign extension for arbitrary-width signed integers such as
int62in the standard-mode C runtime. This avoids undefined shifts and fixes decoding these fields on big-endian hosts.
Version 1.3.1¶
Bugfix: Broaden
BP_BIG_ENDIANauto-detection beyond GCC/Clang's__BYTE_ORDER__to also cover ACLE-compatible Arm toolchains such as TI Arm Clang (__ARM_BIG_ENDIAN), legacy TI ARM CGT (__big_endian__), other toolchains that define__BIG_ENDIAN__, and IAR (__LITTLE_ENDIAN__ == 0), in both the optimization-mode generated code and the standard-mode C library. Previously these big-endian targets fell through to the little-endian path and produced incorrect results for multi-byte fields. PR #84.打包:在
bitproto包的 PyPI 项目页面上以 README 作为长描述展示。
Version 1.3.0¶
新特性:支持大端序主机。bitproto 的编码格式在所有平台上都是小端序;现在 C 运行库(标准模式)以及 C 优化模式生成的代码在为大端序主机编译时也能产生正确的输出。Python 和 Go 本来就与字节序无关,不受影响。
新特性:新增编译器选项
--endian``(``both|little|big),用于控制优化模式 C/C++ 代码所针对的宿主机字节序。默认的both会生成两份代码路径,以#ifdef BP_BIG_ENDIAN区分并自动检测主机(可通过定义BP_BIG_ENDIAN覆盖);little只保留原有的、更小更快的字节指针代码(不支持大端序);big只生成可移植的那份路径。小端序下生成的代码与之前的版本完全相同,因此在常见的小端序目标上没有任何性能回退。
Version 1.2.2¶
Warning: May break some existing projects's generated names:
Improve snake_case function. #74, #75
Version 1.2.1¶
Warning: May break some existing projects's generated names:
Bugfix: pascal_case formatter. ISSUE #68, PR #69.
Bugfix: Fixed naming style of generated code such as IntegerConstant (style lookup supports inheritance). ISSUE #70 PR #70
Version 1.2.0¶
Feature: Add a simple language-server, tested on neovim and vscode.
Editor: Upgrade vscode extenions to support the
bitproto-language-server.
Version 1.1.2¶
Feature: Allow using constants as option values. ISSUE #61, PR #63
Version 1.1.1¶
Fix bug: enum importing other bitproto's field name generation bug. #53 #52
Fix bug: import statements of bitprotos should be placed ahead of other declarations. #53
Version 1.1.0¶
Performance improvements for C bitprotolib, 40~60us improvement per call on stm32. PR #48.
Fix Python nested message
__post_init___function code generation. PR #48, commit 73f4b01.
Version 1.0.1¶
Add support for Python 3.11
Version 1.0.0¶
第一次发布 1.0 版本
Version 0.4.6¶
支持任意比特数目的有符号整数类型 例如 int24, 见 PR#45
Version 0.4.5¶
Use Python IntEnum for enum generation (respecting backward compatibility) PR#41.
Version 0.4.4¶
Minor fix compiler setup.py path issue.
Version 0.4.2¶
Allow using
typeas message field name, fixes issue #39.
Version 0.4.0¶
Add support for
messageandenumextensiblity for protocol forward compatibility.Cut down the code size of generated language-specific files.
Refactor the bitproto compiler.
Refactor the bitproto serialization mechanism, using language-specific libraries instead of pure compiler-generated files.