rbino
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.
Most Liked
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
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
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
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?
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security









