#jit #bindings #macos #compiler #jit-compiler #compile #gnulightning

sys gnulightning-sys

Rust 对 gnulightning JIT 编译器的绑定

1 个稳定版本

2.3.0 2022年6月11日

#843编程语言

GPL-3.0-only

4MB
127K SLoC

C 92K SLoC // 0.0% comments Rust 18K SLoC Shell 8K SLoC // 0.2% comments M4 7.5K SLoC // 0.2% comments Automake 427 SLoC // 0.2% comments Bitbake 390 SLoC // 0.3% comments

包含 (autotools 代码混淆,455KB) include/lightning-2.1.3/configure,(autoconf 代码混淆,9KB) include/lightning-2.1.3/configure.ac

gnulighting-sys

编译 gnu-lightning 2.3.0 并通过此 crate 提供它。包含了很多无关的绑定,所以请一定使用 gnu lightning 手册 作为参考,而不是此 crate 的导出。

在 macOS 上测试过,可能在大多数 Linux 发行版上也能工作,Windows 未知。

使用

警告 / 下一步

仅使用原始绑定编写代码非常困难。为了使其有用,我或其他人需要编写一个安全的包装器。
您将无法使用此 crate 编写惯用的 Rust 代码。大多数宏都没有作为绑定存在,所以您将不得不编写如 jit_addi(JIT_R0, JIT_R0, 1); 的代码,而是将编写 _jit_new_node_www(jit,jit_code_t_jit_code_addi, jit_reg_t__RAX as jit_word_t, jit_reg_t__RAX as jit_word_t, 1);

许可证

此 crate 的许可证与 gnulightning 本身相同。GPL v3。请参阅 ./LICENSE 和 ./include/lightning-2.1.3/COPYING 以获取许可证副本。

修改

对 gnulightning 的唯一修改是在 inclue/lightning-2.3.1/check/lightning.c 中包含 <math.h>。

依赖项