Stream: platform development

Topic: Building a platform to a .tar.br


view this post on Zulip Isaac Van Doren (Nov 03 2023 at 00:37):

Hello, I'm trying to build basic-cli to a .tar.br so I can use the new version of Stdin.line.

When I run

roc build main.roc --bundle .tar.br

I get

Compressing with Brotli at maximum quality level…

(Note: Brotli compression can take awhile! Using --bundle .tar.gz takes less time, but usually produces a significantly larger output file. Brotli is generally worth the up-front wait if this is a file people will be downloading!)

Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }

Any ideas what's causing this and what I can do to get around it? I'm running it on an M1 mac.

view this post on Zulip Luke Boswell (Nov 03 2023 at 00:39):

Hmm, I am not sure, but what folder are you running this in? I think you have to be at least one folder away from it

view this post on Zulip Luke Boswell (Nov 03 2023 at 00:39):

So roc build --bundle .tar.br /platform/main.roc

view this post on Zulip Luke Boswell (Nov 03 2023 at 00:39):

Not sure that is the intended behaviour, just my experience

view this post on Zulip Isaac Van Doren (Nov 03 2023 at 00:41):

Hey, that worked! Thanks!

view this post on Zulip Brendan Hansknecht (Nov 03 2023 at 01:34):

Probably use doing something naive with paths

view this post on Zulip Anton (Nov 03 2023 at 17:01):

btw, it's not required to create a bundle, you can also use a local folder, like in this example. You can use roc build my-app.roc --prebuilt-platform to prevent rebuilding the platform every time.

view this post on Zulip Isaac Van Doren (Nov 03 2023 at 17:27):

That’s actually what I ended up doing because I was getting seg faults with the new Stdin.line in the bundled version that do not show up when I use the platform locally. Any idea what’s going on there?

view this post on Zulip Anton (Nov 03 2023 at 18:45):

Sounds like the same thing I was hitting here, I will investigate it in detail soon.


Last updated: Jul 06 2025 at 12:14 UTC