At the moment the playground is using the platform:
app [main!] { pf: platform "../basic-cli/platform.roc" }
I haven't explored much about platforms in Roc yet, but my understanding is that the platform is kind of the public api/std lib you have access to in that program. Right?
In that case the required platform is relative to the file (../), and there are no ways to see what's the API of that platform.
Maybe it would be beneficial to have a panel to display the available platforms on the playground (if ever there are many) and display its public API directly in the playground?
If I'm mistaken about what a platform is, that idea might be irrelevant, but still it might be good to make things clear for a "TLDR"-newcomer who just wants to play with the language to discover its syntax.
This is the best explanation about what a platform is: https://roc-lang.org/platforms
In that case the required platform is relative to the file (
../), and there are no ways to see what's the API of that platform.
This will probably be changed to a URL for the production Roc plaground.
Maybe it would be beneficial to have a panel to display the available platforms on the playground (if ever there are many) and display its public API directly in the playground?
We will probably stick with a single platform for a while, but yeah, once we have a working non-trivial platform in the playground we should provide links to the docs.
Yes I scanned that doc quickly. My understanding is that each platform exposes its own specific functions, right?
Yes, that's correct.
Do you think it would be beneficial that the playground "scans" the platform and lists the available functions (and other items if there are more than just functions) directly in a dedicated panel within the playground?
Hmm, I don't know... I feel like the docs websites work pretty well for that purpose, like https://roc-lang.github.io/basic-cli/0.20.0/
Maybe we have enough real estate in the playground to display the docs website next to it with an iframe
Or a simple
CleanShot 2025-09-29 at 15.59.32.png
Presently, the playground doesn't support multiple roc modules -- so the platform in the app header isn't doing anything right now. It currently just compiles a single file -- and we simulate other modules like the builtins. It's on the near roadmap to start using the BuildEnv and support building multiple modules.
I had a crack at adding support for multiple modules, but went down a massive rabbit hole with the builtins. It's a big cross cutting thing and I never managed to really land anything useful.
I'm hoping the latest Richard-Jared collaboration on type system and interpreter fixes will make this much easier to support.
For the playground specifically... I was thinking of having a simple platform that had some simple drawing effects to work with a canvas. I have fond memories of something like that from my early experience learning Elm.
Longer term we can probably support more exotic platforms in the playground, but I'm not really sure how that will look yet. Lot's of exploration and experimentation in that space.
Last updated: Jun 16 2026 at 16:19 UTC