Skip to content

Releases: Morglod/bun-ffi-gen

1.1.4

29 Sep 11:51
Compare
Choose a tag to compare

handle this case:

typedef struct {
} POST_NAME; 

"long" added as builtin

"bunAllocArray" helper added

1.1.2 union & static arrays supports

10 Apr 16:47
Compare
Choose a tag to compare
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