So, I've been going through the repo since I was invited yesterday and I think I am beginning to understand how platforms and Roc applications connect, but I just want to be clear, so I had a few questions.
roc_fx_myfunc
, then write an Effect
module that is hosted
, not an interface
or app
, that exposes
those functions, and then declare the function's type signature, but not implementation, sans roc_fx_
, correct? Does that work the same way for all platform languages or just Rust (I am basing this on the cli
example)?from a roc perspective, it does not matter what language the platform is written in
I think hello-world
(or hello-zig/hello-rust) in the examples
folder are good examples of a minimal platform
it just has roc create a string and then print it out
Then cli
and benchmarks
do some more stuff with the cli: reading numbers, printing strings from roc. This uses the hosted modules and Effect
and Task
Finally, tui
is the most interesting platform so far; it actually run an update loop allowing you to create an elm-like TEA or model-view-update application
Okay, so, looking at hello-zig
again, each platform has to implement its own allocation strategy and panic behavior? Is there a list of roc_
functions that can/should be implemented in a platform somewhere?
that platform has them all
Last updated: Jul 05 2025 at 12:14 UTC