Hi! I'm musing about using Roc as a way to let users extend an existing application. Specifically, in my case the application is a database written in Rust and it would be cool if users could define their own custom query logic using a pure language. Roc fits the "pure" bill, but I'm not sure its platform concept supports the use case too.
My current thinking is that the user would somehow provide the Roc code to the database application, which would then compile it using a custom platform into wasm, and then invoke the wasm code to transform queried data.
Does it seem like Roc would fit that bill? Are there any existing projects that attempt something similar?
Seems like that could work to me :)
I think I remember people talking about a wasm "pipeline" like this before, but I don't know of any implementations.
Sure, I think roc would be a good idea :grinning:
Here's a super simple example using native
https://github.com/lukewilliamboswell/roc-plugin-experiment-rust
Here's an older template for WASI
https://github.com/lukewilliamboswell/roc-platform-template-wasi
You should know that platform dev can be a little challenging at the moment, thinfs are still in development and changing and there's not a lot of documentation.
But I'm happy to try and help people learn more. I've been tinkering away on various platforms trying to learn as I go.
Yeah, I noticed the lack of documentation and am fully prepared to dig through source code. Just wanted to make sure the thing I'm trying to do actually makes sense first :)
Thanks for the examples, that's exactly what I was looking for!
Last updated: Jul 06 2025 at 12:14 UTC