从 0.9.x 迁移
0.10.0 将完整能力收敛为一个 voxelkit 平台 wheel。VFP 1.3 文件结构与 API 语义保持不变;变化集中在
安装包与导入路径。
| 旧方式 | 新方式 |
|---|---|
安装 voxelkit-compiler | 安装 voxelkit-0.10.0-<abi>-<platform>.whl |
from voxelkit_compiler import Vfp, compile_json | from voxelkit import Vfp, compile_json |
voxelkit-compiler input.json output.vfp | voxelkit input.json output.vfp |
vox2vfp-compiler / vfp2vox-compiler | vox2vfp / vfp2vox |
推荐迁移步骤
- 在目标虚拟环境卸载旧的
voxelkit与voxelkit-compiler。 - 安装与当前 Python ABI、系统和 CPU 匹配的 0.10.0 wheel。
- 全局替换
voxelkit_compiler导入为voxelkit。 - 更新 CLI 名称,运行一次 JSON → VFP 和
Vfp.parse(...).validate()回归。 - 不需要重编旧 VFP;只有希望新增 THMB、PRVW 或重建缓存时才调用
rebuild_caches()。
0.10.0 wheel 不包含编译器 Python 源码。它提升了实现保护程度,但仍不能替代许可证、密钥或授权服务端策略。