Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It will still work. If you look at the type signature of @cImport in the language reference[1], it returns a type just as @import. So you can call @typeInfo on it. But instead of writing

  const win32 = @cImport({
    @cInclude("windows.h");
    @cInclude("winuser.h");
  });
You will write:

  const win32 = @import("win32");
Where the module "win32" is declared in build.zig.

[1] https://ziglang.org/documentation/master/#cImport



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: