duktape.cr icon indicating copy to clipboard operation
duktape.cr copied to clipboard

Windows support

Open devnote-dev opened this issue 2 years ago • 3 comments

This PR adds bindings for Duktape to Crystal on Windows, this requires changing the use of Make to a more compatible solution: I've gone with Just which is well-made and used heavily within other ecosystems like *nix. This should also work with shards install on Windows (verified locally) but there are a couple of edge-cases.

devnote-dev avatar Jul 10 '23 16:07 devnote-dev

Especially being a 1.x shard, I don't agree with removing the Makefile - this will probably break the majority of people's builds using Duktape to no longer be able to install it without intervening to install Just in order to build this shard.

Ideally, we would use nothing that we can't assume people don't already have - make is basically guarenteed on Linux, on Windows I see most libraries (in other languages besides Crystal) simply using a batch file - which would be great.

If we want to keep both Makefile for *nix and Justfile for windows, that is fine by me, I personally don't have any stake in Windows - but we shouldn't break Linux builds.

z64 avatar Jul 10 '23 19:07 z64

That's fair, I hadn't considered that. At the same time, this would make the install process longer because of https://github.com/crystal-lang/shards/issues/468. I guess that's not really this shard's problem though, so I'll add the Makefiles back.

devnote-dev avatar Jul 10 '23 19:07 devnote-dev

Hi @devnote-dev! First off, I just want to say that this is amazing - thanks so much for this work!

Second, I want to apologize for the radio silence. I've been on vacation the past few weeks and am just getting caught up on everything.

Haven't had great chance to review this yet, so please give me a few weeks to get this work reviewed. Rest assured, I'd love to merge any PRs that add support for Windows.

I agree with @z64 around the use of make for *nix platforms - it's the de facto build mechanism for these these platforms.

I'll give this a review over the next few weeks. Thanks again!

jessedoyle avatar Aug 03 '23 03:08 jessedoyle