0.17.0 released

43 Likes

I followed the new translate-c package with something like this:

-    translate_c.linkSystemLibrary("strophe", .{});
+    translator.linkSystemLibrary("strophe", .{});

But it complains

build.zig:34:15: error: no field or member function named 'linkSystemLibrary' in 'build.Translator'
    translator.linkSystemLibrary("strophe", .{});

There is no much document on translate-c to figure out the new API. Did I miss anything ?

1 Like

It’s a field in the init options

2 Likes

I haven’t gotten through the full release notes yet, but it feels like a great release with lots of new features and improvements considering how soon it came after 0.16.0! I’m particularly excited to try out the spirv stuff and the improved build system. Thanks to the team for all their work!

2 Likes

Thanks, I ran into this as well. The upgrade guide in the release notes should be corrected.

EDIT: In-case anyone else trips up on this. The field is called link_system_libs, and can be used like this:

    const translate_c = b.dependency("translate_c", .{});
    const translator = Translator.init(translate_c, .{
        .c_source_file = b.path("src/sdl.h"),
        .target = target,
        .optimize = optimize,
        .link_system_libs = &.{
            .{ .name = "SDL3" },
            .{ .name = "SDL3_image" },
        },
    });
6 Likes