rbino

rbino

Ash Core Team

build_dot_zig - Use the Zig build system from Elixir to build your NIFs

build_dot_zig is a Mix compiler that allows you to use the Zig build system and compiler from Elixir. This lets you to easily build C, C++ and Zig NIFs without a system toolchain on Linux, MacOS and Windows. You can think of it as an alternative to elixir_make with some more goodies.

The library also features a handy mix generator, mix build_dot_zig.gen.c_nif, that bootstraps all that is needed for a NIF written in C. The only thing left to do is to write the implementation of the NIF.

In the future (or possibly right now, I have yet to experiment with it) it could also leverage the Zig package manager to retrieve C, C++ or Zig dependencies, without the need of having them installed system-wide.

Here you can find a blog post with some more details about the library features.

https://github.com/rbino/build_dot_zig

Most Liked

LostKobrakai

LostKobrakai

I would love to give more hearts to this than one. I had been hoping this would become a thing for some time. I might even have a usecase for it at work. Does this work with nerves and their targets?

LostKobrakai

LostKobrakai

As someone not experienced in systems level languages I found zig quite a bit more approachable than rust. I also really like that they actually want to make things like cross compilation simpler. I once tried to cross compile a rust project we have at work and just gave up after a bit, because I couldn’t figure out what was going wrong. Doing it with a toolchain in the handful of MB makes zig even more appealing in that regard.

LostKobrakai

LostKobrakai

This was about a proposal for zig to gain more indepenance from third parties it currently depends on. I’ll link to the comment, which should ultimately give some perspective to the initial proposal: make the main zig executable no longer depend on LLVM, LLD, and Clang libraries · Issue #16270 · ziglang/zig · GitHub

Last Post!

rbino

rbino

Ash Core Team

Not sure I understand the usecase, can you detail a little more what you’re able to achieve with Rustler? Are you talking about precompiled NIFs?

Where Next?

Popular in Announcing Top

grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54006 488
New
pkrawat1
Hey guyz We at @aviabird are working on a payment library in elixir/phoenix. We are targeting March 2018 to add 56 Gateways to it. Have...
New
kip
ex_cldr provides localisation and internationalisation support based upon the data from the Unicode CLDR project. Unicode released CLDR ...
407 13256 120
New
devonestes
Introducing assertions, the library that helps you write really great test assertions! GitHub: GitHub - devonestes/assertions: Helpful a...
New
oltarasenko
Dear Elixir community, After a year of development, bug fixes, and improvements, we are proudly ready to share the release of Crawly 0.1...
New
wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
martinthenth
Hello everybody :wave: Recently, some of my colleagues talked about database ids and uuids and their problems, and I remembered the pain...
New

Other popular topics Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36654 110
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement