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 D example #45

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bangbangsheshotmedown
Copy link

@bangbangsheshotmedown bangbangsheshotmedown commented Oct 29, 2024

Hello,

I love your library, I use C and D, so I figured i'd share this example since you seems interested in providing bindings to other languages

D is a wonderful language, it also is a C compiler, so one can import C files directly, without needing to create bindings

I know D can understand C's macros, but I couldn't figure out a way to use them, i'll revisit that later

My code is not perfect, but I think this is a good starting point, maybe other D users can come and help improving it, D has fantastic template/mixin features, so I'm pretty sure this can be made much better.

Using your library from D is as simple as this:

dmd main.d clay.c

@nicbarker
Copy link
Owner

Hello, welcome and thanks for opening this PR! 🙂 It would be great to get some nice D bindings available, I've never used the language myself but have heard good things about it.

Would you be able to put together some example code to show how these bindings would be used?

@bangbangsheshotmedown
Copy link
Author

Thanks the plan, to port the current RayLib backend example with WASM support as well

@nicbarker
Copy link
Owner

Awesome, great to hear!

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.

2 participants