Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bundle nif #24262

Open
wants to merge 7 commits into
base: devel
Choose a base branch
from
Open

bundle nif #24262

wants to merge 7 commits into from

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Oct 8, 2024

The nif repo (https://github.com/nim-lang/nif) is now installed as a dependency for the Nim compiler. At the moment the important tools (nifler, xelim, nifgram, gear2) are imported to test that this dependency installation works, but only with the define -d:testNifImports, which the test suite enables for now. This is temporary until NIF is actually used in the compiler.

For nif to be able to import the compiler, the original plan was to generate a config file as described in nim-lang/nif#96 but config files in parent folders aren't checked for imports. Instead the compiler generally defines --path:".." so that dependencies can import it like import compiler / .... nif also defines --path:$nim to work with any version of the compiler, but $nim isn't set to the compiler path when compiling the compiler, so this is disabled via -d:nifCompilerInPath.

In the future we can maybe just move the mutually dependent parts of NIF to the compiler codebase (gear2 & nifler for now), it might be painful to have to update both codebases for each change.

Also, for nif to compile for the bootstrapping version of the compiler (csources_v2), system.ensureMove is declared as a no-op for compiler versions that don't have it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant