| name | robius-matrix-integration |
| description | | |
| type | skill |
| created | 2026-02-27T00:00:00.000Z |
| domain | productivity |
| category | developer-experience |
| risk | unknown |
| source | community |
| tags | ["skill","productivity","developer-experience","robius","matrix","integration"] |
Robius Matrix SDK Integration Skill
Best practices for integrating external APIs with Makepad applications based on Robrix and Moly codebases.
Source codebases:
- Robrix: Matrix SDK integration - sliding sync, timeline subscriptions, real-time updates
- Moly: OpenAI/LLM API integration - SSE streaming, MCP protocol, multi-provider support
When to Use
Use this skill when:
- Integrating Matrix SDK with Makepad
- Building a Matrix client with Makepad
- Implementing Matrix features (rooms, timelines, messages)
- Handling Matrix SDK async operations in UI
- Keywords: matrix-sdk, matrix client, robrix, matrix timeline, matrix room, sliding sync
Overview
Robrix uses the matrix-sdk and matrix-sdk-ui crates to connect to Matrix homeservers. The key architectural decisions:
- Sliding Sync: Uses native sliding sync for efficient room list updates
- Separate Runtime: Tokio runtime runs Matrix operations, Makepad handles UI
- Request/Response Pattern: UI sends requests, receives actions/updates back
- Per-Room Background Tasks: Each room has dedicated timeline subscriber task
MatrixRequest Pattern
Request Enum Definition
pub enum MatrixRequest {
Login(LoginRequest),
Logout { is_desktop: bool },
PaginateRoomTimeline {
room_id: OwnedRoomId,
num_events: u16,
direction: PaginationDirection,
},
SendMessage {
room_id: OwnedRoomId,
message: RoomMessageEventContent,
replied_to: Option<Reply>,
},
EditMessage {
room_id: OwnedRoomId,
timeline_event_item_id: TimelineEventItemId,
edited_content: EditedContent,
},
RedactMessage {
room_id: OwnedRoomId,
timeline_event_id: TimelineEventItemId,
reason: Option<String>,
},
JoinRoom { room_id: OwnedRoomId },
LeaveRoom { room_id: OwnedRoomId },
GetRoomMembers {
room_id: OwnedRoomId,
memberships: RoomMemberships,
local_only: ,
},
GetUserProfile {
user_id: OwnedUserId,
room_id: <OwnedRoomId>,
local_only: ,
},
IgnoreUser {
ignore: ,
room_member: RoomMember,
room_id: OwnedRoomId,
},
FetchAvatar {
mxc_uri: OwnedMxcUri,
on_fetched: (AvatarUpdate),
},
FetchMedia {
media_request: MediaRequestParameters,
on_fetched: OnMediaFetchedFn,
destination: MediaCacheEntryRef,
update_sender: <crossbeam_channel::Sender<TimelineUpdate>>,
},
SendTypingNotice { room_id: OwnedRoomId, typing: },
ReadReceipt { room_id: OwnedRoomId, event_id: OwnedEventId },
FullyReadReceipt { room_id: OwnedRoomId, event_id: OwnedEventId },
ToggleReaction {
room_id: OwnedRoomId,
timeline_event_id: TimelineEventItemId,
reaction: ,
},
SubscribeToTypingNotices { room_id: OwnedRoomId, subscribe: },
SubscribeToPinnedEvents { room_id: OwnedRoomId, subscribe: },
}