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.)
does anybody have experience with racket and swig ?
I think raco demod
might be able to shave off the size a bit, though I don’t think it will be significant.
:+1: Thanks. I’ll check it out.
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.
Yes, I use Racket CS 8.2. I think that the only “external” library that I use is gregor.
It’s only a guess but using racket-bc might deliver a smaller executable.
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!
That looks like a bug to me. You can file an issue at https://github.com/racket/racket/issues/new?assignees=&labels=&template=bug-report.md