显示 HN:Cicada – 一种与 C 集成的脚本语言
Show HN: Cicada – A scripting language that integrates with C

原始链接: https://github.com/heltilda/cicada

蝉是一种轻量级的脚本语言,在C代码内部运行。详情请见网站:http://heltilda.github.io/cicada 安装:从命令行进入蝉的下载目录,输入: > ./configure > make > make install 使用方法:在你的C代码中包含蝉的头文件:#include 并且在链接器中传递lcicada选项:gcc -lcicada -o myprogram ... 运行蝉的最简单方法是调用:runCicada(NULL, NULL, true);

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 展示 HN: Cicada – 一种与 C 集成的脚本语言 (github.com/heltilda) 3 分,由 briancr 发表于 24 分钟前 | 隐藏 | 过去 | 收藏 | 讨论 我写了一种与 C 一起运行的轻量级脚本语言。具体来说,它是一个 C 库,你通过 C 函数调用运行它,并且它可以回调你自己的 C 函数。编译大小约为 250 kB。除了 C 标准库之外没有依赖。 主要语言特性: * 使用别名而不是指针,因此内存安全 * 数组是 N 维且可调整大小的 * 运行脚本或其自身的 'shell' * 错误捕获 * 方法、继承等 * 可定制的语法 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系方式 搜索:
相关文章

原文

Cicada is a lightweight scripting language that runs inside of C code. For details, see the website:

http://heltilda.github.io/cicada

Installation: From the command prompt go into the Cicada download directory, and type:

> ./configure

> make

> make install

How to use: Include the Cicada header file in your C code:

#include <cicada.h>

and pass an lcicada option to the linker:

gcc -lcicada -o myprogram ...

The simplest way to run Cicada is to call:

runCicada(NULL, NULL, true);

联系我们 contact @ memedata.com