xuanjiazhen/cangjielanguage/build-cangjie
Claude Code and agent skill by xuanjiazhen/cangjielanguage
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install xuanjiazhen/cangjielanguage/build-cangjieSKILL.md
The same SKILL.md was published earlier as xuanjiazhen/cangjielanguage/build-cangjie.
Build Cangjie Compiler
仓颉编译器构建技能。每当用户提到以下任何场景时,必须调用此 skill:
- 「构建/编译 cjc/runtime/stdlib/stdx」
- 「build the compiler」「编译仓颉」「编译 toolchain」
- 「build/编译 cjpm/cjfmt/cjlint/cjcov/cjlsp/cjtrace-recover」
- 「搭建编译环境」「重新编译」「install cangjie compiler」
- 「用 cjc 编译」「cjc 编译」「帮我编译」「编译这个文件」 — 当需要使用 cjc 时,必须先确保环境已配置(source envsetup.sh)
- 在任何需要获取编译好的
cjc二进制文件的场景
构建后必须执行以下步骤,否则无法使用:
- install — 每个组件 build 后都要 install
- source envsetup.sh —
source cangjie_compiler/output/envsetup.sh - 验证构建 —
cjc hello.cj -o hello && ./hello,预期输出Hello, Cangjie
首次构建需完整步骤(runtime → stdlib → stdx → tools)。后续增量编译只需 cd cangjie_compiler/build/build && ninja cjc。
构建产物路径: {compiler-project}/output/(包含 envsetup.sh)
cjc 二进制路径(直接使用,无需 find):
- 已构建:
{compiler-project}/output/bin/cjc - 构建中:
{compiler-project}/build/build/bin/cjc - 环境变量设置后:
source {compiler-project}/output/envsetup.sh,之后直接用cjc
支持平台
| Platform | Runtime Output Path | stdx Target | |
|---|---|---|---|
linux_x86_64 | common/linux_release_x86_64 | linux_x86_64_cjnative | |
linux_aarch64 | common/linux_release_aarch64 | linux_aarch64_cjnative | |
mac_x86_64 | common/darwin_release_x86_64 | darwin_x86_64_cjnative | |
mac_aarch64 | common/darwin_release_aarch64 | darwin_aarch64_cjnative |
仓颉项目工作区结构
工作区根目录下有若干仓颉子项目(名称不固定,编译器项目通常包含 output/ 目录和 third_party/):
- 编译器项目 — 包含 third_party/(LLVM)、build/(构建目录)、output/(产物)
- 运行时项目 — 内含 runtime/ 和 stdlib/ 子目录
- stdx 项目
- output 目录 — 构建产物,内含 envsetup.sh 和 bin/cjc
output 目录(构建产物)示例:
- envsetup.sh:
{compiler-project}/output/envsetup.sh - cjc 二进制:
{compiler-project}/output/bin/cjc(已构建时) - 构建中 cjc:
{compiler-project}/build/build/bin/cjc
快速构建(推荐)
组件构建顺序
首次构建: LLVM → Compiler (cjc) → Runtime → Stdlib → stdx → Tools
后续增量编译 cjc: cd {compiler-project}/build/build && ninja cjc(无需重建 runtime/stdlib)
每个组件构建后必须 install,否则后续组件无法找到依赖。
验证构建
预期输出:Hello, Cangjie
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingace_skills/.claude/skills/build-cangjie/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/xuanjiazhen/cangjielanguage/build-cangjie)