strika
2021-9-1 07:00:46

Hey. I’m working on a simple command line utility. My goal is to distribute the executable to Windows, MacOS and Linux users. I just released v0.1. However, I see that distributions are 70–110MB large. I think this is too much for a simple CLI program and it could be a deal-breaker for some users. I used raco exe and raco distribute to make distributions. Am I doing something wrong? Is there a way to make a smaller distribution? Is Racket suitable for implementing command line utilities? (In this regard. I understand that it’s possible to make a CLI and I love other aspects of programming in Racket so far.)


heefoo
2021-9-1 10:16:34

does anybody have experience with racket and swig ?


sorawee
2021-9-1 11:06:28

I think raco demod might be able to shave off the size a bit, though I don’t think it will be significant.


strika
2021-9-1 11:18:53

:+1: Thanks. I’ll check it out.


jjsimpso
2021-9-1 15:28:12

Are you using Racket CS 8.2? I have a racket/gui application that I packaged with ‘raco dist’ and it is about 54MB. Still not small, but a good bit smaller than what you are seeing. Of course it depends on the libraries and other files you need to include in the distribution.


strika
2021-9-1 17:00:59

Yes, I use Racket CS 8.2. I think that the only “external” library that I use is gregor.


spdegabrielle
2021-9-1 17:46:28

It’s only a guess but using racket-bc might deliver a smaller executable.


strika
2021-9-2 05:34:22

I tried using raco demod . The executable that I get is much smaller. However, I can’t run it. I get the following error when I try to execute racket main_rkt_merged.zo or ./main_rkt_merged: syntax-track-origin: contract violation expected: syntax? given: #f context...: body of "/home/strika/alas/main_rkt_merged.zo" Are there any obvious mistakes in my process? Thanks!


sorawee
2021-9-2 05:40:50