So if multiple platforms are't a thing...
Hypothetically speaking, how would I do FFI from roc code an existing rust library?
Is the only way to fork a platform?
I'm vaguely aware that there has been and idea for something like platform plug-ins? But that's.. not a thing? right?
superfluous details about my use-case
Is the only way to fork a platform?
If you truly need ffi to an arbitrary library either:
libffi
and dynamically loading shared librariesDoes that seem like a reasonable way to go?
Yep. Fork, add matrix library. Maybe trim some unneeded stuff or customize the platform otherwise. Then build on that.
Coolcool. I might give that a shot one day. Thanks.
I still have a limited understanding of platforms, but I think that having to do matrix-bot
platform is actually a good thing. Because you could set it up so that the Roc code just provides callbacks for the hooks (and some configuration probably? or maybe just a path to a file and the platform will handle that) and the platform would handle setup, connecting to the server, setting callbacks. So the platform would be like a framework, exposing only what's needed. Is this the idea?
100% that is the idea.
That would be an amazingly well scope platform that would hopefully expose a really nice and focused matrix related api
Huh that's a cool idea. I haven't thought much about the API of a matrix platform, I guess I was figuring it'd be a lot of request/response managed effects / a lot of generic Task
stuff, that should just map directly to the types and functions in matrix-rust-sdk.
Thinking about where platform/application boundaries are drawn is super interesting.
I really like the idea of a high-level Matrix bot platform.
Last updated: Jul 06 2025 at 12:14 UTC