Software Unscripted cover image

Building a Terminal in Zig and Swift with Mitchell Hashimoto

Software Unscripted

CHAPTER

How to Use Zig to Build Native Add-Ons

The process that node uses to build native add-ons is not really cross compilation friendly, which is a problem. I was able to replace all of that with just one single call to Zig CC. And it works cross platform and is like way faster and we don't have to have a Python dependency or anything else. Yeah. The one interesting thing for Zig is you still need all the headers for the C libraries that you're linking to,. But Zig ships all the libc headers, which is what makes the cross compilation part of it really nice. When you're building a GUI app, like I am, you need the X11 headers, Wayland headers, you need on Mac,

00:00
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner