Skip to content

1.1.2 union & static arrays supports

Compare
Choose a tag to compare
@Morglod Morglod released this 10 Apr 16:47
· 5 commits to master since this release
bun add bun-ffi-gen@1.1.2
  1. Tested on libvirt

  2. Now C style declarations (for most cases) parsed

  3. Now unions & static arrays are supported, serialized as Buffers

  4. 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);
  1. For debug purposes logs added, you could specify log level like this:
import { setLogLevel, LogLevel } from "bun-ffi-gen/lib/log";
setLogLevel(LogLevel.verbose);
  1. enum values are now also specified as global constants