cangjie-ffi-build

Configure, build, and run Cangjie projects linking C/C++ libraries via FFI.

1|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/SunriseSummer/CangjieDocValidator --skill cangjie-ffi-build
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-ffi-build
Source: https://github.com/SunriseSummer/CangjieDocValidator/tree/main/.github/skills/ffi_build
Command: npx skills add https://github.com/SunriseSummer/CangjieDocValidator --skill cangjie-ffi-build

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance on configuring, building, and running Cangjie C interoperability projects, including dynamic and static libraries across different platforms.

Core Features & Use Cases

  • Platform-Specific Library Naming: Details naming conventions for dynamic and static libraries on Linux, macOS, and Windows.
  • Compiler Linker Options: Explains essential cjc linker flags like -L and -l.
  • Direct Compilation with cjc: Provides step-by-step instructions for compiling C code into libraries and linking them with Cangjie code on various OS.
  • cjpm Project Integration: Guides users on configuring cjpm.toml for FFI dependencies and building/running projects.
  • Security Best Practices: Includes recommendations for secure compilation and linking options.

Quick Start

Use the cangjie-ffi-build skill to learn how to compile a Cangjie project that links against a C dynamic library on Linux.

Frequently Asked Questions about cangjie-ffi-build

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure cjpm.toml for C interoperability dependencies?

Configuring `cjpm.toml` for C interoperability involves declaring FFI dependencies to integrate static or dynamic libraries. This allows the `cjpm` build tool to automatically manage linking when building and running Cangjie projects interfacing with C/C++ code.

What is the process for direct compilation of Cangjie FFI code using cjc?

Direct compilation using `cjc` involves compiling C code into static or dynamic libraries and linking them with Cangjie code via specific linker options. This process requires platform-specific configurations for dynamic and static library integration.

Does Cangjie FFI support cross-platform static library integration?

Cangjie FFI supports cross-platform static library integration across Linux, macOS, and Windows. The build process requires applying correct platform-specific library naming conventions and appropriate linker options for successful compilation.

What security hardening options are recommended for Cangjie C interoperability builds?

Security hardening for Cangjie C interoperability builds involves applying recommended secure compilation and linking options during the `cjc` and `cjpm` build processes. These practices ensure safe integration when interfacing with C/C++ code.