Stream: beginners

Topic: Platforms, particularly host.c


view this post on Zulip pithlessly (Dec 01 2021 at 22:58):

Hi everyone! I'm trying to use Roc for advent of code, and I thought I'd make a dedicated platform for it. To figure out how to do this, I was looking at this simple example platform: https://github.com/rtfeldman/roc/tree/trunk/examples/hello-world/platform

view this post on Zulip pithlessly (Dec 01 2021 at 23:00):

In the distribution, host.c has an associated host.o file, but that obviously isn't checked into git. Is this something I have to build myself or does the compiler handle this automatically?

view this post on Zulip pithlessly (Dec 01 2021 at 23:00):

Also: why does roc_panic take an alignment parameter?

view this post on Zulip Brendan Hansknecht (Dec 01 2021 at 23:07):

Host.o will be generated during compilation. For know host languages, like c, this should happen automatically.

view this post on Zulip Richard Feldman (Dec 01 2021 at 23:38):

I'd look at examples/cli - hello world isn't much to build on! :big_smile:


Last updated: Jul 06 2025 at 12:14 UTC