moonbit-c-binding
使用本机 FFI 将 MoonBit 绑定写入 C 库的指南。在添加 extern "c" 声明、使用 Moonbit.h 编写 C 存根、在 Moon.pkg 或 Moon.pkg.json 中配置 native-stub 和 link.native、选择 #borrow/#owned 所有权注释、设计回调蹦床、使用外部对象和终结器包装 C 指针、跨 FFI 转换字符串或使用 AddressSanitizer 验证绑定时使用。
更新日志: Source: GitHub https://github.com/moonbitlang/skills
评论加载中...