Support recompilation of NIFs based on build_dot_zig#199
Open
joelpaulkoch wants to merge 3 commits into
Open
Conversation
joelpaulkoch
commented
Oct 2, 2025
joelpaulkoch
left a comment
Author
There was a problem hiding this comment.
I'm generally wondering whether there is a way to recompile the dependencies using mix instead of calling make or zig build, then we could reuse a lot of the logic of the compiler libraries.
I didn't get a chance to look at how nerves handles cross compilation.
Comment on lines
45
to
48
| # - Check if they contain :elixir_make in their `:compilers` | ||
| # | ||
| # We'll probably need to expand how we detect NIFs, but :elixir_make is a popular way to compile NIFs | ||
| # so it's a good place to start... |
Author
There was a problem hiding this comment.
This comment should be updated.
|
|
||
| erts_env = erts_make_env(erts_path) | ||
|
|
||
| build_mode = "ReleaseSafe" |
Author
There was a problem hiding this comment.
I think it would be great to at least check whether it's a debug build and then go for Debug mode. Or otherwise allow overriding the build mode somehow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey, first of all: thank you for
burrito, it's fun to write cli applications in Elixir.It's probably very niche but I've been working on a NIF that's compiled with
build_dot_zig.I believe
zigleris more popular but it's also more complex and in my case I just want to write the NIF as a zig package.This PR integrates
build_dot_ziginto the recompilation ofburrito.Here is a small demo app using
burritowith a demo dependency which is based onbuild_dot_zig.