Stream: beginners

Topic: CLI Binary Size


view this post on Zulip Mason Green (Nov 11 2023 at 18:11):

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?

view this post on Zulip Brendan Hansknecht (Nov 11 2023 at 19:22):

Nope, it is a bug with the basic-cli platform that is mostly fixed bug hasn't been cut into a new release.

view this post on Zulip Brendan Hansknecht (Nov 11 2023 at 19:23):

#beginners > big executables has some context

view this post on Zulip Mason Green (Nov 11 2023 at 19:44):

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.

view this post on Zulip Brendan Hansknecht (Nov 11 2023 at 20:42):

Hopefully, we will cut a new release very shortly and this will be fixed.

view this post on Zulip Richard Feldman (Nov 11 2023 at 21:49):

I'm on mobile, but I thought we had a GitHub Action set up to do that?

view this post on Zulip Brendan Hansknecht (Nov 11 2023 at 23:00):

Basic CLI is manually released by @Anton and a segfault has been blocking him from cutting a new release with the file size fixes.

view this post on Zulip Richard Feldman (Nov 12 2023 at 00:19):

ahh gotcha. Do we have any idea what's causing the segfault?

view this post on Zulip Brendan Hansknecht (Nov 12 2023 at 00:23):

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.

view this post on Zulip Anton (Nov 13 2023 at 09:35):

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