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

Add lib functions earlier so that they are visible in top-level macros #12848

Merged

Conversation

asterite
Copy link
Member

Fixes #12395

CI will fail because of #12840

It turns out this was really easy to do. The previous times I tried it I got failures and I didn't want to spend time debugging it. The failures were because the External was created without args initially, and then they were added. I missed that... but once I realized that was the problem fixing it was very easy.

Note: lib types won't be solved at the top-level because that happens later on. The reason for that is to not require forward declarations. But I think that even without resolved types this is useful.

@straight-shoota straight-shoota added this to the 1.7.0 milestone Dec 16, 2022
@sol-vin
Copy link
Contributor

sol-vin commented Dec 16, 2022

I literally could not be happier about this!

@asterite
Copy link
Member Author

@sol-vin that's great to hear! If you want you can compile a compiler from this branch and try it out. Maybe this works but we'll still be missing things to make this usable.

@sol-vin
Copy link
Contributor

sol-vin commented Dec 16, 2022

@asterite My main dev computer is Windows right now, so I use the scoop packages to make everything work. I might still have a Linux box kicking around I can try this on with raylib-cr. IDK how easy Crystal is to compile on Windows.

@asterite
Copy link
Member Author

Oh, no worries then. Thanks!

@straight-shoota
Copy link
Member

Just saying... https://learn.microsoft.com/en-us/windows/wsl/install

But yeah, building the compiler on Windows is not exactly a walk in the park. That's mostly due to the lib dependencies (you need LLVM with llvm-config for example). But given that it should be just make -f Makefile.win crystal.

You can easily wait for this to be merged into master and install the nightly build from scoop.

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

Successfully merging this pull request may close these issues.

Exposing lib bindings in macro API outside of methods
3 participants