What are all the different types of roc files? So far I have seen
I have seen documentation for app
, platform
, and module
. What is interface for? Are there more?
https://www.roc-lang.org/tutorial#modules
Interface is the old name for Module
Hosted is the file type to talk between Roc and the host language (e.g. Rust), but it will be deprecated soon in favor of a leaner solution using module params.
Interesting I have not hit a hosted
file yet with all the platform stuff I have been looking at
https://github.com/roc-lang/basic-cli/blob/main/platform/Effect.roc
Ah ok, I actually have seen that file but didn't register the different module type
We look at all of the Roc Effect
declarations in that file and link them to the platform's functions based on their name, for example stdoutLine
: https://github.com/roc-lang/basic-cli/blob/4ec1f2191f367403bd2d4e84b9798f04a59f01d6/platform/src/lib.rs#L413
Last updated: Jul 05 2025 at 12:14 UTC