Hello, I'm new to Roc and functional programming. Using the basic-cli platform, I just compiled the hello-world example and the resulting binary is 114 Megs! Anything I'm doing wrong here?
Nope, it is a bug with the basic-cli platform that is mostly fixed bug hasn't been cut into a new release.
#beginners > big executables has some context
Brendan Hansknecht said:
Nope, it is a bug with the basic-cli platform that is mostly fixed bug hasn't been cut into a new release.
Ok, thanks for the link. I just tried rockLovesC and the binary is only 32k. Very nice!
I just picked up a copy of "Functional Programming Made Easier" by Charles Scalfani, which teaches with PureScript. I appreciate the goals and direction Roc is taking, and I'm considering learning with Roc as a substitute.
One suggestion for the project: switch to the c-platform from the basic-cli platform for the tutorial. The huge binary size may turn some people off right away, as it almost did to me.
Hopefully, we will cut a new release very shortly and this will be fixed.
I'm on mobile, but I thought we had a GitHub Action set up to do that?
Basic CLI is manually released by @Anton and a segfault has been blocking him from cutting a new release with the file size fixes.
ahh gotcha. Do we have any idea what's causing the segfault?
I have something I hope is a workaround, but I have no real idea what is causing the issue. I was trying to debug, but the issue is really inconsistent. Small changes to the rust binary (like adding a debug print) fix it.
I'm going to try Brendan's fix with the latest extra tests I added and if that all goes well I'll queue up a new release :)
Last updated: Jul 06 2025 at 12:14 UTC