@cella-lang/cpp

中文文档
0.1.202611090954发布于 2026/11/09Apache-2.0零依赖近 30 天下载 3.3万

C++17 for Cella Lang, as a branch of the C family's deep embedding (@cella-lang/cfamily): classes, templates, overloading, references, exceptions, lambdas and the standard library's vector and string written in C++ itself; verdicts (accept, reject, unknow

原始使用文档
文档目录4 节
  1. Programs
  2. Entries
  3. Loading
  4. Per-definition hashes

@cella-lang/cpp

C++17 for the Cella proof checker, as a compiled module pack: the C++ branch of the C family's deep embedding (@cella-lang/cfamily). A program is checked by C++17's rules and run by a small-step semantics; the verdict is accept, reject or unknown, with the node and the clause of the standard.

Depends on @cella-lang/cfamily and @cella-lang/machine.

Programs

The JSON of cfamily's syntax with "lang": {"k": "langCpp"} and no board (a program for a board is @cella-lang/arduino's). The branch covers classes (inheritance, virtual functions and virtual bases, constructors, destructors and copies), templates and overloading, references and move semantics, lambdas, exceptions and the standard exceptions, iostream input and output, and std::vector, std::string and std::initializer_list, which are written in C++ and checked by the same rules as the program.

A value the standard leaves to the implementation is libc++'s, and the verdict says it assumed so (assumes). A standard function, or a member of a library class, that the model does not provide yet makes the verdict unknown with the reason, not a rejection.

Entries

  • cpp.verdict src input fuel: the verdict JSON (format in @cella-lang/cfamily); input is standard input, fuel bounds the steps. A verdict proved by the kernels: kernel_verdict_in("cpp", "cpp.verdict", …) in cella-lang.
  • cpp.types src candidates: the type query (format in @cella-lang/cfamily).
  • The debugger, for cella-lang/dap: load, run, stopConf, stopKind, stopNode, stopOut, stopErr, stopDetail, divergences, feed, globals, frames, setVarErr, setVarConf, env; and report input fuel session, a whole run with all the input given at once.

Loading

Load the packs into the cella-lang build named by index.json (checkerHash, cbfVersion; the peerDependencies pin it): the standard modules in index.requires["cella-lang"].modules, the packages in index.requires.packages (each the same way), then this package's modules in the order of index.modules.cpp.deps. cella-lang's README (Official packages) has the code.

Per-definition hashes

index.json lists, for every definition, own (its own content) and merkle (its content and everything it depends on). A definition whose merkle did not change between two versions means the same; a changed one is listed in CHANGES.md.

版本与发布记录

@cella-lang/cpp 共发布 272 个版本,首次发布于 2026/10/05;过去 12 个月发布了 272 个版本。

版本发布日期距今
0.1.202611090954latest2026/11/09今天
0.1.2026110822132026/11/09今天
0.1.2026110809592026/11/081 天前
0.1.2026110805242026/11/081 天前
0.1.2026110804152026/11/081 天前
0.1.2026110801362026/11/081 天前

关于 @cella-lang/cpp 的常见问题

@cella-lang/cpp 是什么?

C++17 for Cella Lang, as a branch of the C family's deep embedding (@cella-lang/cfamily): classes, templates, overloading, references, exceptions, lambdas and the standard library's vector and string written in C++ itself; verdicts (accept, reject, unknow

如何安装 @cella-lang/cpp?

在项目目录运行 npm install @cella-lang/cpp,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:cella-lang(0.1.202611090954)、@cella-lang/cfamily(0.1.202611090954)、@cella-lang/machine(0.1.202611090954)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@cella-lang/cpp 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/cella-lang__cpp 是否存在。

@cella-lang/cpp 可以商用吗?

@cella-lang/cpp 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@cella-lang/cpp 的下载量有多少?

根据 npm 官方下载统计,@cella-lang/cpp 在 2026/10/10 – 2026/11/08 这 30 天内被下载 33,284 次,日均约 1,109 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cella-lang/cpp 还在维护吗?

最新版本 0.1.202611090954 发布于 2026/11/09(今天);至今共发布 272 个版本,其中过去 12 个月发布了 272 个;首次发布于 2026/10/05。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。