Stream: platform development

Topic: Best way to send data between platform and app


view this post on Zulip Henrik Larsson (Feb 05 2025 at 17:42):

I am currently building a platform and the first point I need to decide is how to send data between the platform and app. My platform will provide an rpc! effect (among other things).

I am following the layout where I have a host folder with the golang code and a platform folder with the roc code in the platform project and then an app project that depends on the platform build.

My first idea was to put all the API types in the platform, however the issue with that was that I did not find a way where I can depend on the roc-json library from the platform. So my next idea is to make a much smaller platform that just sends strings between platform and app and all the roc-json will happen in the app layer.

Is this the general approach or am I just missing how I can use roc-json in the platfrom? The platforms I have found so far are not using any third party roc modules afik.

view this post on Zulip jan kili (Feb 05 2025 at 17:54):

This seems probably only semi-related to your obstacle, but FYI here's how I'm able to pass typed structs/records from/to my MIDI-centric platform: https://roc.zulipchat.com/#narrow/stream/231634-beginners/topic/.E2.9C.94.20Memory.20layout.20for.20tags.20.26.20records

view this post on Zulip Luke Boswell (Feb 05 2025 at 20:37):

Yeah, I'd recommend using json from the app for now.

The plan is to be able to import a package into a platform, but no one has implemented that yet.


Last updated: Jul 06 2025 at 12:14 UTC