racket-raylib icon indicating copy to clipboard operation
racket-raylib copied to clipboard

[Suggestion] Instructions on how to make the resulting program redistributable should be added.

Open WraithGlade opened this issue 5 months ago • 2 comments

Hello. For a bit of background and context: For years I have really liked the expressiveness of Racket though I've only used it off and on but it hasn't seemed clear that the language's ecosystem is viable for performant real-world graphical software, though I could just be oblivious or overly cautious. Bindings such as this binding to Raylib could make Racket usable as such (for real heavyweight software applications), but it still isn't clear to me that embarking on using this for a full project that I'd invest years in would be safe.

More to the point: I tried using DrRacket's package system to generate a standalone executable package (using the built-in menu for such in DrRacket's GUI) for some of the example code here to see if this binding is usable for actual redistributable programs, but I didn't get it to actually work. The resulting executable always just didn't respond, behaving like a no-op (a "do nothing" command).

How can programs created with these Racket Raylib bindings actually be redistributed?

I am also concerned that with the small number of ported examples here that large parts of the Raylib library may not actually work fully.

I suggest that a new section be added to this project's main page that instructs users on how to actually create a redistributable program that works when installed onto a system that neither has Racket nor Raylib already installed. That is what real programs will nearly always need to do at some point.

Creating actual redistributable program packages is after all kind of the whole point of programming in a sense, usually anyway.

Anyway, it's cool that these bindings at least exist in any case. It's kind and generous of you to have provided them to everyone.

Have a great day/night/etc and thanks for reading and for your efforts!

WraithGlade avatar Jul 12 '25 04:07 WraithGlade

Hi,

Both raco exe and raco dist appear to work on my machine (linux, x86_64) on all of the examples in the examples directory, producing a working executable and a working bundle (that includes the bundled library) respectively. I tried also with DrRacket and it produced an empty executable just like you described. Upon investigation I found that this was due to DrRacket not including the main submodule, which is required for the examples. I'm not sure why it does this, but if you want to distribute your own program with DrRacket's button it appears that you need to write it in the toplevel module of the file rather than in a main submodule, in which case I managed to get the examples to work.

I'm happy to include some "guide"-like resources in the documentation, although I can't promise when that will happen.

I am also concerned that with the small number of ported examples here that large parts of the Raylib library may not actually work fully.

Anyone is welcome to contribute ports of Raylib's C examples, particularly when they find a feature that doesn't work 🙂

eutro avatar Oct 29 '25 17:10 eutro

Thanks for the information!

I'm currently exploring some other software stuff, among other real-life things I'm attending to, but Racket has always been on of my favorite languages for elegant programming and so it would be cool if there was a clearer prospect for using it for game dev. As such, it's good to hear that you did get it to work and the next time I am working with Racket and Raylib I will return here and try to do the same.

I would say that guide-like resources for it of some kind would be a good idea, or perhaps at least making the package work automatically for distribution.

If I end up doing a real project with Racket and these Raylib bindings then I will probably contribute to the examples some just as you've suggested. Good to hear you are open to examples being contributed in that respect. I am currently busy with other things though.

Anyway, thanks again and have an awesome day/night/etc! 🏙️🌃🌱🙂

WraithGlade avatar Nov 10 '25 20:11 WraithGlade