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
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