1.1.2 union & static arrays supports
bun add bun-ffi-gen@1.1.2
-
Tested on libvirt
-
Now C style declarations (for most cases) parsed
-
Now unions & static arrays are supported, serialized as Buffers
-
addIncludeDir
utility added, so now you could specify include paths for clang:
// add include dirs for clang
addIncludeDir(path.resolve("my_include_dir"));
// get header ast from clang
const wgpuAst = await clangGetAstJson(HEADER_PATH);
- For debug purposes logs added, you could specify log level like this:
import { setLogLevel, LogLevel } from "bun-ffi-gen/lib/log";
setLogLevel(LogLevel.verbose);
- enum values are now also specified as global constants