Stream: beginners

Topic: How does roc build platforms?


view this post on Zulip Isaac Van Doren (Nov 01 2023 at 02:37):

I changed something in lib.rsin basic-cliand was very pleasantly surprised to see that I could rebuild the platform with the only the roc command. How does this work?

view this post on Zulip Richard Feldman (Nov 01 2023 at 02:40):

the short answer is that it's a brittle stopgap solution right now :sweat_smile:

view this post on Zulip Isaac Van Doren (Nov 01 2023 at 02:41):

Hahaha nice

view this post on Zulip Richard Feldman (Nov 01 2023 at 02:41):

we have a bunch of code that detects (via guessing by looking at what's in the directory) what language the host is written in, and then also guessing what command to run to rebuild it

view this post on Zulip Richard Feldman (Nov 01 2023 at 02:42):

what I'd like to move toward is having the host be in charge of rebuilding - so instead of running roc build on basic-cli, when you run cargo build on basic-cli that also rebuilds the roc code in the platform (using build.rs probably)

view this post on Zulip Richard Feldman (Nov 01 2023 at 02:43):

a nice thing about switching to that setup is that it means applications built on platforms in local directories will run faster, because you won't have to wait for the Rebuilding platform... step every time anymore

view this post on Zulip Isaac Van Doren (Nov 01 2023 at 02:44):

Nice, that does sound like a good move


Last updated: Jul 06 2025 at 12:14 UTC