5min chapter

Elixir Wizards cover image

The Bridge Between Elixir and Zig with Isaac Yonemoto

Elixir Wizards

CHAPTER

Zig, Zigler - What's It Like to Write, but Then Debug a NIF?

Zigler is a bridge between elixir and zig, which makes it super easy to build niffs. You can write these little test blocks and then it executes the code only when you're testing. So if you return an error from a function inside of zig, zig has something called as error return trace. And what I've done is I've integrated that with elixir so that when that error exits the NIF and comes back into beam land, it will append the zig stack trace on top of the elixir sack trace. It's kind of like throwing an exception but there are some very key differences because zig is a low level language.

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode